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

PFHub CLI tool #1510

Draft
wants to merge 71 commits into
base: master
Choose a base branch
from
Draft

PFHub CLI tool #1510

wants to merge 71 commits into from

Conversation

wd15
Copy link
Collaborator

@wd15 wd15 commented Aug 7, 2023

A CLI to download, submit and convert PFHub results

Some of these commits are in #1508

Todo:

  • implementing convert-to-zenodo
    • return unpacked files
  • ensure that the schema.yaml file is installed
  • clean up for push to github
  • test without pfhub working copy available in github actions
  • implement pfhub.yaml check
  • download from a pfhub record name
  • allow download_zenodo to use local files and keep the URLs
  • implement convert-to-meta
  • check two way conversion
  • API docs?
  • ensure validate checks the specific data for each benchmark

Ideas:

  • pfhub upload {zenodo-record} --sandbox ???
    • upload to zenodo
    • sandbox=true to submit to Zenodo sandbox
    • require a ~.pfhubrc file locally to set parameters for zenodo and pfhub submission
    • use zenodo-client for submission
  • pfhub submit --path=./ --config_path=~/pfhubrc --sandbox=true
    • open pfhub PR
  • pfhub convert
    • convert a meta.yaml to pfhub.yaml
  • pfhub check
    • lint a submission
  • pfhub generate_notebook?
    • generates a notebook of the result
  • pfhub generate_yaml?
    • take previous yaml and ask questions maybe
    • question and answer
    • generate from ~/.pfhub.ini
  • Workflow order:
    • download existing record
    • convert or generate_yaml
    • check or generate_notebook
    • upload_to_zenodo
    • submit_to_pfhub
  • Test in environment without pfhub working copy available

Done:

  • submit to pypi testing
  • implemented pfhub CLI
  • tested python-pfhub with pip install
  • implement versioneer
  • add download command for both meta.yaml and Zenodo links

wd15 added 27 commits March 27, 2023 15:51
Zip and unzip are required for zipping files in the upload form.
upload.md is now a notebook in results/ as that directory is the
correct environment.
Implement the conversion of meta.yaml records to a Zenodo record.
Necessary templages for the meta -> zenodo translation
This removes the htmlproofer checks. This isn't currently available in
Nixpkgs and doesn't play well with the jekyll ruby environment in the
latest Nix.
Updated pykwalify so needed to change the schema slightly.
Testing distributing a command line too for pfhub.

 - Add versioneer to deal with version numbers
zenodo_client will be used to upload to zenodo in the CLI. Also added
twine and versioneer to upload to PyPI and genearte version numbers,
respectively.
Update setup.cfg to include all the dependencies to make python-pfhub
work in a Pip/Conda environment. Also, update setup.cfg for CLI script
and versioneer.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@tkphd
Copy link
Collaborator

tkphd commented Aug 8, 2023

Cool!!!

Nix develop was broken in the base directory due to dotwiz after
recent changes. Dotwiz now installed with Nix.

 - Use separate nix file for python packages
 - revert to dotwiz 0.2.0 as easier to install with nix
wd15 added 30 commits August 10, 2023 17:01
CLI tool will check valid files so needs a valid schema present
Run the CLI tool outside of the working copy to ensure that required
files are installed.
CLI now has a validate command to validate YAML files against the
schemas. In addition

 - reorder some of the code
 - using linkml CLI tool from Python
 - make file path checking better with Click arguments
 - make the command names more sensible
 - sys.exit(1) when invalid files
linkml needs to added to nixpkgs along with other libraries
Using _data/python-pfhub/.loca for local python installs.
Reverse order of flake check so that _data/python_pfhub/flake.nix is
first. Checking to see if linkml will work.
Nix build is broken due to unforseen issues with linkml
Greenlet is pinned for linkml which requires it to be pinned. If not
pinned then something else is installing a version to new for linkml.
Download command of the CLI gets records from PFHub only including
linking back to Zenodo. The old download command is not
download_zenodo, which makes more sense.
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.

2 participants