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

adding checks for local flag #249

Merged
merged 4 commits into from
Jun 20, 2022
Merged

adding checks for local flag #249

merged 4 commits into from
Jun 20, 2022

Conversation

bruvio
Copy link
Collaborator

@bruvio bruvio commented Jun 8, 2022

I need help as I do not know how to do it...

@bruvio bruvio requested a review from RyanJField June 8, 2022 11:00
@bruvio
Copy link
Collaborator Author

bruvio commented Jun 8, 2022

@RyanJField
the test.yaml file I have in my local folder is this:

read:
- data_product: SEIRS_model/parameters
  use:
    namespace: PSU
    version: 1.0.0
run_metadata:
  default_input_namespace: unit_testing
  default_output_namespace: testing
  description: SEIRS Model R
  latest_commit: 3c9fbdec1beeec3bfcd22399663756b1112ad888
  local_data_registry_url: http://127.0.0.1:8000/api/
  local_repo: /tmp/tmp_0lnwbju/project
  public: true
  remote_data_registry_url: http://127.0.0.1:8001/api/
  remote_repo: git@notagit.com/nope
  script: R -f inst/extdata/SEIRS.R
  write_data_store: /tmp/tmp_0lnwbju/data_store/
write:
- data_product: model_output
  description: SEIRS model results
  file_type: csv
  use:
    data_product: SEIRS_model/results/model_output/R
    version: 0.0.1
- data_product: figure
  description: SEIRS output plot
  file_type: pdf
  use:
    data_product: SEIRS_model/results/figure/R
    version: 0.0.1

and the folder /tmp/tmp_0lnwbju is the one causing the error.
is there a way to not hardcode folders in the config file?

@bruvio
Copy link
Collaborator Author

bruvio commented Jun 8, 2022

@RyanJField
I changed the config file to:

read:
- data_product: SEIRS_model/parameters
  use:
    namespace: PSU
    version: 1.0.0
run_metadata:
  default_input_namespace: unit_testing
  default_output_namespace: testing
  description: SEIRS Model R
  latest_commit: 3c9fbdec1beeec3bfcd22399663756b1112ad888
  local_data_registry_url: http://127.0.0.1:8000/api/
  # local_repo: /tmp/tmp_0lnwbju/project
  public: true
  remote_data_registry_url: http://127.0.0.1:8001/api/
  remote_repo: git@notagit.com/nope
  script: R -f inst/extdata/SEIRS.R
  # write_data_store: /tmp/tmp_0lnwbju/data_store/
write:
- data_product: model_output
  description: SEIRS model results
  file_type: csv
  use:
    data_product: SEIRS_model/results/model_output/R
    version: 0.0.1
- data_product: figure
  description: SEIRS output plot
  file_type: pdf
  use:
    data_product: SEIRS_model/results/figure/R
    version: 0.0.1

and then run the following commands:

   fair purge --all
   fair purge --global
   fair registry start
   fair init --ci --local
   fair pull --local test.yaml 

and I get
Data product 'PSU:SEIRS_model/parameters@v1.0.0' already present on remote 'origin', ignoring.

@bruvio
Copy link
Collaborator Author

bruvio commented Jun 8, 2022

this breaks the standard call to init and pull, i.e. without the flag local.

@sonarcloud
Copy link

sonarcloud bot commented Jun 20, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bruvio bruvio marked this pull request as ready for review June 20, 2022 09:55
@bruvio bruvio merged commit 49dbd33 into develop Jun 20, 2022
@RyanJField RyanJField deleted the hotfix/issue-245 branch September 8, 2022 12:48
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