Skip to content

subsample: Improve default search paths, allow customization - #1918

Merged
victorlin merged 8 commits into
masterfrom
victorlin/subsample-filepath-configs
Nov 18, 2025
Merged

subsample: Improve default search paths, allow customization#1918
victorlin merged 8 commits into
masterfrom
victorlin/subsample-filepath-configs

Conversation

@victorlin

@victorlin victorlin commented Oct 24, 2025

Copy link
Copy Markdown
Member

Description of proposed changes

Previously, the only search path was implicitly the current working directory.

This PR adds another default – the config file's parent directory – and prefers it over cwd. Custom search paths are supported via command line option and environment variable.

Related issue(s)

Notable review threads

Checklist

  • See measles PR for example usage and testing notes
  • Automated checks pass
  • Check if you need to add a changelog message
  • Check if you need to add tests
  • Check if you need to update docs

@victorlin victorlin self-assigned this Oct 24, 2025
@victorlin
victorlin force-pushed the victorlin/subsample-filepath-configs branch from ac75919 to d58a672 Compare October 24, 2025 23:38
@codecov

codecov Bot commented Oct 25, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.30137% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.25%. Comparing base (a30b7f6) to head (1828dde).
⚠️ Report is 66 commits behind head on master.

Files with missing lines Patch % Lines
augur/subsample.py 86.30% 7 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1918      +/-   ##
==========================================
+ Coverage   74.17%   74.25%   +0.08%     
==========================================
  Files          82       82              
  Lines        8984     9052      +68     
  Branches     1827     1847      +20     
==========================================
+ Hits         6664     6722      +58     
- Misses       2017     2024       +7     
- Partials      303      306       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tsibley tsibley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty close to what I meant when I was describing the approach!

A couple small niggles noted.

Comment thread augur/data/schema-subsample-config.json Outdated
Comment thread augur/subsample.py Outdated
Comment thread augur/subsample.py Outdated
Comment thread docs/usage/envvars.rst
Comment thread augur/subsample.py
@victorlin
victorlin force-pushed the victorlin/subsample-filepath-configs branch 2 times, most recently from 0e4f947 to 25c4448 Compare October 31, 2025 04:01
@victorlin
victorlin requested a review from tsibley October 31, 2025 16:45
victorlin and others added 8 commits November 17, 2025 13:51
This makes it easier to add/remove steps.
This will be used in a future commit.
Preparing to use the schema in another function.
Previously, the only search path was implicitly the current working
directory. Make this explicit and add an option to search other paths
before it.

This means the notes in option descriptions mentioning cwd as search
path are no longer accurate for augur subsample. Since the descriptions
are shared with augur filter which does not allow custom search paths, I
figured it'd be best to remove the notes entirely.
This allows more intuitive relative filepaths from the perspective of
the config file.
Environment variables can be easier to use than CLI options in some
situations.
This can be used by Snakemake workflows to declare input files for rules
that call augur subsample.
@victorlin
victorlin force-pushed the victorlin/subsample-filepath-configs branch from 25c4448 to 1828dde Compare November 17, 2025 21:52
@victorlin
victorlin removed the request for review from tsibley November 17, 2025 21:53
@victorlin
victorlin dismissed tsibley’s stale review November 17, 2025 21:53

changes addressed

@victorlin
victorlin merged commit b2f78f0 into master Nov 18, 2025
43 checks passed
@victorlin
victorlin deleted the victorlin/subsample-filepath-configs branch November 18, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

subsample: Improve relative filepath search

2 participants