Skip to content

Commit

Permalink
wip!
Browse files Browse the repository at this point in the history
  • Loading branch information
tsibley committed Nov 3, 2021
1 parent e9a9aa6 commit 2e5e189
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 972 deletions.
74 changes: 0 additions & 74 deletions .readthedocs-requirements.txt

This file was deleted.

5 changes: 4 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ sphinx:
python:
version: 3.6
install:
- requirements: .readthedocs-requirements.txt
- method: pip
path: .
extra_requirements:
- dev
13 changes: 0 additions & 13 deletions Pipfile

This file was deleted.

869 changes: 0 additions & 869 deletions Pipfile.lock

This file was deleted.

4 changes: 2 additions & 2 deletions devel/doc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ main() {
}

rebuild() {
pipenv run make clean
pipenv run make dirhtml
make clean
make dirhtml

pushd _build/dirhtml
kill %
Expand Down
11 changes: 11 additions & 0 deletions devel/setup-venv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -euo pipefail

base="$(realpath "$(dirname "$0")/..")"
venv="$base/.venv"

set -x
rm -rf "$venv"
python3.6 -m venv "$venv"
"$venv"/bin/pip install --upgrade pip setuptools wheel pip-tools
"$venv"/bin/pip install -e '.[dev]'
7 changes: 7 additions & 0 deletions devel/venv-run
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -eou pipefail

base="$(realpath "$(dirname "$0")/..")"

source "$base/.venv/bin/activate"
exec "$@"
36 changes: 24 additions & 12 deletions doc/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,36 @@ Versions for this project follow the [Semantic Versioning rules][].

## Setup

You can use [Pipenv](https://pipenv.pypa.io) to spin up an isolated development
environment:
Setup an isolated development environment in `.venv/` with:

pipenv sync --dev
pipenv run nextstrain --help
./devel/setup-venv

The Pipenv development environment includes our dev tools (described below):
Activate the venv to run any of the commands below:

pipenv run pytest # runs doctests as well as mypy and flake8
pipenv run mypy nextstrain
pipenv run flake8
source .venv/bin/activate

(Or alternatively, run the commands below via `./devel/venv-run …`.)

Now test that you can run:

nextstrain --help

The development environment includes our dev tools (described below):

pytest # runs doctests as well as mypy and flake8
mypy nextstrain
flake8

## Running with local changes

From within a clone of the git repository you can run `./bin/nextstrain` to
test your local changes without installing them. (Note that `./bin/nextstrain`
is not the script that gets installed by pip as `nextstrain`; that script is
generated by the `entry_points` configuration in `setup.py`.)
The project is installed into editable mode when using the venv setup above, so
any changes you make during development will be used automatically.

If you need to run with local changes in setups without editable mode, you can
run `./bin/nextstrain` to test your local changes without installing them.
(Note that `./bin/nextstrain` is not the script that gets installed by pip as
`nextstrain`; that script is generated by the `entry_points` configuration in
`setup.py`.)

## Releasing

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def find_namespaced_packages(namespace):
"pytest-mypy",
"recommonmark",
"sphinx>=3",
"sphinx-argparse",
"sphinx-argparse ~=0.3",
"sphinx-markdown-tables",
"sphinx_rtd_theme",
"types-setuptools",
Expand Down

0 comments on commit 2e5e189

Please sign in to comment.