-
Notifications
You must be signed in to change notification settings - Fork 12
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
Adds create-config entry point #758
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #758 +/- ##
==========================================
+ Coverage 84.25% 84.32% +0.07%
==========================================
Files 21 21
Lines 3105 3119 +14
==========================================
+ Hits 2616 2630 +14
Misses 489 489 ☔ View full report in Codecov by Sentry. |
a9de1ed
to
46092fc
Compare
Closes #757 Adds a `topostats create-config` entry point and removes reference to `run_topostats`. As we move towards a new release having a modular interface is desirable and that includes generation of sample configuration files. This commit brings the "swiss army knife" approach of `topostats <subcommand>`to parity with the older `run_topostats` by adding `topostats create-config` to generate configuration files for users to edit. Documentation has been updated to reflect these changes, including the `README.md`. Because we have versioned documentation users will still be able to refer to the older documentation. For now the `run_topostats` method remains but raises a deprecation warning if the `--create-config-file` option is used. **NB** This work was undertaken as a consequence of re-writing the `.github/ISSUE_TEMPLATES/` so that the instructions could use this new entry point (see separate Pull Request).
46092fc
to
c9926ef
Compare
This branch/PR adds a new sub-process for creating configuration files and so we no longer need the option to `topostats process` to `--create-config_file`. For now the functionality remains in place in `topostats/run_topostats.py` so that the legacy entry point will run. + Added a small amount to the `docs/usage.md` file to indicate how to find out what options are possible to the `topostats process` sub-command and `topostats create-config` sub-command. + In the flag names that are used we had a mixture of `-` and `_` separating words these are now all consistent (and use `-`) + Added another parameter to one of the tests, just for fun!
Only had `-c` as an option, adds a longer form flag.
Seems its not possible to partially remove this option so I've removed it completely, we should be encouraging users to adopt to the new set of entry points.
I've addressed #761, once this PR is approved and merged I'll add that in (trying to stay focused and avoid drift on PRs and keep it to small chunks of work). |
Closes #757
Adds a
topostats create-config
entry point and removes reference torun_topostats
.As we move towards a new release having a modular interface is desirable and that includes generation of sample configuration files. This commit brings the "swiss army knife" approach of
topostats <subcommand>
to parity with the olderrun_topostats
by addingtopostats create-config
to generate configuration files for users to edit.Documentation has been updated to reflect these changes, including the
README.md
. Because we have versioned documentation users will still be able to refer to the older documentation.For now the
run_topostats
method remains but raises a deprecation warning (UserWarning
) if the--create-config-file
option is used.Future Extension
Currently TopoStats is designed to work primarily with nucelic acid samples and in most cases the
topostats/default_config.yaml
which serves as a basis for generating configuration samples is a good starting point.However, there are other types of samples that may be scanned, silicone, large molecular structures such as proteins, prokaryotic and eukaryotic cells. These might require a different set of default parameters.
With this in mind I have implemented what I hope is a method for provisioning such configurations once sensible defaults have been determined. This would work via the
topostats create-config --config <sample_type>
option and for each<sample_type>
there would be atopostats/<sample_type>_config.yaml
in the TopoStats repository/package from which the resulting output would be derived.To this end a check is made whether the specified configuration is available and it fails telling the user that no such config is available if incorrectly specified. An appropriate test has been added to the test suite to cover this.
NB This work was undertaken as a consequence of re-writing the
.github/ISSUE_TEMPLATES/
so that the instructions could use this new entry point (see #759 ).