Repository navigation
feat(workflow): pull_dataset can pull to a given directory - #208
Merged
Merged
Conversation
pull_dataset always pulled to the site's root mount from the datatrail config, which on CANFAR is /arc and shared by every session. A `directory` argument lets a step pull somewhere else, e.g. the session's own /scratch, which reads much faster than /arc. Also fixes `pull --directory`: click drops the trailing slash, so the check for files already there looked in e.g. /scratchdata/... and every file was downloaded again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #208 +/- ##
==========================================
- Coverage 88.29% 83.58% -4.71%
==========================================
Files 35 35
Lines 4655 4679 +24
==========================================
- Hits 4110 3911 -199
- Misses 545 768 +223 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
masonng-astro
approved these changes
Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The CANFAR baseband localization reads its raw data from
/arc(CephFS). A probe session on 2026-11-01 read 2 GB from/arcat 68 MB/s but from the session's/scratch(node-local ext4, empty at start and gone with the session) at 3.7 GB/s. To use it, the localization will pull the raw data into its own session's/scratch(baseband-analysis PR to follow).dtcli.workflow.pull_datasetalways pulled to the site's root mount from~/.datatrail/config.yaml. On CANFAR that file is in the shared home, so changing it would redirect every session's pulls.What
pull_dataset(..., directory=None): when it's given, it's created if needed, passed topull --directory, and used for the check that every file arrived. Files land at<directory>/data/chime/baseband/raw/..., as under the root mount.pull --directory: click'sresolve_pathdrops the trailing slash, and the check for files already there joins with+, so it looked in/scratchdata/..., found nothing, and downloaded everything again. The directory now ends with a slash.docs/workflow.md: documentsdirectory.Tests
test_pull_dataset_pulls_to_a_given_directoryandtest_pull_checks_a_given_directory_for_existing_files. The second one fails without the fix.tests/test_workflow.py,test_pull_*: 88 passed.test_cli.pyfailures as on main (they need the live Datatrail services).Needs a release (1.2.0) before baseband-analysis can depend on it.
🤖 Generated with Claude Code