Repository navigation
refactor: make config paths relative to a base_path - #7
Conversation
|
Current state of the branch should solve the missing sample files issue. Indeed, triggering the default runs in the In my opinion, we could:
|
Sergio-ote
left a comment
There was a problem hiding this comment.
Hey @dgruano, sorry it took me some time to review this, great additions as always! Here a couple of comments:
Keeping .test as the default makes sense for catalog linting. Could we add a comment beside directory: .test in profiles/default/config.yaml explaining that it loads .test/config/config.yaml? For their own data, users should switch to directory: . when running from the repository root, then configure the root config and sample sheets. A short note in the quickstart would also help.
Also, one functional issue. The expansion helper prints to stdout, so --rulegraph produces expansion messages before the DOT graph. Could we remove those prints or send them to stderr?
Last, you left a #TODO in the config with your personal paths, remember to change it.
|
Thanks for your comments @Sergio-ote ! I accepted your suggestions and am working on cleaning up the documentation about the paths. Looking closer, I see three types of paths to configure:
Also, while documenting the changes I noticed two things I'd like to discuss:
Happy to chat about this |
|
Hey @dgruano, thanks again for your comments, really useful. The For the exploration queries, I think it is a good idea to set it as |
|
Hey @dgruano, I have just merged PR #8, so this stack should be updated with respect to Once merged into Thanks a lot for the help here, really pushing the work quality! |
- Define base_path in config.yaml - Incldue base_path in config.schema.yaml - Define all project paths relative to base_path - Include instructions on how to correctly define such paths - Add function to parse all config variables and expand base_path - Include common.smk before config loading and processing - Validate config schema after expanding base_path
- Updated .test config.yaml to include base_dir variable - Set directory: .test under the default profile Default workflow now runs under .test directory
- replace machine-specific paths with configurable placeholders - document profile working-directory requirements - fix Xenium output path handling - set default gene query and cell marker files
b7d1d53 to
e04629c
Compare
|
I will skip for this once the "separation of concerns": I have edited the development environment to include |
What & why
As discussed with @Sergio-ote , and related to #3, linting test currently fails on the workflow catalog:
This is a custom error raised correctly as a sanity check that each declared sample has an associated file under <contract_dir>/.h5ad. However, this is a check that should not be triggered during linting.
The easy way to fix this would be to place the sanity-check code under a
onstart:block, which would relegate the check to run only during a real run (not withsnakemake -norsnakemake --lint. Problem solved.However, we realised the underlying problem is that current configuration points to files that do not exist in the repo (Sergio's scratch and development environment) instead of using proper defaults, such as
.testdataset paths.The goals of this PR are to:
To address the first item, I did:
I am creating this PR as a draft for improved collaboration.
Validation
.test/.test/dry-run builds the CoreBlock DAGworkflow/schemas/config.schema.yamlmkdocs build --strictpasses, if documentation was changed.smkrules and scripts; documentation was updated if behaviour changed