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

Fix new bugs #73

Merged
merged 18 commits into from
Sep 15, 2021
Merged

Fix new bugs #73

merged 18 commits into from
Sep 15, 2021

Conversation

richardreeve
Copy link
Member

@soniamitchell - can you check this works please?

@soniamitchell
Copy link

soniamitchell commented Sep 15, 2021

Testing:

  • fixes fair pull is registering external DataProducts as file_type py and registers file types correctly
  • fixes Register a Namespace entry in fair init and registers user namespace automatically in fair init
  • fixes remote_repo is missing from the working config and adds remote_repo: to run_metadata:
  • fixes run_metadata: write_data_store: value needs to end in a slash and adds a path separator to folder names

@soniamitchell
Copy link

soniamitchell commented Sep 15, 2021

  • when write_data_store is included in the user-written config, fair run doesn't check whether it ends in a slash
  • fair init --using sonia.yaml no longer works correctly (and so checking the Namespace entry is incomplete) - fair is unable to find the registry:
Initialised empty fair repository in /Users/Soniam/Desktop/git/FAIRDataPipeline/rSimpleModel/.fair
Error: Failed to find local registry executable      
'/Users/runner/work/SimpleModel/SimpleModel/.fair/registry/scripts/start_fair_registry', is the FAIR data pipeline properly    installed on this system?  
  • when running through fair init, curser keys / tab complete are inoperable - I'd like to be able to paste and edit
  • after fair init is complete:
Initialised empty fair repository in /Users/Soniam/Desktop/git/FAIRDataPipeline/rSimpleModel/.fair
Traceback (most recent call last):
  File "/Users/Soniam/Library/Caches/pypoetry/virtualenvs/fair-cli-kJcAWAhH-py3.7/bin/fair", line 5, in <module>
    cli()
  File "/Users/Soniam/Library/Caches/pypoetry/virtualenvs/fair-cli-kJcAWAhH-py3.7/lib/python3.7/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/Users/Soniam/Library/Caches/pypoetry/virtualenvs/fair-cli-kJcAWAhH-py3.7/lib/python3.7/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/Users/Soniam/Library/Caches/pypoetry/virtualenvs/fair-cli-kJcAWAhH-py3.7/lib/python3.7/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/Soniam/Library/Caches/pypoetry/virtualenvs/fair-cli-kJcAWAhH-py3.7/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/Soniam/Library/Caches/pypoetry/virtualenvs/fair-cli-kJcAWAhH-py3.7/lib/python3.7/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/Users/Soniam/Desktop/git/FAIRDataPipeline/FAIR-CLI/fair/cli.py", line 120, in init
    export_as=export
  File "/Users/Soniam/Desktop/git/FAIRDataPipeline/FAIR-CLI/fair/session.py", line 605, in initialise
    _uri
  File "/Users/Soniam/Desktop/git/FAIRDataPipeline/FAIR-CLI/fair/registry/storage.py", line 349, in store_namespace
    uri, "namespace", data=_data, params={"name": namespace_label}
  File "/Users/Soniam/Desktop/git/FAIRDataPipeline/FAIR-CLI/fair/registry/requests.py", line 407, in post_else_get
    token = local_token()
  File "/Users/Soniam/Desktop/git/FAIRDataPipeline/FAIR-CLI/fair/registry/requests.py", line 65, in local_token
    _local_token_file = os.path.join(fdp_com.registry_home(), "token")
  File "/Users/Soniam/Desktop/git/FAIRDataPipeline/FAIR-CLI/fair/common.py", line 53, in registry_home
    _glob_conf = yaml.safe_load(open(global_fdpconfig()))
FileNotFoundError: [Errno 2] No such file or directory: '/Users/Soniam/.fair/cli/cli-config.yaml'

@richardreeve
Copy link
Member Author

  • when write_data_store is included in the user-written config, fair run doesn't check whether it ends in a slash
    @soniamitchell - hopefully this is fixed now.

@richardreeve
Copy link
Member Author

richardreeve commented Sep 15, 2021

  • fair init --using sonia.yaml no longer works correctly (and so checking the Namespace entry is incomplete) - fair is unable to find the registry:
Initialised empty fair repository in /Users/Soniam/Desktop/git/FAIRDataPipeline/rSimpleModel/.fair
Error: Failed to find local registry executable      
'/Users/runner/work/SimpleModel/SimpleModel/.fair/registry/scripts/start_fair_registry', is the FAIR data pipeline properly    installed on this system?  

If that problem is mine, could you give me your sonia.yaml via Zulip, because I can't reproduce it... thanks! Also:

  • when running through fair init, curser keys / tab complete are inoperable - I'd like to be able to paste and edit

This isn't fixable (at least by me!), sorry...

@soniamitchell
Copy link

Turns out it works fine 👍 it was a problem with local: data_store: and local: directory:, perhaps a check could be made as to whether local: directory: is accurate prior to initialising the empty fair repository?

@richardreeve
Copy link
Member Author

Turns out it works fine 👍 it was a problem with local: data_store: and local: directory:, perhaps a check could be made as to whether local: directory: is accurate prior to initialising the empty fair repository?

Great. Maybe add a new issue for this because I can't fix it now though...

@richardreeve
Copy link
Member Author

@soniamitchell - okay, maybe(?!) fixed now. This may also accidentally fix #74 btw.

@richardreeve
Copy link
Member Author

Nope - maybe not. Fixed a few problems, but created a new one...

@sonarcloud
Copy link

sonarcloud bot commented Sep 15, 2021

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 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@richardreeve
Copy link
Member Author

Okay - trying this again @soniamitchell - I think it really is fixed now. This may also accidentally fix #74 btw. It gives inscrutable errors when you do things in the wrong order sadly, but otherwise I hope good?

@richardreeve richardreeve merged commit 6a00a87 into dev Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants