From bde19b7b6c2d95c1b36dcc15a9219ce02b1ddbcd Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Thu, 26 Dec 2024 10:44:19 -0500 Subject: [PATCH 1/4] fix(docs): use correct rst syntax --- CONTRIBUTING.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index f03c639b..9639d2d7 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -46,7 +46,7 @@ Coding style Testing ------- -# Tests are written using pytest. -# PR tests run on Github Actions. -# In order to run the tests locally you need to have one version of postgres installed. And pass envvar named `POSTGRES` with used version number -# If you encounter any test failures due to locale issues, make sure that both `en_US.UTF-8` and `de_DE.UTF-8` are enabled in `/etc/locale.gen` and then run `sudo locale-gen`. +#. Tests are written using pytest. +#. PR tests run on Github Actions. +#. In order to run the tests locally you need to have one version of postgres installed. And pass envvar named ``POSTGRES`` with used version number +#. If you encounter any test failures due to locale issues, make sure that both ``en_US.UTF-8`` and ``de_DE.UTF-8`` are enabled in ``/etc/locale.gen`` and then run ``sudo locale-gen``. From f4e4c580ed0d9174efd81aa0296fdb3a83960103 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Thu, 26 Dec 2024 11:54:22 -0500 Subject: [PATCH 2/4] docs: add more details on running local version Signed-off-by: Mike Fiedler --- CONTRIBUTING.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9639d2d7..aae7edaa 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -19,7 +19,13 @@ Feature requests/proposals #. Provide as detailed description as possible * Use case is great to have #. There'll be a bit of discussion for the feature. Don't worry, if it is to be accepted, we'd like to support it, so we need to understand it thoroughly. - + +Development +----------- + +#. Fork the repository +#. Clone the repository +#. Create a virtual environment with ``pipenv install --dev`` Pull requests ------------- @@ -46,7 +52,11 @@ Coding style Testing ------- -#. Tests are written using pytest. +#. Tests are written using `pytest `_ #. PR tests run on Github Actions. -#. In order to run the tests locally you need to have one version of postgres installed. And pass envvar named ``POSTGRES`` with used version number +#. Run a PostgreSQL server [#]_, and create a default super user ``createuser --superuser postgres`` +#. Set envvar named ``POSTGRES`` with used version number +#. Run tests with ``pipenv run pytest`` #. If you encounter any test failures due to locale issues, make sure that both ``en_US.UTF-8`` and ``de_DE.UTF-8`` are enabled in ``/etc/locale.gen`` and then run ``sudo locale-gen``. + +.. [#] Installing and configuring a PostgreSQL server is out of scope of this document. Please refer to `PostgreSQL documentation `_ for more information. From bdd5c6b660b03b8381ba85ad1ae008297e6cf7db Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Thu, 26 Dec 2024 11:56:46 -0500 Subject: [PATCH 3/4] test: use psycopg-binary package during development Instead of requiring the user to figure out how to locate libpq/pg_config. Signed-off-by: Mike Fiedler --- Pipfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Pipfile b/Pipfile index 0bc75fb5..34926325 100644 --- a/Pipfile +++ b/Pipfile @@ -11,6 +11,7 @@ psycopg = "==3.2.3" [dev-packages] towncrier = "==24.8.0" +psycopg-binary = "==3.2.3" pytest-cov = "==6.0.0" pytest-xdist = "==3.6.1" mock = "==5.1.0" From 2f7883db1ee14608cbc62c63a83c63076f6c0610 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Thu, 26 Dec 2024 11:58:19 -0500 Subject: [PATCH 4/4] chore: add towncrier Signed-off-by: Mike Fiedler --- newsfragments/1047.misc.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 newsfragments/1047.misc.rst diff --git a/newsfragments/1047.misc.rst b/newsfragments/1047.misc.rst new file mode 100644 index 00000000..63bca6ff --- /dev/null +++ b/newsfragments/1047.misc.rst @@ -0,0 +1,2 @@ +Update contributing guidelines. +Simplify development installation with `psycopg-binary`.