Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key value interface, attribute paths, attribute caching #102

Merged
merged 255 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
255 commits
Select commit Hold shift + click to select a range
dcc33e7
WIP FS reader implemented?
axtimwalde Apr 29, 2021
7d1ddf6
WIP fs writer (does not work)
axtimwalde Apr 30, 2021
d52011e
WIP still on it...
axtimwalde May 3, 2021
50ad324
fix license headers in tests
axtimwalde May 3, 2021
9261424
passing test
axtimwalde May 4, 2021
1f49043
replace project.version by n5-spec.version=2.6.1 for spec version
axtimwalde May 4, 2021
39f16c7
fix some tests and add unspecific cache test (tests cache
axtimwalde May 4, 2021
604ad1f
remove non abstract abstract leftover classes, bugfixes
axtimwalde May 6, 2021
e015bb7
list caching
axtimwalde May 6, 2021
f01d5e5
insert root cache entry at writer creation ...
axtimwalde May 7, 2021
25bb2e5
run writer constructor through createGroup("/")
axtimwalde May 10, 2021
274cad0
move trivial remove() implementation into interface default
axtimwalde May 10, 2021
8a53377
add children to parent cache when creating a group
axtimwalde May 10, 2021
24e663e
update parent cache on remove
axtimwalde May 11, 2021
2158733
all tests passing with and without cache
axtimwalde May 12, 2021
3844e0c
remove dead middle interface GsonAttributesParser
axtimwalde May 13, 2021
0aa1b57
Merge branch 'master' into cache-attributes
axtimwalde May 21, 2021
3ac189d
WIP key value interface as filesystem simplification
axtimwalde Jul 20, 2021
1c4ed55
WIP key value access interface (and file system implementation)
axtimwalde Jul 30, 2021
b5a70af
This seems to work flawlessly
axtimwalde Aug 3, 2021
a0988c6
feat: add and use KeyValuAccess path compose method
axtimwalde Aug 4, 2021
9268b4c
feat: LockedChannel.openForWriting creates the full path, this is
axtimwalde Sep 4, 2021
7e527eb
bump to pom-scijava-31.1.0
axtimwalde Jun 14, 2022
f849bdc
feat: wip add failing test for getting attributes from urls
bogovicj Nov 15, 2022
31f360c
feat: initial N5Url API
cmhulbert Nov 18, 2022
fa78a76
test: update test for getting attributes to use N5URL
bogovicj Nov 18, 2022
52e4add
feat: initial N5URL relativize support
cmhulbert Nov 18, 2022
6c4e70d
feat: getAttribute from url
cmhulbert Nov 21, 2022
02cc783
test: N5URL tests
cmhulbert Nov 21, 2022
ead786d
test: test object parsing from urls
bogovicj Nov 22, 2022
9b6e90d
feat: support generic arrays when getting attribute from N5URL
cmhulbert Nov 22, 2022
bc05979
feat: remove N5Url getAttributes methods in favor of handling interna…
cmhulbert Nov 28, 2022
f12345f
feat: initial handling of structured fragments in `getAttributes`; WIP
cmhulbert Nov 28, 2022
cd9eddf
refactor(test): migrate away from remove `getAttributes(N5Url, Class<…
cmhulbert Nov 28, 2022
62fb3f5
feat: add readAttributesJson
cmhulbert Dec 1, 2022
b3b0b0b
feat: static N5URL constructor from container/group/path
cmhulbert Dec 1, 2022
f5571cb
refactor: use getAttributesJson
cmhulbert Dec 1, 2022
a336886
refactor: rename fields/methods
cmhulbert Dec 1, 2022
520dbcb
refactor: more N5URL renaming
cmhulbert Dec 1, 2022
88d58f3
refactor: align method naming with Path conventions
cmhulbert Dec 1, 2022
bb9bd61
feat: add method to check if N5URL is absolute
cmhulbert Dec 1, 2022
5f0df9c
feat: add method to normalize container path
cmhulbert Dec 1, 2022
36cc96f
refactor: rename and use new methods
cmhulbert Dec 1, 2022
0fde153
fix: properly return when the N5Url is absolute
cmhulbert Dec 1, 2022
ffd5260
refactor: Move ARRAY_INDEX
cmhulbert Dec 2, 2022
d8f208a
feat: allow getAttributes root to be JsonElement
cmhulbert Dec 2, 2022
e0f3c46
feat: support set attribute by attribute path
cmhulbert Dec 2, 2022
84ae29f
fix: don't store temp files in user.home (#88)
cmhulbert Dec 2, 2022
4c3ab8c
test: set attribute by path
cmhulbert Dec 2, 2022
f269285
feat: support replacing incompatible structures based on the attribut…
cmhulbert Dec 5, 2022
a4ef866
refactor: move setAttribute logic to GsonAttributesParser
cmhulbert Dec 5, 2022
8258d3c
refactor(test): move setAttribute test to AbstractN5Test
cmhulbert Dec 5, 2022
fcc6c47
feat(test): add setAttribute tests for replacing intermediate members…
cmhulbert Dec 5, 2022
db0c4d6
feat: expose key
cmhulbert Dec 7, 2022
fe9a659
refactor: separate write/insertAttribute, move readAttribute
cmhulbert Dec 7, 2022
f6bc460
refactor: clarify that the input should be normalized
cmhulbert Dec 21, 2022
ab433d8
fix: handle JsonPrimitive values as leaf
cmhulbert Dec 21, 2022
fed78a9
fix: support when attributes.json doesn't contain JsonObject
cmhulbert Dec 21, 2022
fbc1b02
feat(test): add method to createN5Write from specified location
cmhulbert Dec 21, 2022
0759c37
feat(test): add method for createN5Writer with location
cmhulbert Dec 21, 2022
201d595
feat: support writing/reading opaque keys via `getAttributes`/`setAtt…
cmhulbert Dec 21, 2022
ed1dc19
test: test adding attributes via opaque keys
cmhulbert Dec 21, 2022
e21fbad
test: test replacement of existing root/structure of attributes
cmhulbert Dec 21, 2022
0f6a29a
test: add normalize identity check
cmhulbert Dec 21, 2022
1f15bbb
fix: return root for group and attribute if they weren't specified
cmhulbert Dec 21, 2022
254b46d
fix: always absolute if scheme is specified
cmhulbert Dec 21, 2022
b575124
refactor: rename parameters
cmhulbert Dec 21, 2022
cf5c71b
doc: add N5URL documentation
cmhulbert Dec 21, 2022
c69d850
test: add isAbsolute tests
cmhulbert Dec 21, 2022
a81cfc4
fix: N5FSReader should fail if base path does not exist (#89)
cmhulbert Dec 22, 2022
fa0f1cc
feat: expose encodeAsUri
cmhulbert Dec 22, 2022
1cc8d1c
Merge branch 'master' into urlAttributes
cmhulbert Dec 22, 2022
c1abdfc
feat: inline createDirectories now that non-existent path throws IOEx…
cmhulbert Jan 3, 2023
023dfed
fix(test): use new writer
cmhulbert Jan 3, 2023
2d023a5
fix(test): test for RawCompression inheritance (used by zarr)
cmhulbert Jan 3, 2023
17c90b8
fix(test): specify separate n5containers for Version and deeplist tests
cmhulbert Feb 7, 2023
5198fed
feat(test): add whitespace encoding and nested array tests
cmhulbert Feb 8, 2023
f4c3d71
feat!,refactor: update how path tokens behave
cmhulbert Feb 8, 2023
8eea1ec
docs: document LinkedAttributePathToken
cmhulbert Feb 9, 2023
3914a33
test: when constructing a reader should fail
bogovicj Feb 21, 2023
3adb677
test: setting attrs with escaping special chars for keys
bogovicj Feb 21, 2023
a335b07
feat!: replace Map<String, JsonElemen> variants with root JsonElement
cmhulbert Feb 22, 2023
4d36c2a
feat,test: support escape characters in attribute paths
cmhulbert Feb 22, 2023
536dc40
fix: improper handling of escape characters
cmhulbert Feb 22, 2023
13f535a
test: move to abstract, comment some currently non-functional tests
cmhulbert Feb 22, 2023
607314d
feat(test): add whitespace and escaped-character tests
cmhulbert Feb 23, 2023
bfa7dd4
fix(test): evaluate `\` through json properly
cmhulbert Feb 23, 2023
b92ecfb
fix: issue where attribute was not fully decoding encoded characters
cmhulbert Feb 23, 2023
ea20335
feat!: initial `removeAttribute` support, separate get/parse/read att…
cmhulbert Feb 23, 2023
62ed447
feat: properly normalize path, respecting escape sequences
cmhulbert Feb 27, 2023
7925afb
feat!: add explicit `removeAttribute` methods
cmhulbert Feb 27, 2023
233c30c
feat(test): add tests for `removeAttribute(s)`
cmhulbert Feb 27, 2023
69e3c8f
feat: add GsonN5Reader/Writer
cmhulbert Mar 3, 2023
1f4b13d
feat!: migrate away from AbstractGsonParser to GsonN5Reader/Writer
cmhulbert Mar 3, 2023
63e8b5d
feat!: deprecate for future removal
cmhulbert Mar 3, 2023
a6d92f6
feat: finalize and document attribute path regex normalization
cmhulbert Mar 3, 2023
9d01d96
feat!: deprecate for future removal, change `getAttributes` to `getAt…
cmhulbert Mar 3, 2023
7fe6799
fix(test): fix some incorrect tests
cmhulbert Mar 3, 2023
ea2201c
Merge branch 'master' into cache-attributes
cmhulbert Mar 3, 2023
52ef1e4
Merge branch 'urlAttributes' into cache-attributes
cmhulbert Mar 6, 2023
ca91bae
feat!: revert changes and deprecate
cmhulbert Mar 7, 2023
5f509cf
build: fix javadoc errors
cmhulbert Mar 7, 2023
0aaadc3
feat!,doc,test: refactor caching to separate methods, clean some docu…
cmhulbert Mar 7, 2023
d961716
feat!: remove redundant methods
cmhulbert Mar 7, 2023
c6ccc8b
feat(test): add cache test
cmhulbert Mar 7, 2023
9448eb1
feat: expose N5Url Array Pattern
cmhulbert Mar 10, 2023
34c01ef
feat(test): add root non-JsonObject tests
cmhulbert Mar 10, 2023
a66ac1c
feat(test): move/rename some useful methods for creating temporary N5…
cmhulbert Mar 10, 2023
4f0bd4f
fix: return null if not attributes
cmhulbert Mar 10, 2023
43373df
improve comments
axtimwalde Mar 21, 2023
548d489
build: can compile with Java >=11, replace sun.nio.cs.ThreadLocalCoders
axtimwalde Mar 22, 2023
36ba7ae
fix remove attribute for non-root paths
bogovicj Mar 23, 2023
869bbac
test: make testAttributePathEscaping more permissive
bogovicj Mar 27, 2023
696ea39
style: cleanup documentation
cmhulbert Mar 27, 2023
3a81347
fix: replace root with null when removing "/" attribute
cmhulbert Mar 27, 2023
9e77e19
feat: throw IOException if container doesn't exist when opening reade…
cmhulbert Mar 27, 2023
ef1741f
feat: don't create groups when writing attributes if group doesn't ex…
cmhulbert Mar 27, 2023
2846d26
test: add remove container test
cmhulbert Mar 27, 2023
53f72e2
test: improve reader creation test to more generically support reader…
cmhulbert Mar 27, 2023
c82a87f
fix: groups aren't created when setting attributes, even when caching
cmhulbert Mar 27, 2023
607233c
feat!: add getBasePath to N5Reader API
bogovicj Mar 29, 2023
38facca
feat!: move normalize to GsonN5Reader
bogovicj Mar 29, 2023
db74311
feat: add setVersion method
bogovicj Mar 29, 2023
04ac63a
feat: add initializeGroup method
bogovicj Mar 29, 2023
9aee65c
chore: formatting
bogovicj Mar 29, 2023
7598ba2
Merge branch 'cache-attributes' of github.com:saalfeldlab/n5 into cac…
bogovicj Mar 29, 2023
a6d1053
feat: changes to make zarr impl easier
bogovicj Mar 31, 2023
d55a3e1
fix: move existence check to N5FSReader
bogovicj Mar 31, 2023
3991994
test: that opening a writing on an incompatible container fails
bogovicj Mar 31, 2023
f74b882
fix: remove leading slashes in FileSystemKeyValueAccess.normalize(path)
axtimwalde Apr 3, 2023
550fe32
BREAKING: remove GsonN5Reader/ Writer interfaces
axtimwalde Apr 3, 2023
2ccdf4e
style: remove public from interface method declarations
axtimwalde Apr 3, 2023
f99c34e
style:
axtimwalde Apr 3, 2023
5787834
build: fix Javadoc errors
axtimwalde Apr 3, 2023
6d470b3
fix: catch NumberFormatException when parsing string[] as double[]
bogovicj Apr 5, 2023
2bf6197
fix: catch Exceptionhs in JsonArray parsing
bogovicj Apr 5, 2023
159ad03
feat: N5Exceptions
cmhulbert Apr 6, 2023
598d70d
feat: remove leading `/` or `\\` from group (credit: bogovicj)
cmhulbert Apr 6, 2023
c2787e4
refactor: expose dataset keys
cmhulbert Apr 6, 2023
e80123f
style: formatting
cmhulbert Apr 6, 2023
f9e7a37
refactor: extract caching to separate class
cmhulbert Apr 6, 2023
404649f
fix: use the corrent normalize in more places
cmhulbert Apr 6, 2023
ccda98e
BREAKING: rm default groupPath impl in N5Reader
bogovicj Apr 7, 2023
530eee5
wip: separate KeyValue interfaces
cmhulbert Apr 7, 2023
a687bee
fix: add groupPath(String...) method
bogovicj Apr 11, 2023
7c37cf9
feat: add setter methods to N5JsonCache
bogovicj Apr 11, 2023
4ddcc3b
doc: update description of N5KeyValueWriter
bogovicj Apr 13, 2023
0715550
test(style): caching of groups and datasets
bogovicj Apr 13, 2023
dd9a1bd
feat!: reader can skip version check, rm initializeContainer
bogovicj Apr 13, 2023
01dc868
doc: address javadoc warnings
bogovicj Apr 13, 2023
983d5d8
doc: address more javadoc warnings
bogovicj Apr 13, 2023
6b36c8c
doc: even more javadoc
bogovicj Apr 13, 2023
e7cdd33
test: an explicit test of N5CacheTest
bogovicj Apr 13, 2023
bf0a145
Merge branch 'cache-attributes' into wip/KeyValueInterface
bogovicj Apr 13, 2023
14707ec
fix(style): implement groupPath
bogovicj Apr 13, 2023
a3bee97
Merge branch 'kv-reader-cons' into wip/KeyValueInterface2
bogovicj Apr 13, 2023
973e5a1
feat: wip toward cache interfaces
bogovicj Apr 13, 2023
63380bf
feat!: add cacheKey to public cache methods, attrs always updated
bogovicj Apr 14, 2023
a94c9cd
chore!: remove unnecessary method
bogovicj Apr 17, 2023
f9105eb
fix: cache always updates attributes with new elem
bogovicj Apr 17, 2023
069ceda
feat!: add N5JsonCachableContainer interface
bogovicj Apr 18, 2023
239b3d9
feat: add N5JsonCache methods useful to N5Writers
bogovicj Apr 18, 2023
df285ee
refactor: use new interfaces
bogovicj Apr 18, 2023
07945bd
fix: remove superfluous version
axtimwalde Apr 21, 2023
66a61e7
style: LinkedAttributePathToken
axtimwalde Apr 21, 2023
c9f0f30
gitignore IntelliJ stuff
tpietzsch Apr 4, 2023
3033a3c
fix javadoc
tpietzsch Apr 4, 2023
33f5759
TODO
tpietzsch Apr 11, 2023
80e5f88
POM: Bump parent to pom-scijava-34.0.0
tpietzsch May 12, 2023
8f2bfbd
Add N5Reader.getContainerURI() which gives the full URL of the container
tpietzsch May 12, 2023
6755236
Fix tests to use tempN5Location() (full container URI) and disentangl…
tpietzsch May 11, 2023
004263c
Merge pull request #97 from tpietzsch/container-path
bogovicj May 16, 2023
75b36f0
fix: initialize static member tmpFiles before using it
tpietzsch May 17, 2023
62a18f2
Use Integer.valueOf instead of Integer::new
tpietzsch May 17, 2023
8eb819e
Add back assertion that was (I guess) lost in merge commit ea2201c1
tpietzsch May 17, 2023
50c7b32
Use static imports of Assert methods
tpietzsch May 17, 2023
4263cef
Simplify assertEquals(null, ...) to assertNull(...)
tpietzsch May 17, 2023
7bcdd5d
Remove N5KeyValueWithInterfacesTest which is a near-duplicate of N5FS…
tpietzsch May 17, 2023
be9d386
Merge pull request #99 from saalfeldlab/clean-up-tests
cmhulbert May 17, 2023
a3d348d
fix/test: avoid ExceptionInInitializerError
bogovicj May 17, 2023
a9d12d4
fix/test: ensure testReaderCreation throws N5IOException
bogovicj May 17, 2023
30993f3
Merge branch 'wip/KeyValueInterface' of github.com:saalfeldlab/n5 int…
bogovicj May 17, 2023
8eb3c0c
fix: ensure the static empty cache instance is not modified
bogovicj May 18, 2023
2d0d45f
feat: cache lazier
bogovicj May 22, 2023
15ec1d9
feat!: KeyValueWriter remove initializeGroup
bogovicj May 23, 2023
6d69039
feat: make N5JsonCache more extensible
bogovicj May 23, 2023
94b4971
fix: createGroup updates parent children only when necessary
bogovicj May 23, 2023
a150ca1
fix: remove unused methods
bogovicj May 23, 2023
953ec4e
feat: move n5 cache key variable to GsonKVR
bogovicj May 24, 2023
e22ce11
feat: move and rename ATTRIBUTES_JSON to N5KVR
bogovicj May 24, 2023
9168830
perf: N5JsonCache avoid calling synchronized method twice
bogovicj May 24, 2023
e65d1a0
perf/test: fewer backend calls when caching
bogovicj May 24, 2023
65f2e8a
fix/test: correct cache behavior for nested groups
bogovicj May 24, 2023
e877063
fix/test: removeCache correctly updates children for listing
bogovicj May 24, 2023
f3a4bbc
style: remove outdated commented line
bogovicj May 25, 2023
f9ec10f
fix: missing import
bogovicj May 25, 2023
1936784
test: more readable cache behavior helper
bogovicj May 25, 2023
095bda3
fix: cache now correctly sets isGroup, isDataset on add and update
bogovicj May 26, 2023
7afb2b8
perf: use KVA isFile and isDirectory, not exists
bogovicj May 26, 2023
e9dc3a6
fix: GsonKeyValueWriter remove default initializeGroup
bogovicj May 26, 2023
9928724
fix: tmp test container locations
bogovicj May 26, 2023
310ea06
breaking: update and clean up interface hierarchy, fix bugs,
axtimwalde Jun 2, 2023
7afb195
fix: groupExists must use an absolute path, was that hidden by overri…
axtimwalde Jun 2, 2023
34850f3
merge wip/basePath2Uri
bogovicj Jun 2, 2023
b717b8f
test: fix url version assertion
bogovicj Jun 2, 2023
3f03eeb
BREAKING: remove unused initializeGroup
axtimwalde Jun 2, 2023
bb20370
fix: implement equals for compression implementations
bogovicj Jun 7, 2023
88db247
fix/test: correct testWriteReadByteBlock
bogovicj Jun 7, 2023
e7b1e73
BREAKING: cache remove forceAddNewCacheInfo
bogovicj Jun 7, 2023
97cc420
feat: remove unused method
cmhulbert Jun 9, 2023
1a0a5f5
fix, style: N5Exceptions in N5KeyValue/FS/Reader/Writer
axtimwalde Jun 9, 2023
59a8897
fix: N5FSReader do not check existence twice
axtimwalde Jun 9, 2023
c9e529c
Revert "fix: N5FSReader do not check existence twice"
axtimwalde Jun 9, 2023
152a431
fix, style: remove unnecessary NullPointer exception catch, fix tests
axtimwalde Jun 9, 2023
63bf5f2
fix: n5 on windows
cmhulbert Jun 12, 2023
387d8c0
refactor: N5URL -> N5URI
cmhulbert Jun 12, 2023
6e36f42
refactor: explicitly indicate absolute group/attribute/datablock
cmhulbert Jun 12, 2023
f8801c0
feat(test): refine expected uri test behavior
cmhulbert Jun 12, 2023
68c1642
feat: handle valid URIs as input
cmhulbert Jun 12, 2023
4e6a2e6
fix: support uri for new N5 reader/writer
cmhulbert Jun 13, 2023
6d7a585
test: let createN5Reader/Writer handle URIs
cmhulbert Jun 13, 2023
25f45d3
refactor: move groupPath to GsonKeyValueN5Reader
bogovicj Jun 13, 2023
9a7a621
Merge branch 'fix/windowPaths' of github.com:saalfeldlab/n5 into fix/…
bogovicj Jun 13, 2023
6949209
fix: more windows path issues
cmhulbert Jun 13, 2023
d14fe55
doc/chore: add documentation and minor clean up
bogovicj Jun 14, 2023
821ee0a
throw N5Exception if list is called on a path that isn't a group
cmhulbert Jun 15, 2023
ac52633
test: that N5Exception is thrown if list is called on a path that isn…
bogovicj Jun 15, 2023
4efd741
doc: when N5Reader methods throw exceptions
bogovicj Jun 15, 2023
a0325ad
ci: run tests on windows and ubuntu
cmhulbert Jun 16, 2023
e50c27e
Merge pull request #101 from saalfeldlab/feat/windowsActions
bogovicj Jun 16, 2023
e1eebd6
ci: build on windows also
cmhulbert Jun 16, 2023
3fdde34
feat!: throw exceptions when attempting to parse an attribute with an…
cmhulbert Jun 20, 2023
a3de0af
doc: cleanup
cmhulbert Jun 20, 2023
0ce652b
style: whitespace, imports
cmhulbert Jun 20, 2023
2513c1b
feat(test): add write and remove cache tracking tests
cmhulbert Jun 20, 2023
4924308
feat(test): ensure result URI can be used to get a new reader over th…
cmhulbert Jun 20, 2023
27d9278
fix(test): close more reader/writers
cmhulbert Jun 20, 2023
b637363
fix(test): test was reading and testing the incorrect attribute key
cmhulbert Jun 20, 2023
33a0990
refactor(test): better test patterns
cmhulbert Jun 20, 2023
9347fd0
Revert "BREAKING: rm default groupPath impl in N5Reader"
cmhulbert Jun 20, 2023
39172a8
test: restrict delta for double equivalence
cmhulbert Jun 20, 2023
2261c5a
feat(test): ensure temporary containers are deleted when no longer ne…
cmhulbert Jun 22, 2023
51b2e24
feat(test): don't use static n5 container
cmhulbert Jun 22, 2023
60e2ae8
fix: normalize attr path in rmAttributes
bogovicj Jun 23, 2023
cfaffae
doc: typo fixes
bogovicj Jun 23, 2023
eed9042
feat(test): don't use static n5
cmhulbert Jun 23, 2023
a6ab3f2
feat(test): remove static n5 reference
cmhulbert Jun 23, 2023
8bc9a25
docs: remove some javadoc warnings
cmhulbert Jun 27, 2023
bbfe0f3
doc: add and clarify javadoc
bogovicj Jun 27, 2023
e81ce86
doc: more javadoc warnings
cmhulbert Jun 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/platform-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: test

on:
push:
branches:
- master
tags:
- "*-[0-9]+.*"
pull_request:
branches:
- master
workflow_dispatch:

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'zulu'
cache: 'maven'
- name: Maven Test
run: mvn -B clean test --file pom.xml
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ hs_err_pid*
.classpath
.project
.settings

.idea
*.iml
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## BSD 2-Clause License

Copyright (c) 2017-2020, Stephan Saalfeld
Copyright (c) 2017-2023, Stephan Saalfeld

All rights reserved.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# N5 [![Build Status](https://travis-ci.com/saalfeldlab/n5.svg?branch=master)](https://travis-ci.com/saalfeldlab/n5) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6578231.svg)](https://doi.org/10.5281/zenodo.6578231)
# N5 [![Build Status](https://travis-ci.com/saalfeldlab/n5.svg?branch=master)](https://travis-ci.com/saalfeldlab/n5)

The N5 API specifies the primitive operations needed to store large chunked n-dimensional tensors, and arbitrary meta-data in a hierarchy of groups similar to HDF5.

Expand All @@ -16,7 +16,7 @@ Chunked datasets can be sparse, i.e. empty chunks do not need to be stored.

## File-system specification

*version 2.5.2-SNAPSHOT*
*version 2.6.1*

N5 group is not a single file but simply a directory on the file system. Meta-data is stored as a JSON file per each group/ directory. Tensor datasets can be chunked and chunks are stored as individual files. This enables parallel reading and writing on a cluster.

Expand Down
2 changes: 1 addition & 1 deletion doc/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## BSD 2-Clause License

Copyright (c) @project.inceptionYear@-2020, Stephan Saalfeld
Copyright (c) @project.inceptionYear@-@current.year@, Stephan Saalfeld

All rights reserved.

Expand Down
2 changes: 1 addition & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Chunked datasets can be sparse, i.e. empty chunks do not need to be stored.

## File-system specification

*version @project.version@*
*version @n5-spec.version@*

N5 group is not a single file but simply a directory on the file system. Meta-data is stored as a JSON file per each group/ directory. Tensor datasets can be chunked and chunks are stored as individual files. This enables parallel reading and writing on a cluster.

Expand Down
27 changes: 24 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>31.1.0</version>
<version>34.0.0</version>
<relativePath />
</parent>

<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5</artifactId>
<version>2.5.2-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>

<name>N5</name>
<description>Not HDF5</description>
Expand Down Expand Up @@ -105,6 +105,11 @@
<cisd.jhdf5.version>19.04.0</cisd.jhdf5.version>

<commons-collections4.version>4.2</commons-collections4.version>

<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
<jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>

<n5-spec.version>2.6.1</n5-spec.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -145,7 +150,6 @@
<dependency>
<groupId>cisd</groupId>
<artifactId>jhdf5</artifactId>
<version>${cisd.jhdf5.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -174,6 +178,23 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<phase>validate</phase>
<configuration>
<name>current.year</name>
<pattern>yyyy</pattern>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* Abstract base class for {@link DataBlock} implementations.
*
* @param <T>
* the block data type
*
* @author Stephan Saalfeld
*/
Expand Down
141 changes: 0 additions & 141 deletions src/main/java/org/janelia/saalfeldlab/n5/AbstractGsonReader.java

This file was deleted.

7 changes: 7 additions & 0 deletions src/main/java/org/janelia/saalfeldlab/n5/BlockReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ public interface BlockReader {
* Reads a {@link DataBlock} from an {@link InputStream}.
*
* @param dataBlock
* the data block
* @param in
* the input stream
* @param <T>
* the block data type
* @param <B>
* the block type
* @throws IOException
* the exception
*/
public <T, B extends DataBlock<T>> void read(final B dataBlock, final InputStream in) throws IOException;
}
5 changes: 5 additions & 0 deletions src/main/java/org/janelia/saalfeldlab/n5/BlockWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ public interface BlockWriter {
* Writes a {@link DataBlock} into an {@link OutputStream}.
*
* @param dataBlock
* the data block
* @param out
* the output stream
* @param <T>
* the block data type
* @throws IOException
* the exception
*/
public <T> void write(final DataBlock<T> dataBlock, final OutputStream out) throws IOException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public void readData(final ByteBuffer buffer) {
if (buffer.array() != getData())
buffer.get(getData());
}

@Override
public int getNumElements() {

return data.length;
}
}
10 changes: 10 additions & 0 deletions src/main/java/org/janelia/saalfeldlab/n5/Bzip2Compression.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,14 @@ public Bzip2Compression getWriter() {

return this;
}

@Override
public boolean equals(final Object other) {

if (other == null || other.getClass() != Bzip2Compression.class)
return false;
else
return blockSize == ((Bzip2Compression)other).blockSize;
}

}
Loading