Skip to content

Commit

Permalink
Switch to pipenv
Browse files Browse the repository at this point in the history
  • Loading branch information
egh committed Jun 22, 2022
1 parent 184dc05 commit ec4f737
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 32 deletions.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.11
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
language: python
python:
language: python
python:
- "3.6"
script:
- pytest
before_script:
- pip install pipenv
script:
- pipenv run python -m pytest
24 changes: 24 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
allofplos = {editable = true, path = "./"}
certifi = "*"
chardet = "*"
charset-normalizer = "*"
idna = "*"
lxml = "*"
peewee = "*"
python-utils = "*"
requests = "*"
six = "*"
tqdm = "*"
unidecode = "*"
urllib3 = "*"

[dev-packages]

[requires]
python_version = "3.8"
181 changes: 181 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 10 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@ may change and after a new version a full corpus download may be required.
Installation instructions
-------------------------

This program requires Python 3.4+.

Make a virtual environment:

``$ virtualenv allofplos``
This program requires Python 3.8+.

Using pip:

``(allofplos)$ pip install allofplos``
``$ pip install allofplos``

This should install *allofplos* and requirements. At this stage you are ready to go.

If you want to manually install from source (for example for development purposes), first clone the project repository:

``(allofplos)$ git clone [email protected]:PLOS/allofplos.git``
``$ git clone [email protected]:PLOS/allofplos.git``

Install Python dependencies inside the newly created virtual environment:

``(allofplos)$ pip install -r requirements.txt``
``$ pipenv install``

How to run the program
----------------------

Execute the following command.

``(allofplos)$ python -m allofplos.update``
``$ python -m allofplos.update``

or, if running from source:

``$ pipenv run python -m allofplos.update``

The first time it runs it will download a >4.4 Gb zip file
(**allofplos_xml.zip**) with all the XML files inside.
Expand Down Expand Up @@ -97,13 +97,7 @@ To run the tests, you will need to install *allofplos* with its testing
dependencies. These testing dependencies include ``pytest``, which we will use
to run the tests.

To get all of the *allofplos* testing dependencies run:

``(allofplos)$ pip install -U allofplos[test]``

Then when you run:

``(allofplos)$ pytest --pyargs allofplos``
``$ pipenv run python -m pytest``

It should return something like this:

Expand Down
12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

0 comments on commit ec4f737

Please sign in to comment.