Skip to content
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

Wildcard versioning not working correctly #44

Closed
DennisReddyhoff opened this issue Aug 26, 2021 · 6 comments
Closed

Wildcard versioning not working correctly #44

DennisReddyhoff opened this issue Aug 26, 2021 · 6 comments
Milestone

Comments

@DennisReddyhoff
Copy link
Collaborator

When using wildcards, the version is not correctly returning as '0.0.1'

@kzscisoft
Copy link
Collaborator

@DennisReddyhoff Any details on this? i.e. inputs etc

@richardreeve
Copy link
Member

richardreeve commented Sep 1, 2021

@kzscisoft I understand that when you run a user config with a wildcard in the write block, like test/* with version ${{ PATCH }}, then if it matches one file, say version 0.0.2 of test/first, then when it's writing out the working config, it tells you to use version 0.0.2 of any new wildcard match test/*, like test/second instead of counting from 0.0.0 and giving you 0.0.1 like it should. Does that make sense? I'm sure we can make an example if not!

@kzscisoft
Copy link
Collaborator

kzscisoft commented Sep 1, 2021

So you are saying that the version variables are working but just not for wildcard statements? This could be an ordering thing, maybe I put the wildcard parsing after the version parsing when it should come before.

The versioning should be working for most cases

@kzscisoft
Copy link
Collaborator

Hmm it should be working, I could do with a failing example

@richardreeve
Copy link
Member

Okay. Here you go... I've put three files in Zulip as I can't upload them here. First register.yaml then write.yaml produces config.yaml. This is just Sonia's basic registration example:

(fair-6UDMIGpx-py3.8) (base) bleaberry[~/Documents/git/julia/EcoSISTEM] fair pull register.yaml
Updating registry from config.yaml
(fair-6UDMIGpx-py3.8) (base) bleaberry[~/Documents/git/julia/EcoSISTEM] fair pull write.yaml
Updating registry from config.yaml
(fair-6UDMIGpx-py3.8) (base) bleaberry[~/Documents/git/julia/EcoSISTEM] fair run write.yaml
Updating registry from config.yaml
Hello World!

register.yaml just creates a data product called records/SARS-CoV-2/scotland/human-mortality with version 0.20210901.0. write.yaml then writes to the records/SARS-CoV-2/scotland/*. Then config.yaml then has:

write:
- data_product: records/SARS-CoV-2/scotland/*
  file_type: csv
  use:
    version: 0.20210901.1
- data_product: records/SARS-CoV-2/scotland/human-mortality
  file_type: csv
  use:
    version: 0.20210901.1

This is the right version for records/SARS-CoV-2/scotland/human-mortality, but records/SARS-CoV-2/scotland/* should just be 0.0.1.

@richardreeve
Copy link
Member

Closed in #57.

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 a pull request may close this issue.

3 participants