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.
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 .
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"
]
}
setup.cfg
: If present, theoptions.install_requires
list is parsed intopython_requirements
.requirements.txt
Is parsed intopython_requirements
if present andsetup.cfg
is not present.
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).