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

feature: Adds filter sub-command #1071

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

ns-rse
Copy link
Collaborator

@ns-rse ns-rse commented Jan 15, 2025

Closes #741

Adds the "swiss-army knife" component to run just filtering on files so users can now run just the filtering step.

topostats filter --help
topostats filter

This involved modifying how the .topostats files are loaded and extracted because of the nesting (see #1068).

The tests/resources/test_image/minicircle_small.topostats was version 0.1 and failed the updates and tests that now
work with 0.2. I've therefore updated this test file and tweaked the associated tests to work with these files.

All tests pass locally (watch them fail on CI!).

(These checks came in handy as it reminded me to add the new option to docs/configuration.md 😄 ).

Before submitting a Pull Request please check the following.

  • Existing tests pass.
  • Documentation has been updated and builds. Remember to update as required...
    • docs/configuration.md
    • docs/usage.md
    • docs/data_dictionary.md
    • docs/advanced.md and new pages it should link to.
  • Pre-commit checks pass.
  • New functions/methods have typehints and docstrings.
  • New functions/methods have tests which check the intended behaviour is correct.
  • There is a comment adjacent to the option explaining what it is and the valid values.
  • A check is made in topostats/validation.py to ensure entries are valid.
  • Add the option to the relevant sub-parser in topostats/entry_point.py.

ns-rse and others added 2 commits January 15, 2025 14:45
Closes #741

Adds the "swiss-army knife" component to run just filtering on files.

This involved modifying how the `.topostats` files are loaded and extracted because of the nesting (see #1068).

Tests currently fail because the `tests/resources/test_image/minicircle_small.topostats` is version `0.1` and doesn't
therefore work with the refactored structure (surprised #1068 passed all tests actualy!).

A separate commit will be made for updating this test file and the associated tweaking of tests.
The `tests/resources/test_image/minicircle_small.topostats` was version `0.1` and failed the updates and tests that now
work with `0.2`. I've therefore updated this test file and tweaked the associated tests to work with these files.

All tests pass locally (watch them fail on CI!).
@ns-rse
Copy link
Collaborator Author

ns-rse commented Jan 15, 2025

I was 1/3 right, its only Windows where its failing in CI!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter entry point
2 participants