Skip to content

Determine the environment required for a given (app) repository.

License

Notifications You must be signed in to change notification settings

aiidalab/repo2env

Repository files navigation

repo2env

Determine the environment specification for a given (app) repository.

This tool parses an (app) repository and determines requirements similar to repo2docker. But instead of generating a docker image it returns a specification that can then be used to build the environment.

Installation

The easiest way to install this tool is either directly with pip:

~ $ pip install repo2env

Or clone the repository first and then install:

~ $ git clone https://github.com/aiidalab/repo2env.git
~ $ cd repo2env/
~/repo2env $ pip install .

Usage

Use the repo2env command to parse the environment of a local or remote (app) repository:

For a local repository, just provide the path:

~ $ repo2env /path/aiidalab-hello-world/
{"python_requirements": ["aiidalab>=20.02.0b2"]}

For a remote repository, provide a PEP 508 compliant URL, for example:

~ $ repo2env git+https://github.com/aiidalab/[email protected]
{"python_requirements": ["aiidalab>=20.02.0b2"]}

The output is JSON-formatted and can then be used for further processing.

Tip: Use jq to generate pretty-printed output for manual inspection:

$ repo2env ~/local/aiidalab/aiidalab-hello-world/ | jq .
{
  "python_requirements": [
    "aiidalab>=20.02.0b2"
  ]
}

What is parsed

  • setup.cfg: If present, the options.install_requires list is parsed into python_requirements.
  • requirements.txt Is parsed into python_requirements if present and setup.cfg is not present.

Acknowledgements

This work is supported by the MARVEL National Centre for Competency in Research funded by the Swiss National Science Foundation, as well as by the MARKETPLACE project funded by Horizon 2020 under the H2020-NMBP-25-2017 call (Grant No. 760173).

About

Determine the environment required for a given (app) repository.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages