From 25d948b0ee95f9bd30d9688345ba54d41587e180 Mon Sep 17 00:00:00 2001 From: Hemna Date: Wed, 6 Jan 2021 19:55:02 -0500 Subject: [PATCH] Updated README to include development env This patch shows how to setup a development environment. Please use the steps as laid out and install the pre-commit hooks to ensure the code is clean prior to commit. --- ChangeLog | 1 + README.rst | 23 ++++++++----- requirements.in | 1 + requirements.txt | 88 +++++++++++++++++++++++++++++++++++++----------- 4 files changed, 85 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51d5364..a105123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ CHANGES v1.5.0 ------ +* Updated README to include development env * Added pre-commit hooks * Update Changelog for v1.5.0 * Added QueryPlugin resend all delayed msgs or Flush diff --git a/README.rst b/README.rst index a616292..a540d8d 100644 --- a/README.rst +++ b/README.rst @@ -337,10 +337,17 @@ AND... ping, fortune, time..... Development ------------ +=========== + +* git clone git@github.com:craigerl/aprsd.git +* cd aprsd +* virtualenv .venv +* source .venv/bin/activate +* pip install -e . +* pre-commit install Workflow -======== +-------- While working aprsd, The workflow is as follows @@ -348,11 +355,11 @@ While working aprsd, The workflow is as follows * run tox -epep8 * run tox -efmt * run tox -p -* git commit +* git commit ( This will run the pre-commit hooks which does checks too ) Release -======= +------- To do release to pypi: @@ -382,7 +389,7 @@ Docker Container ---------------- Building -======== +-------- There are 2 versions of the container Dockerfile that can be used. The main Dockerfile, which is for building the official release container @@ -391,18 +398,18 @@ which is used for building a container based off of a git branch of the repo. Official Build -============== +-------------- docker build -t hemna6969/aprsd:latest . Development Build -================= +----------------- docker build -t hemna6969/aprsd:latest -f Dockerfile-dev . Running the container -===================== +--------------------- There is a docker-compose.yml file that can be used to run your container. There are 2 volumes defined that can be used to store your configuration diff --git a/requirements.in b/requirements.in index 3d89156..e81f136 100644 --- a/requirements.in +++ b/requirements.in @@ -9,3 +9,4 @@ requests thesmuggler aprslib py3-validate-email +pre-commit diff --git a/requirements.txt b/requirements.txt index 99304d9..8fbbf88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,23 +4,71 @@ # # pip-compile # -aprslib==0.6.47 # via -r requirements.in -certifi==2020.12.5 # via requests -chardet==4.0.0 # via requests -click-completion==0.5.2 # via -r requirements.in -click==7.1.2 # via -r requirements.in, click-completion -dnspython==2.0.0 # via py3-validate-email -filelock==3.0.12 # via py3-validate-email -idna==2.10 # via py3-validate-email, requests -imapclient==2.1.0 # via -r requirements.in -jinja2==2.11.2 # via click-completion -markupsafe==1.1.1 # via jinja2 -pbr==5.5.1 # via -r requirements.in -pluggy==0.13.1 # via -r requirements.in -py3-validate-email==0.2.12 # via -r requirements.in -pyyaml==5.3.1 # via -r requirements.in -requests==2.25.1 # via -r requirements.in -shellingham==1.3.2 # via click-completion -six==1.15.0 # via -r requirements.in, click-completion, imapclient -thesmuggler==1.0.1 # via -r requirements.in -urllib3==1.26.2 # via requests +appdirs==1.4.4 + # via virtualenv +aprslib==0.6.47 + # via -r requirements.in +certifi==2020.12.5 + # via requests +cfgv==3.2.0 + # via pre-commit +chardet==4.0.0 + # via requests +click-completion==0.5.2 + # via -r requirements.in +click==7.1.2 + # via + # -r requirements.in + # click-completion +distlib==0.3.1 + # via virtualenv +dnspython==2.0.0 + # via py3-validate-email +filelock==3.0.12 + # via + # py3-validate-email + # virtualenv +identify==1.5.11 + # via pre-commit +idna==2.10 + # via + # py3-validate-email + # requests +imapclient==2.1.0 + # via -r requirements.in +jinja2==2.11.2 + # via click-completion +markupsafe==1.1.1 + # via jinja2 +nodeenv==1.5.0 + # via pre-commit +pbr==5.5.1 + # via -r requirements.in +pluggy==0.13.1 + # via -r requirements.in +pre-commit==2.9.3 + # via -r requirements.in +py3-validate-email==0.2.12 + # via -r requirements.in +pyyaml==5.3.1 + # via + # -r requirements.in + # pre-commit +requests==2.25.1 + # via -r requirements.in +shellingham==1.3.2 + # via click-completion +six==1.15.0 + # via + # -r requirements.in + # click-completion + # imapclient + # virtualenv +thesmuggler==1.0.1 + # via -r requirements.in +toml==0.10.2 + # via pre-commit +urllib3==1.26.2 + # via requests +virtualenv==20.2.2 + # via pre-commit