mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2025-05-10 15:16:02 +02:00
Compare commits
39 Commits
Author | SHA1 | Date | |
---|---|---|---|
1a1a14a25f
|
|||
c09fc789e8
|
|||
134a4f1595
|
|||
12ebd1aed5
|
|||
e5f3201b65
|
|||
c1ce4fe233
|
|||
b2eb1878a5
|
|||
a0213c1c97
|
|||
cd03ca2b36
|
|||
c48e6a79c7
|
|||
a2e1695ecc
|
|||
b683bf211c
|
|||
3ab48743d6
|
|||
88173eaae9
|
|||
f557d33f36
|
|||
ffc4ff4a5c
|
|||
7551b34632
|
|||
5e71ec10eb
|
|||
f80d360cf9
|
|||
e70b59ecfe
|
|||
4d0828b6c0
|
|||
dabc4c0259
|
|||
4fd8af07c3
|
|||
4c5326a176
|
|||
3b1ccafab4
|
|||
58b5ae82d3
|
|||
562aaeef7d
|
|||
5cdba6acb1
|
|||
dd0937179c
|
|||
f0c6c004db
|
|||
6843f0a8ac
|
|||
f5fcfcc05a
|
|||
e8ac74b6d1
|
|||
14fc14daee
|
|||
871aae537a
|
|||
2fada6c6ff
|
|||
ef0991e352
|
|||
4502d6053c
|
|||
a524068cf6
|
47
.drone.yml
47
.drone.yml
@ -1,5 +1,44 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: python310
|
||||
|
||||
steps:
|
||||
- name: setup
|
||||
image: postgres:10-alpine
|
||||
environment:
|
||||
PGPASSWORD: postgres
|
||||
commands:
|
||||
- id
|
||||
- psql --version
|
||||
- sleep 5
|
||||
- pg_isready -h database -U postgres -d dspacestatistics
|
||||
- createuser -h database -U postgres dspacestatistics
|
||||
- psql -h database -U postgres -c "ALTER USER dspacestatistics WITH PASSWORD 'dspacestatistics'"
|
||||
- psql -h database -U postgres -d dspacestatistics < tests/dspacestatistics.sql
|
||||
|
||||
- name: test
|
||||
image: python:3.10-slim
|
||||
environment:
|
||||
PGPASSWORD: dspacestatistics
|
||||
DATABASE_HOST: database
|
||||
commands:
|
||||
- id
|
||||
- python -V
|
||||
- apt update && apt install -y gcc git libpq-dev
|
||||
- pip install -r requirements-dev.txt
|
||||
- pytest
|
||||
|
||||
services:
|
||||
- name: database
|
||||
image: postgres:10-alpine
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: dspacestatistics
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: python39
|
||||
|
||||
steps:
|
||||
@ -24,7 +63,7 @@ steps:
|
||||
commands:
|
||||
- id
|
||||
- python -V
|
||||
- apt update && apt install -y gcc git
|
||||
- apt update && apt install -y gcc git libpq-dev
|
||||
- pip install -r requirements-dev.txt
|
||||
- pytest
|
||||
|
||||
@ -71,7 +110,7 @@ steps:
|
||||
commands:
|
||||
- id
|
||||
- python -V
|
||||
- apt update && apt install -y git
|
||||
- apt update && apt install -y gcc git libpq-dev
|
||||
- pip install -r requirements-dev.txt
|
||||
- pytest
|
||||
|
||||
@ -110,7 +149,7 @@ steps:
|
||||
commands:
|
||||
- id
|
||||
- python -V
|
||||
- apt update && apt install -y git
|
||||
- apt update && apt install -y gcc git libpq-dev
|
||||
- pip install -r requirements-dev.txt
|
||||
- pytest
|
||||
|
||||
@ -149,7 +188,7 @@ steps:
|
||||
commands:
|
||||
- id
|
||||
- python -V
|
||||
- apt update && apt install -y git
|
||||
- apt update && apt install -y gcc git libpq-dev
|
||||
- pip install -r requirements-dev.txt
|
||||
- pytest
|
||||
|
||||
|
4
.github/workflows/python-app.yml
vendored
4
.github/workflows/python-app.yml
vendored
@ -28,10 +28,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.9
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
python-version: '3.10'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
@ -4,6 +4,12 @@ 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).
|
||||
|
||||
## 1.4.3 - 2022-03-26
|
||||
### Updated
|
||||
- Update dependencies with `poetry update`
|
||||
- Falcon 3.1.0, a minor change for us, but good to be using a current upstream
|
||||
version
|
||||
|
||||
## 1.4.2 - 2021-04-14
|
||||
### Updated
|
||||
- Update dependencies with `poetry update`
|
||||
|
@ -1,4 +1,11 @@
|
||||
# DSpace Statistics API [](https://ci.mjanja.ch/alanorth/dspace-statistics-api) [](https://github.com/ilri/dspace-statistics-api/actions/workflows/python-app.yml)
|
||||
<h1 align="center">DSpace Statistics API</h1>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://ci.mjanja.ch/alanorth/dspace-statistics-api"><img alt="Build Status" src="https://ci.mjanja.ch/api/badges/alanorth/dspace-statistics-api/status.svg?ref=refs/heads/v6_x"></a>
|
||||
<a href="https://github.com/ilri/dspace-statistics-api/actions"><img alt="Build and Test" src="https://github.com/ilri/dspace-statistics-api/actions/workflows/python-app.yml/badge.svg"></a>
|
||||
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
|
||||
</p>
|
||||
|
||||
DSpace stores item view and download events in a Solr "statistics" core. This information is available for use in the various DSpace user interfaces, but is not exposed externally via any APIs. The DSpace 4/5/6 [REST API](https://wiki.lyrasis.org/display/DSDOC5x/REST+API), for example, only exposes _metadata_ about communities, collections, items, and bitstreams.
|
||||
|
||||
- If your DSpace is version 4 or 5, use [dspace-statistics-api v1.1.1](https://github.com/ilri/dspace-statistics-api/releases/tag/v1.1.1)
|
||||
|
@ -18,6 +18,6 @@ DATABASE_PORT = os.environ.get("DATABASE_PORT", "5432")
|
||||
# the vanilla DSpace REST API.
|
||||
DSPACE_STATISTICS_API_URL = os.environ.get("DSPACE_STATISTICS_API_URL", "")
|
||||
|
||||
VERSION = "1.4.2"
|
||||
VERSION = "1.4.3"
|
||||
|
||||
# vim: set sw=4 ts=4 expandtab:
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"version": "1.4.2",
|
||||
"version": "1.4.3",
|
||||
"title": "DSpace Statistics API",
|
||||
"description": "A [Falcon-based](https://falcon.readthedocs.io/) web application to make DSpace's item, community, and collection statistics available via a simple REST API. This Swagger interface is powered by [falcon-swagger-ui](https://github.com/rdidyk/falcon-swagger-ui).",
|
||||
"license": {
|
||||
@ -613,4 +613,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
864
poetry.lock
generated
864
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "dspace-statistics-api"
|
||||
version = "1.4.2"
|
||||
version = "1.4.3"
|
||||
description = "A simple REST API to expose Solr view and download statistics for items, communities, and collections in a DSpace repository."
|
||||
authors = ["Alan Orth <aorth@mjanja.ch>"]
|
||||
license = "GPL-3.0-only"
|
||||
@ -8,17 +8,16 @@ license = "GPL-3.0-only"
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.6"
|
||||
gunicorn = "^20.0.4"
|
||||
falcon = "3.0.0"
|
||||
psycopg2-binary = "^2.8.6"
|
||||
falcon = "3.1.0"
|
||||
psycopg2 = "^2.9.1"
|
||||
requests = "^2.24.0"
|
||||
falcon-swagger-ui = {git = "https://github.com/alanorth/falcon-swagger-ui.git", rev="falcon-300b1"}
|
||||
falcon-swagger-ui = {git = "https://github.com/alanorth/falcon-swagger-ui.git", rev="falcon3-update-swagger-ui"}
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
ipython = { version = "^7.18.1", python = "^3.7" }
|
||||
flake8 = "^3.8.4"
|
||||
flake8 = "^4.0.1"
|
||||
pytest = "^6.1.1"
|
||||
isort = "^5.5.4"
|
||||
black = "^20.8b1"
|
||||
black = {version = "^22.1.0", python = ">=3.6.2"}
|
||||
isort = {version = "^5.9.1", python = ">=3.6.1"}
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=0.12"]
|
||||
|
@ -1,51 +1,37 @@
|
||||
appdirs==1.4.4; python_version >= "3.6"
|
||||
appnope==0.1.2; python_version >= "3.7" and python_version < "4.0" and sys_platform == "darwin"
|
||||
atomicwrites==1.4.0; python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.4.0"
|
||||
attrs==20.3.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
|
||||
backcall==0.2.0; python_version >= "3.7" and python_version < "4.0"
|
||||
black==20.8b1; python_version >= "3.6"
|
||||
certifi==2020.12.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
chardet==4.0.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
click==7.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
||||
colorama==0.4.4; python_version >= "3.7" and python_full_version < "3.0.0" and python_version < "4.0" and sys_platform == "win32" or python_version >= "3.7" and python_version < "4.0" and sys_platform == "win32" and python_full_version >= "3.5.0"
|
||||
dataclasses==0.8; python_version >= "3.6" and python_version < "3.7"
|
||||
decorator==5.0.7; python_version >= "3.7" and python_version < "4.0"
|
||||
falcon-swagger-ui @ git+https://github.com/alanorth/falcon-swagger-ui.git@falcon-300b1
|
||||
falcon==3.0.0; python_version >= "3.5"
|
||||
flake8==3.9.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
||||
attrs==21.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
||||
black==22.1.0; python_full_version >= "3.6.2"
|
||||
certifi==2021.10.8; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"
|
||||
charset-normalizer==2.0.12; python_full_version >= "3.6.0" and python_version >= "3"
|
||||
click==8.0.4; python_version >= "3.6" and python_full_version >= "3.6.2"
|
||||
colorama==0.4.4; sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.6.2" and platform_system == "Windows"
|
||||
dataclasses==0.8; python_version >= "3.6" and python_version < "3.7" and python_full_version >= "3.6.2"
|
||||
falcon-swagger-ui @ git+https://github.com/alanorth/falcon-swagger-ui.git@falcon3-update-swagger-ui
|
||||
falcon==3.1.0; python_version >= "3.5"
|
||||
flake8==4.0.1; python_version >= "3.6"
|
||||
gunicorn==20.1.0; python_version >= "3.5"
|
||||
idna==2.10; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
importlib-metadata==3.10.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.5.0" and python_version < "3.8" and python_version >= "3.6"
|
||||
idna==3.3; python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.5"
|
||||
importlib-metadata==4.2.0; python_version < "3.8" and python_version >= "3.6" and python_full_version >= "3.6.2"
|
||||
iniconfig==1.1.1; python_version >= "3.6"
|
||||
ipython-genutils==0.2.0; python_version >= "3.7" and python_version < "4.0"
|
||||
ipython==7.22.0; python_version >= "3.7" and python_version < "4.0"
|
||||
isort==5.8.0; python_version >= "3.6" and python_version < "4.0"
|
||||
jedi==0.18.0; python_version >= "3.7" and python_version < "4.0"
|
||||
jinja2==2.11.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
markupsafe==1.1.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
mccabe==0.6.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
mypy-extensions==0.4.3; python_version >= "3.6"
|
||||
packaging==20.9; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
|
||||
parso==0.8.2; python_version >= "3.7" and python_version < "4.0"
|
||||
pathspec==0.8.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
||||
pexpect==4.8.0; python_version >= "3.7" and python_version < "4.0" and sys_platform != "win32"
|
||||
pickleshare==0.7.5; python_version >= "3.7" and python_version < "4.0"
|
||||
pluggy==0.13.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
|
||||
prompt-toolkit==3.0.18; python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.1"
|
||||
psycopg2-binary==2.8.6; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
|
||||
ptyprocess==0.7.0; python_version >= "3.7" and python_version < "4.0" and sys_platform != "win32"
|
||||
py==1.10.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
|
||||
pycodestyle==2.7.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
pyflakes==2.3.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
pygments==2.8.1; python_version >= "3.7" and python_version < "4.0"
|
||||
pyparsing==2.4.7; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
|
||||
pytest==6.2.3; python_version >= "3.6"
|
||||
regex==2021.4.4; python_version >= "3.6"
|
||||
requests==2.25.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
||||
isort==5.10.1; python_full_version >= "3.6.1"
|
||||
jinja2==3.0.3; python_version >= "3.6"
|
||||
markupsafe==2.0.1; python_version >= "3.6"
|
||||
mccabe==0.6.1; python_version >= "3.6"
|
||||
mypy-extensions==0.4.3; python_full_version >= "3.6.2"
|
||||
packaging==21.3; python_version >= "3.6"
|
||||
pathspec==0.9.0; python_full_version >= "3.6.2"
|
||||
platformdirs==2.4.0; python_version >= "3.6" and python_full_version >= "3.6.2"
|
||||
pluggy==1.0.0; python_version >= "3.6"
|
||||
psycopg2==2.9.3; python_version >= "3.6"
|
||||
py==1.11.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
||||
pycodestyle==2.8.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
||||
pyflakes==2.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
|
||||
pyparsing==3.0.7; python_version >= "3.6"
|
||||
pytest==6.2.5; python_version >= "3.6"
|
||||
requests==2.27.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")
|
||||
toml==0.10.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.6"
|
||||
traitlets==5.0.5; python_version >= "3.7" and python_version < "4.0"
|
||||
typed-ast==1.4.3; python_version >= "3.6"
|
||||
typing-extensions==3.7.4.3; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.5.0" and python_version < "3.8" and python_version >= "3.6"
|
||||
urllib3==1.26.4; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version < "4"
|
||||
wcwidth==0.2.5; python_version >= "3.7" and python_version < "4.0" and python_full_version >= "3.6.1"
|
||||
zipp==3.4.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.5.0" and python_version < "3.8" and python_version >= "3.6"
|
||||
tomli==1.2.3; python_version >= "3.6" and python_full_version >= "3.6.2"
|
||||
typed-ast==1.5.2; python_version < "3.8" and implementation_name == "cpython" and python_full_version >= "3.6.2" and python_version >= "3.6"
|
||||
typing-extensions==4.1.1; python_version < "3.8" and python_full_version >= "3.6.2" and python_version >= "3.6"
|
||||
urllib3==1.26.9; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version < "4"
|
||||
zipp==3.6.0; python_version < "3.8" and python_version >= "3.6"
|
||||
|
@ -1,11 +1,11 @@
|
||||
certifi==2020.12.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
chardet==4.0.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
falcon-swagger-ui @ git+https://github.com/alanorth/falcon-swagger-ui.git@falcon-300b1
|
||||
falcon==3.0.0; python_version >= "3.5"
|
||||
certifi==2021.10.8; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"
|
||||
charset-normalizer==2.0.12; python_full_version >= "3.6.0" and python_version >= "3"
|
||||
falcon-swagger-ui @ git+https://github.com/alanorth/falcon-swagger-ui.git@falcon3-update-swagger-ui
|
||||
falcon==3.1.0; python_version >= "3.5"
|
||||
gunicorn==20.1.0; python_version >= "3.5"
|
||||
idna==2.10; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
jinja2==2.11.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
markupsafe==1.1.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
psycopg2-binary==2.8.6; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
|
||||
requests==2.25.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
||||
urllib3==1.26.4; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version < "4"
|
||||
idna==3.3; python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.5"
|
||||
jinja2==3.0.3; python_version >= "3.6"
|
||||
markupsafe==2.0.1; python_version >= "3.6"
|
||||
psycopg2==2.9.3; python_version >= "3.6"
|
||||
requests==2.27.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")
|
||||
urllib3==1.26.9; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version < "4"
|
||||
|
Reference in New Issue
Block a user