From 1cf57cb367b519ef5a56462f714cb8fae9c626c0 Mon Sep 17 00:00:00 2001 From: Rupus Reinefjord Date: Sun, 7 Jun 2020 23:04:08 +0200 Subject: [PATCH] Add info about dev setup in readme (pip-tools/venv) --- .gitignore | 1 + README.md | 39 +++++++++++++++++++++++++++++++++++++++ requirements.in | 1 + requirements.txt | 7 +++++++ 4 files changed, 48 insertions(+) create mode 100644 requirements.in create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index 892bee3..27ee1bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ pass.csv +venv/ diff --git a/README.md b/README.md index 27ce3cc..89c4186 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ There are two ways to export CSV data: were used in another field. - `---` Was not included in the notes field because it was matched by `-e`. + ### Example KeePass Generic CSV Importer - Cmd line @@ -95,3 +96,41 @@ There are two ways to export CSV data: - Output CSV row (formatted) sites, example, password123, "---\nusername: user_name\nemail: user@example.com\nurl: example.com\nsome_note" + + +## Development +Create a virtual environment: + +```sh +python3 -m venv venv +``` + +Activate the environment: + +```sh +. venv/bin/activate +``` + +Now you may either use `pip` directly to install the dependencies, or +you can install `pip-tools`. The latter is recommended. + +### pip + +```sh +pip install -r requirements.txt +``` + + +### pip-tools +[pip-tools](https://github.com/jazzband/pip-tools) can keep your virtual +environment in sync with the `requirements.txt` file, as well as compiling a +new `requirements.txt` when adding/removing a dependency in `requirements.in`. + +It is recommended that pip-tools is installed within the virutal +environment. + +```sh +pip install pip-tools +pip-compile # only necessary when adding/removing a dependency +pip-sync +``` diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..45ce307 --- /dev/null +++ b/requirements.in @@ -0,0 +1 @@ +python-gnupg diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8bb6fa2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile +# +python-gnupg==0.4.6 # via -r requirements.in