From 0895b4f469d767b77b4ac10db2b163ff776c1359 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 12 Nov 2018 08:47:27 +0200 Subject: [PATCH 1/4] Add requirements-dev.txt for pip Generated with pipenv lock -r -d. Will be used for separating the development dependencies. --- requirements-dev.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 requirements-dev.txt diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..68695a9 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,25 @@ +-i https://pypi.org/simple +atomicwrites==1.2.1 +attrs==18.2.0 +backcall==0.1.0 +decorator==4.3.0 +flake8==3.6.0 +ipython-genutils==0.2.0 +ipython==7.1.1 +jedi==0.13.1 +mccabe==0.6.1 +more-itertools==4.3.0 +parso==0.3.1 +pexpect==4.6.0 ; sys_platform != 'win32' +pickleshare==0.7.5 +pluggy==0.8.0 +prompt-toolkit==2.0.7 +ptyprocess==0.6.0 +py==1.7.0 +pycodestyle==2.4.0 +pyflakes==2.0.0 +pygments==2.2.0 +pytest==3.10.1 +six==1.11.0 +traitlets==4.3.2 +wcwidth==0.1.7 From c1c2e319ac34366b5f430b47ed5a3615e35797fc Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 12 Nov 2018 08:49:02 +0200 Subject: [PATCH 2/4] README.md: Rework to use pip instead of pipenv Pipenv is great for local development, but I don't think many people are using it yet. I can use it locally and on Travis, but still keep vanilla requirements.txt for use with pip. The requirements.txt file can be generated easily from pipenv itself: $ pipenv lock -r > requirements.txt The same for the development requirements: $ pipenv lock -r -d > requirements-dev.txt --- README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1b6ec13..6bef2c1 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,14 @@ This project contains an indexer and a [Falcon-based](https://falcon.readthedocs - PostgreSQL version 9.5+ (due to [`UPSERT` support](https://wiki.postgresql.org/wiki/UPSERT)) - DSpace with [Solr usage statistics enabled](https://wiki.duraspace.org/display/DSDOC5x/SOLR+Statistics) (tested with 5.x) -## Installation and Testing -Create a Python virtual environment and install the dependencies using [`pipenv`](https://github.com/pypa/pipenv): +## Installation +Create a Python virtual environment and install the dependencies: - $ pipenv install --dev - $ pipenv shell + $ python3 -m venv venv + $ source venv/bin/activate + $ pip install -r requirements.txt + +## Running Set up the environment variables for Solr and PostgreSQL: @@ -35,6 +38,11 @@ Test to see if there are any statistics: $ curl 'http://localhost:8000/items?limit=1' +## Testing +Install development packages using pip: + + $ pip install -r requirements-dev.txt + Run tests: $ pytest From 9c46cfc7e281a4df3d71ab6aff2fa20fb4b8962f Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 12 Nov 2018 08:54:54 +0200 Subject: [PATCH 3/4] Use Python 3.7 for pipenv Now that I'm only using pipenv locally it shouldn't create problems for people. They can still just create a vanilla virtualenv and use pip to install the dependencies. --- Pipfile | 2 +- Pipfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Pipfile b/Pipfile index 5b2d041..42dd8d4 100644 --- a/Pipfile +++ b/Pipfile @@ -23,4 +23,4 @@ ipython = "*" pytest = "*" [requires] -python_version = "3.6" +python_version = "3.7" diff --git a/Pipfile.lock b/Pipfile.lock index 2a795e0..080cf26 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "da754a9f6c668303b071155fdd3a31067897f2c1703a28990745506a5ea55538" + "sha256": "efc8ac5e45868d93f6bd9c363dc649f4031192c9d55e87eda94aa8e7a064918c" }, "pipfile-spec": 6, "requires": { - "python_version": "3.6" + "python_version": "3.7" }, "sources": [ { From f4d7312a3fbb6db5c5ed89350e84933d193bb237 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 12 Nov 2018 09:02:04 +0200 Subject: [PATCH 4/4] CHANGELOG.md: Add unreleased changes --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4407edc..85068f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased +## Changed +- README.md to recommend using vanilla Python virtual environments and pip instead of pipenv + +## Added +- `requirements-dev.txt` for installing development packages with pip + ## [0.8.0] - 2018-11-11 ### Changed - Properly handle database connection errors