repo_helper_devenv

Create virtual environments with repo-helper.

Docs

Documentation Build Status Docs Check Status

Tests

Linux Test Status Windows Test Status macOS Test Status Coverage

PyPI

PyPI - Package Version PyPI - Supported Python Versions PyPI - Supported Implementations PyPI - Wheel

Activity

GitHub last commit GitHub commits since tagged version Maintenance PyPI - Downloads

QA

CodeFactor Grade Flake8 Status mypy status

Other

License GitHub top language Requirements Status

Installation

python3 -m pip install repo_helper_devenv --user

Contents

Usage

repo-helper devenv

Create a virtualenv.

repo-helper devenv [OPTIONS] [DEST]

Options

-U, --upgrade

Upgrade all specified packages to the newest available version.

--version

Show the version and exit.

--colour, --no-colour

Whether to use coloured output.

-v, --verbose

Show verbose output.

Arguments

DEST

Optional argument. Default 'venv'

DEST is relative to the repository root.

Changed in version 0.4.0: Added the -U / --upgrade option.

Public API

Create virtual environments with repo-helper.

Functions:

install_requirements(session, requirements_file)

Install requirements into a virtualenv.

mkdevenv(repo_dir[, venv_dir, verbosity, …])

Create a “devenv”.

read_pyvenv(venv_dir)

Reads the pyvenv.cfg for the given virtualenv, and returns a key: value mapping of its contents.

install_requirements(session, requirements_file, verbosity=1, *, upgrade=False)[source]

Install requirements into a virtualenv.

Parameters
  • session (Session)

  • requirements_file (Union[str, Path, PathLike])

  • verbosity (int) – The verbosity of the function. 0 = quiet, 2 = very verbose. Default 1.

  • upgrade (bool) – Whether to upgrade all specified packages to the newest available version. Default False.

Changed in version 0.4.0: Added the upgrade keyword-only argument.

Deprecated since version 0.5.0: This will be removed in 1.0.0.

mkdevenv(repo_dir, venv_dir='venv', verbosity=1, *, upgrade=False)[source]

Create a “devenv”.

New in version 0.3.2.

Parameters
  • repo_dir (Union[str, Path, PathLike]) – The root of the repository to create the devenv for.

  • venv_dir (Union[str, Path, PathLike]) – The directory to create the devenv in, relative to repo_dir. Default 'venv'.

  • verbosity (int) – The verbosity of the function. 0 = quiet, 2 = very verbose. Default 1.

  • upgrade (bool) – Whether to upgrade all specified packages to the newest available version. Default False.

Return type

int

Changed in version 0.4.0: Added the upgrade keyword-only argument.

read_pyvenv(venv_dir)[source]

Reads the pyvenv.cfg for the given virtualenv, and returns a key: value mapping of its contents.

New in version 0.3.2.

Parameters

venv_dir (Union[str, Path, PathLike])

Return type

Dict[str, str]

Deprecated since version 0.4.0: This will be removed in 1.0.0. Use ‘shippinglabel.read_pyvenv’ instead.

Downloading source code

The repo_helper_devenv source code is available on GitHub, and can be accessed from the following URL: https://github.com/repo-helper/repo_helper_devenv

If you have git installed, you can clone the repository with the following command:

git clone https://github.com/repo-helper/repo_helper_devenv
Cloning into 'repo_helper_devenv'...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 173 (delta 16), reused 17 (delta 6), pack-reused 126
Receiving objects: 100% (173/173), 126.56 KiB | 678.00 KiB/s, done.
Resolving deltas: 100% (66/66), done.
Alternatively, the code can be downloaded in a ‘zip’ file by clicking:
Clone or download –> Download Zip
Downloading a 'zip' file of the source code.

Downloading a ‘zip’ file of the source code

Building from source

The recommended way to build repo_helper_devenv is to use tox:

tox -e build

The source and wheel distributions will be in the directory dist.

If you wish, you may also use pep517.build or another PEP 517-compatible build tool.

License

repo_helper_devenv is licensed under the MIT License

A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

Permissions Conditions Limitations
  • Commercial use
  • Modification
  • Distribution
  • Private use
  • Liability
  • Warranty

Copyright (c) 2020 Dominic Davis-Foster

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.

View the Function Index or browse the Source Code.

Browse the GitHub Repository