Skip to main content

Automated environment parsing for AiiDAlab apps.

Project description

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 git+https://github.com/aiidalab/repo2env.git

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/aiidalab-hello-world.git@v1.0.0
{"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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repo2env-0.1.2.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

repo2env-0.1.2-py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page