mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-27 00:28:17 +01:00
Compare commits
4 Commits
53b58d4116
...
7680b0f440
Author | SHA1 | Date | |
---|---|---|---|
7680b0f440 | |||
e70a7a9675 | |||
24f90df13e | |||
780f2c1723 |
4
.github/workflows/python-app.yml
vendored
4
.github/workflows/python-app.yml
vendored
@ -30,9 +30,9 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: '3.11'
|
||||
cache: 'poetry'
|
||||
- run: poetry install
|
||||
- name: Lint with flake8
|
||||
|
@ -90,7 +90,7 @@ class AllStatisticsResource:
|
||||
)
|
||||
|
||||
# create a list to hold dicts of stats
|
||||
statistics = list()
|
||||
statistics = []
|
||||
|
||||
# iterate over results and build statistics object
|
||||
for result in cursor:
|
||||
@ -162,7 +162,7 @@ class AllStatisticsResource:
|
||||
)
|
||||
|
||||
# create a list to hold dicts of stats
|
||||
statistics = list()
|
||||
statistics = []
|
||||
|
||||
# iterate over views dict to extract views and use the element id as an
|
||||
# index to the downloads dict to extract downloads.
|
||||
|
@ -140,7 +140,7 @@ def validate_post_parameters(req, resp, resource, params):
|
||||
description=f'The "{req.context.statistics_scope}" parameter is invalid. The value must be a comma-separated list of UUIDs.',
|
||||
)
|
||||
else:
|
||||
req.context.elements = list()
|
||||
req.context.elements = []
|
||||
|
||||
|
||||
def set_statistics_scope(req, resp, resource, params):
|
||||
|
@ -13,11 +13,12 @@ psycopg2 = "^2.9.1"
|
||||
requests = "^2.24.0"
|
||||
falcon-swagger-ui = {git = "https://github.com/alanorth/falcon-swagger-ui.git", rev="falcon3-update-swagger-ui"}
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
flake8 = "^6.0.0"
|
||||
pytest = "^7.0.0"
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
black = "^23.0.0"
|
||||
fixit = "^2.1.0"
|
||||
flake8 = "^6.0.0"
|
||||
isort = "^5.9.1"
|
||||
pytest = "^7.0.0"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=0.12"]
|
||||
|
Loading…
Reference in New Issue
Block a user