Skip to main content

ds-reify

Tests PyPI

A CLI helper tool for Distributed-Something

Development

Setup Virtual Environment

Setup a python environment using the method of your choice.

Using the builtin venv:

python -m venv <ENV_NAME>
source <ENV_NAME>/bin/activate

Using conda (replace with any python >= 3.8):

conda create -n <ENV_NAME> python=3.8
conda activate <ENV_NAME>

Using whatever else you want, like pyenv.

Install dev tools

Install Poetry

curl -sSL https://install.python-poetry.org/ | python
source ~/.poetry/env

Install Nox

pip install --user --upgrade nox

See this post if you're curious as to why we don't install nox via Poetry.

Install pre-commit

pip install --user --upgrade pre-commit

Let Poetry install the rest from pyproject.toml

poetry install

Testing

Coverage.py is used for test coverage, alongside pytest, via the pytest-cov plugin.

To run the tests directly, in you virtual environment, run pytest --cov.

To let nox run across multiple isolated environments, run nox.

To avoid nox recreating the virtual environments from scratch on each invocation, run nox -r.

Run a specific test with nox -s tests -- tests/test_TESTNAME.

Static analysis

Autoformatting is performed with Black.

Run formatting with nox -s black or specify files/directors with nox -s black -- file1 dir1 ....

Black auto-formatting is not run by default when running nox in isolation, it must be specified.

Flake8 is used for linting. Under the hood, it uses:

  • pylint
  • pyflakes - invalid python code
    • errors reported as F
  • pycodestyle - PEP 8 style checking
    • W for warnings, E for errors
  • mccabe - code complexity
    • errors reported as C.
  • flake8-black plugin - adherence to Black code style
    • erros reported as BLK.
  • flake8-import-order plugin - import grouping and ordering checked against the Google styleguide
    • errors reported as I
  • flake8-bugbear plugin - various miscellaneous bugs and design problems
    • likely bugs reported as B
    • opinionated bugs reported as B9
    • B950 replaces E501 for max line length checking (adds tolerance margin of 10%)
  • flake8-bandit plugin - uses Bandit to find common security issues
    • issues reported as S
  • flake8-annotations plugin - detects absence of type annotations for functions
    • issues reported as ANN

All of these are configured in the .flake8 file.

Run linting with nox -s lint or specify files/directoriess with nox -s lint -- file1 dir1 ....

Import ordering is not auto-formatted although may in the future by migrating to flake8-isort.

Safety is uesd for checking project dependencies against known security violations. For example, insecure-package.

Run it with nox -s safety.

Pre-commit

If you would like to enable the pre-commit hooks, run pre-commit install.

The hooks will run on files changed by the commit in question. To trigger hooks automatically run pre-commit run --all-files.

Metadata

Release files for ds-reify 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ds-reify 0.1.0
File Size Uploaded
ds_reify-0.1.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ds-reify 0.1.0
File Interpreter ABI Platform
ds_reify-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / ds_reify-0.1.0.tar.gz

Download URL ds_reify-0.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
69e85157810599b041f3ad4d76567693da6b4a730a8a711e48bc3e2c93ebd64f
BLAKE2b-256 checksum
How to use checksums
a743997e9147ab5661980b2c3b944cc994510d38366fb055917606df51334705
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.8.16 Darwin/22.3.0

Release files / ds_reify-0.1.0-py3-none-any.whl

Download URL ds_reify-0.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d0b0f98c877d1941aa8b54fbcdf34aed125b29e5ebb5b125c642681b862e2dc
BLAKE2b-256 checksum
How to use checksums
2c7ce61eea119d174a74fb03c206b9a82835d8147841eb1e4392f656447f7417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.8.16 Darwin/22.3.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page