Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 1.78 KB

File metadata and controls

82 lines (59 loc) · 1.78 KB

Contributions via PR to this repo are welcome. Please fork the repo, work on your feature or change using the guide below, and then make a PR against this repo. The team will review the PR and work with you to get it merged. Thanks!

install pipx

pipx installation instructions

e.g. for macOS

brew install pipx
pipx ensurepath

install poetry

poetry

e.g.

pipx install poetry

install dev dependencies

poetry install --with dev

Poetry will also install a script so the cli can be run using cnc as if there was a binary installed.

start a shell in the python virtual env

# starts a login shell in the virtual env created by poetry
# pre-requisite for the following commands (python shell, cli, etc.)
eval $(poetry env activate)

running the tests

Run this in the src dir after running poetry shell as per above.

pytest

You can also run something like this to run one class (no need to qualify with path): pytest -k EnvironmentCollectionExistingDBTestCase -v

start an interactive python shell (ipython)

You can do this from anywhere once you have activated poetry shell

cnc shell start

e.g.:

  • start in your cnc repo
  • poetry shell
  • cd ../MY_SITE_DIR
  • cnc shell start

running the cli

cnc --help

dependencies

Python

developed using python 🐍 >= 3.9 (check yours with python --version)

There's a codespace set up in the repo where you just run poetry shell and you're all set to work, that's the easiest place to be.

Releasing a new version

Setup PyPI creds

e.g. populate ~/.pypirc

Steps

  • python3 -m pip install --upgrade build
  • python3 -m build
  • python3 -m twine upload dist/*