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

feat: add python -m nd2.index cli #147

Merged
merged 9 commits into from
Jun 24, 2023
Merged

feat: add python -m nd2.index cli #147

merged 9 commits into from
Jun 24, 2023

Conversation

tlambert03
Copy link
Owner

@tlambert03 tlambert03 commented Jun 24, 2023

outputs something like this:

$ python -m nd2.index tests/data
Screen Shot 2023-06-24 at 1 29 17 PM
usage: index.py [-h] [--recurse] [--glob-pattern GLOB_PATTERN]
                [--sort-by COLUMN_NAME] [--format {table,csv,json}]
                [--include INCLUDE] [--exclude EXCLUDE] [--no-header]
                paths [paths ...]

Create an index of important metadata in ND2 files.

Valid column names are:
['path', 'name', 'version', 'kb', 'acquired', 'experiment', 'dtype', 'shape', 'axes',
'software_name', 'software_version', 'grabber']

positional arguments:
  paths                 Path to ND2 file or directory containing ND2 files.

options:
  -h, --help            show this help message and exit
  --recurse, -r         Recursively search directories
  --glob-pattern GLOB_PATTERN, -g GLOB_PATTERN
                        Glob pattern to search for
  --sort-by COLUMN_NAME, -s COLUMN_NAME
                        Column to sort by. If not specified, the order is not guaranteed.
                        To sort in reverse, append a hyphen.
  --format {table,csv,json}, -f {table,csv,json}
  --include INCLUDE, -i INCLUDE
                        Comma-separated columns to include in the output
  --exclude EXCLUDE, -e EXCLUDE
                        Comma-separated columns to exclude in the output
  --no-header           Don't write the CSV header

@tlambert03 tlambert03 changed the title Add index module as a convenience feat: add python -m nd2.index cli Jun 24, 2023
@codecov
Copy link

codecov bot commented Jun 24, 2023

Codecov Report

Merging #147 (aa40fd2) into main (74faef9) will increase coverage by 0.28%.
The diff coverage is 95.03%.

❗ Current head aa40fd2 differs from pull request most recent head 6292005. Consider uploading reports for the commit 6292005 to get more accurate results

@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
+ Coverage   92.64%   92.93%   +0.28%     
==========================================
  Files          14       15       +1     
  Lines        1890     2023     +133     
==========================================
+ Hits         1751     1880     +129     
- Misses        139      143       +4     
Impacted Files Coverage Δ
src/nd2/_pysdk/_pysdk.py 89.27% <86.36%> (-0.44%) ⬇️
src/nd2/_util.py 88.88% <87.50%> (+1.93%) ⬆️
src/nd2/index.py 97.16% <97.16%> (ø)
src/nd2/_pysdk/_chunk_decode.py 85.92% <100.00%> (+1.48%) ⬆️
src/nd2/nd2file.py 95.15% <100.00%> (+0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tlambert03 tlambert03 changed the title feat: add python -m nd2.index cli feat: add python -m nd2.index cli Jun 24, 2023
@tlambert03 tlambert03 merged commit 77663b6 into main Jun 24, 2023
@tlambert03 tlambert03 deleted the index branch June 24, 2023 22:29
@tlambert03 tlambert03 added the enhancement New feature or request label Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant