Commit Graph

306 Commits

Author SHA1 Message Date
Alan Orth 0c8fb21f80
README.md: Update DSpace wiki URLs 2020-04-13 15:25:17 +03:00
Alan Orth b359c2466f
.travis.yml: Don't build in a container
I didn't realize these LXD containers are not available on AMD64.
Now I understand why the build was so slow: because it was ARM64!
2020-03-29 16:36:47 +03:00
Alan Orth 0eaed3e8c4
.travis.yml: Use Python 3.8-dev instead of master
See: https://docs.travis-ci.com/user/languages/python/#specifying-python-versions
2020-03-29 16:26:57 +03:00
Alan Orth 70e96214c8
.travis.yml: Go→Python
Fix incorrect language.
2020-03-29 16:24:39 +03:00
Alan Orth cab9f16dbc
.travis.yml: Try to run in an LXD container
According to the build environment documentation we need to specify
an OS of Linux in order to get a container instead of a VM.

See: https://docs.travis-ci.com/user/reference/overview/
2020-03-29 16:24:00 +03:00
Alan Orth bd49e1d1f6
.travis.yml: Correctly specify PostgreSQL 10
See: https://docs.travis-ci.com/user/database-setup/#postgresql
2020-03-29 16:19:08 +03:00
Alan Orth 144ed9a7c4
.travis.yml: Use PostgreSQL 10.0
Production is still PostgreSQL 9.6, but I have been using 10.0 in
local development and staging environments.
2020-03-29 16:08:29 +03:00
Alan Orth 48eef8c8e3
.travis.yml: Test on Python master
But allow failures!
2020-03-29 16:07:44 +03:00
Alan Orth fa9325e8a3 CHANGELOG.md: Add changes for v1.2.1 2020-03-02 14:32:07 +02:00
Alan Orth 998e833470 dspace_statistics_api/docs/index.html: Adjust help text 2020-03-02 14:30:16 +02:00
Alan Orth dd8252601f README.md: Adjust API help text 2020-03-02 14:29:13 +02:00
Alan Orth 9a9555853f README.md: Add note about versions 2020-03-02 14:28:22 +02:00
Alan Orth 385e92cc5e README.md: Update
Remove TODOs that I've recently completed and update introduction.
2020-03-02 14:25:47 +02:00
Alan Orth b0e6481961 tests/dspacestatistics.sql: Update
New database snapshot that uses UUIDs.
2020-03-02 12:36:06 +02:00
Alan Orth f96a903be3 README.md: Update Python requirement 2020-03-02 11:47:03 +02:00
Alan Orth fcf8fa4c29 CHANGELOG.md: Minor syntax and spelling changes 2020-03-02 11:45:26 +02:00
Alan Orth 5dd50ff998 CHANGELOG.md: Version 1.2.0
This version only works with DSpace 6+ where the internal item id-
entifiers are UUIDs instead of integers. Version 1.1.1 was the last
version to work with DSpace 4 and 5.
2020-03-02 11:34:58 +02:00
Alan Orth 6704e7375f CHANGELOG.md: Add note about Python dependencies 2020-03-02 11:34:13 +02:00
Alan Orth 37630d8dac CHANGELOG.md: Add note about DSpace 6+ UUIDs 2020-03-02 11:27:10 +02:00
Alan Orth 0ef071a91d dspace_statistics_api: Use f-strings instead of format()
We had previously been avoiding the f-strings because we needed to
run on Python 3.5 and they were only available in Python 3.6+, but
now the black formatter requires Python 3.6 and all our systems are
running Python 3.6+ anyways.
2020-03-02 11:24:29 +02:00
Alan Orth 9e7dd28156 dspace_statistics_api/app.py: Use parameterized SQL queries
This is a better way to run SQL queries because psycopg2 takes care
of the quoting for us.
2020-03-02 11:16:05 +02:00
Alan Orth 60e6ea57b1 tests/test_api.py: Use UUID
DSpace 6+ uses a UUID for item identifiers instead of an integer so
we need to adapt our tests accordingly. The Python UUID object must
be cast to a string to use it elsewhere in the code.
2020-03-02 11:10:41 +02:00
Alan Orth 5955868b9a dspace_statistics_api/app.py: Use UUID
DSpace 6+ uses a UUID for item identifiers instead of an integer so
we need to adapt our PostgreSQL queries to use those. Note that we
can no longer sort results in the "all items" endpoint by ID. Also,
we need to use parameterized psycopg2 queries instead of strings to
support queries with UUIDs properly. To use the Python UUID objects
elsewhere in the code we need to make sure that we cast them to str.
2020-03-02 11:06:48 +02:00
Alan Orth 250fd8164f dspace_statistics_api/indexer.py: Use UUID
DSpace 6+ uses a UUID for item identifiers instead of an integer so
we need to update the PostgreSQL schema accordingly. Solr still re-
fers to them as "id" in its schema so we don't need to change anyt-
hing there.
2020-03-01 21:22:10 +02:00
Alan Orth 82be1a4d00 Update requirements
Generated from pipenv with:

  $ pipenv lock -r > requirements.txt
  $ pipenv lock -r -d > requirements-dev.txt
2020-03-01 21:21:13 +02:00
Alan Orth 0615064e3d Add pytest-clarity to pipenv
Makes pytest output easier to understand.
2020-03-01 21:19:28 +02:00
Alan Orth 76be1b749a Run pipenv update 2020-03-01 21:13:32 +02:00
Alan Orth 92146fe426
tests/test_api.py: Format with black 2019-12-14 12:39:58 +02:00
Alan Orth 440b2f2dfa
Pipfile.lock: Run pipenv update 2019-12-14 12:38:11 +02:00
Alan Orth 67bc30ead0
Pipfile: Specify exact version of black
Black only releases pre-release versions, which causes issues with
pipenv. Instead of always running pipenv with "--pre" and potenti-
ally letting in some other pre-release versions for other depende-
ncies, I would rather specify the latest black version explicitly.

See: https://github.com/psf/black/issues/517
See: https://github.com/microsoft/vscode-python/issues/5171
2019-12-14 12:37:10 +02:00
Alan Orth 142959acdb
CHANGELOG.md: Unreleased changes 2019-11-27 12:56:39 +02:00
Alan Orth 322f5a8db8
.travis.yml: Remove Python 3.5
black does not work with Python 3.5. It's not such a big deal, as
this is only required for running tests, not for running the app.
2019-11-27 12:55:34 +02:00
Alan Orth 90dcaa6ec6
CHANGELOG.md: Fix typo 2019-11-27 12:47:07 +02:00
Alan Orth 9aca827d69
Update requirements-dev.txt
Generated with pipenv:

    $ pipenv lock -r -d > requirements-dev.txt
2019-11-27 12:36:05 +02:00
Alan Orth 1b394ec50e
CHANGELOG.md: Move unreleased changes to 1.1.1 2019-11-27 12:32:54 +02:00
Alan Orth 3e9753b600
CHANGELOG.md: Add unreleased changes 2019-11-27 12:32:16 +02:00
Alan Orth cb3c3d37fa
Sort imports with isort 2019-11-27 12:31:04 +02:00
Alan Orth 4ff1fd4a22
Format code with black 2019-11-27 12:30:06 +02:00
Alan Orth d2fe420a9a
Add configuration for isort and black
This does linting and automatic code formatting according to PEP8.

See: https://sourcery.ai/blog/python-best-practices/
2019-11-27 12:26:55 +02:00
Alan Orth 3197b79578
CHANGELOG.md: Update unreleased changes 2019-11-27 12:14:49 +02:00
Alan Orth eeb8e6bba1
dspace_statistics_api/indexer.py: Fix minor issues raised by flake8 2019-11-27 12:12:05 +02:00
Alan Orth 3540ce328b
Update requirements
Generated from pipenv with:

  $ pipenv lock -r > requirements.txt
  $ pipenv lock -r -d > requirements-dev.txt
2019-11-27 12:08:32 +02:00
Alan Orth 520e04f9be
Pipfile.lock: run pipenv update
Brings gunicorn 20.0.4, pytest 5.3.1, and others. I hadn't noticed
that gunicorn was bumped from 19.x.x to 20.x.x last week.

See: https://docs.gunicorn.org/en/stable/news.html#id6
2019-11-27 12:06:09 +02:00
Alan Orth 8a46a64cfc
CHANGELOG.md: Use Python 3.8 for pipenv 2019-11-27 10:53:38 +02:00
Alan Orth b8442f8cce
.travis.yml: Remove pipenv-specific environment variables 2019-11-15 00:48:57 +02:00
Alan Orth 95f7871cc1
.travis.yml: Use vanilla pip 2019-11-15 00:46:58 +02:00
Alan Orth 3bc07027e5
.travis.yml: Test with Python 3.8 2019-11-15 00:46:04 +02:00
Alan Orth afcc445855
Update requirements
Generated from pipenv with:

  $ pipenv lock -r > requirements.txt
  $ pipenv lock -r -d > requirements-dev.txt
2019-11-15 00:41:12 +02:00
Alan Orth 494548c691
Use Python 3.8.0 for pipenv
Python 3.8.0 was released several months ago and has made it into
Arch Linux's core repositories so it's time to start moving.
2019-11-15 00:38:45 +02:00
Alan Orth feb60b6adf
CHANGELOG.md: Update unreleased changes 2019-11-15 00:06:49 +02:00