mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-29 01:18:19 +01:00
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
This commit is contained in:
parent
0895b4f469
commit
c1c2e319ac
16
README.md
16
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))
|
- 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)
|
- DSpace with [Solr usage statistics enabled](https://wiki.duraspace.org/display/DSDOC5x/SOLR+Statistics) (tested with 5.x)
|
||||||
|
|
||||||
## Installation and Testing
|
## Installation
|
||||||
Create a Python virtual environment and install the dependencies using [`pipenv`](https://github.com/pypa/pipenv):
|
Create a Python virtual environment and install the dependencies:
|
||||||
|
|
||||||
$ pipenv install --dev
|
$ python3 -m venv venv
|
||||||
$ pipenv shell
|
$ source venv/bin/activate
|
||||||
|
$ pip install -r requirements.txt
|
||||||
|
|
||||||
|
## Running
|
||||||
|
|
||||||
Set up the environment variables for Solr and PostgreSQL:
|
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'
|
$ curl 'http://localhost:8000/items?limit=1'
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
Install development packages using pip:
|
||||||
|
|
||||||
|
$ pip install -r requirements-dev.txt
|
||||||
|
|
||||||
Run tests:
|
Run tests:
|
||||||
|
|
||||||
$ pytest
|
$ pytest
|
||||||
|
Loading…
Reference in New Issue
Block a user