Skip to content

Resolve all input file paths - #2051

Draft
victorlin wants to merge 6 commits into
masterfrom
victorlin/resolve-input-file-paths
Draft

victorlin wants to merge 6 commits into
masterfrom
victorlin/resolve-input-file-paths

Conversation

@victorlin

Copy link
Copy Markdown
Member

Description of proposed changes

Snippet from main commit:

This marks input files using a dedicated InputFile argparse type. Instead of simply treating it as a string to be evaluated downstream, it is now resolved to an absolute path. This is useful for workflows that define AUGUR_SEARCH_PATHS to support user analysis directories with nextstrain run.

Related issue(s)

Follow-up to #2049 (comment)

Checklist

  • Apply to other commands for consistency?
  • 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

The test was passing even with the typo because a nonexistent file still
raises AlignmentError.
This avoids the assumption that a file existence check has not run,
which may change with implementations unrelated to what these tests are
targeting.
@victorlin victorlin self-assigned this Sep 23, 2026
@victorlin
victorlin added this pull request to stack #2052 September 23, 2026 22:01
This hasn't been useful in our workflows. Removing it now to simplify
future work around --config to other commands. The same goes for the
search_paths parameter to get_referenced_files.

FIXME: add to changelog
To be used in the following commit. 2 additional improvements:

1. Made config_file optional
2. Added a clear docstring
This marks input files using a dedicated InputFile argparse type.
Instead of simply treating it as a string to be evaluated downstream, it
is now resolved to an absolute path. This is useful for workflows that
define AUGUR_SEARCH_PATHS to support user analysis directories with
`nextstrain run`.

Tests have been updated to reflect that file paths are now stored
internally as resolved absolute paths.

FIXME: add changelog entry

FIXME: apply to other commands too?
The InputFile type resolves values to an absolute path, which naturally
includes a check for file existence and errors if it cannot be found
anywhere. This commit removes similar checks from downstream code.
@victorlin
victorlin force-pushed the victorlin/resolve-input-file-paths branch from 81f9cf4 to 10c136e Compare September 23, 2026 22:07
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.78082% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.39%. Comparing base (0d28749) to head (10c136e).

Files with missing lines Patch % Lines
augur/export_v2.py 76.92% 3 Missing ⚠️
augur/subsample.py 50.00% 2 Missing ⚠️
augur/refine.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2051      +/-   ##
==========================================
+ Coverage   74.30%   74.39%   +0.09%     
==========================================
  Files          86       86              
  Lines       10767    10743      -24     
  Branches     2099     2093       -6     
==========================================
- Hits         8000     7992       -8     
+ Misses       2378     2365      -13     
+ Partials      389      386       -3     

☔ View full report in Codecov by Harness.
📢 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.

@victorlin
victorlin removed this pull request from stack #2052 September 26, 2026 00:46
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.

1 participant