1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-27 08:28:19 +01:00

Compare commits

..

No commits in common. "7680b0f440b0342d0c64dbbc338d1b9f9e222fad" and "53b58d4116b375ddf930f1787a058694d133aed1" have entirely different histories.

4 changed files with 8 additions and 9 deletions

View File

@ -30,9 +30,9 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install poetry - name: Install poetry
run: pipx install poetry run: pipx install poetry
- uses: actions/setup-python@v5 - uses: actions/setup-python@v4
with: with:
python-version: '3.11' python-version: '3.10'
cache: 'poetry' cache: 'poetry'
- run: poetry install - run: poetry install
- name: Lint with flake8 - name: Lint with flake8

View File

@ -90,7 +90,7 @@ class AllStatisticsResource:
) )
# create a list to hold dicts of stats # create a list to hold dicts of stats
statistics = [] statistics = list()
# iterate over results and build statistics object # iterate over results and build statistics object
for result in cursor: for result in cursor:
@ -162,7 +162,7 @@ class AllStatisticsResource:
) )
# create a list to hold dicts of stats # create a list to hold dicts of stats
statistics = [] statistics = list()
# iterate over views dict to extract views and use the element id as an # iterate over views dict to extract views and use the element id as an
# index to the downloads dict to extract downloads. # index to the downloads dict to extract downloads.

View File

@ -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.', description=f'The "{req.context.statistics_scope}" parameter is invalid. The value must be a comma-separated list of UUIDs.',
) )
else: else:
req.context.elements = [] req.context.elements = list()
def set_statistics_scope(req, resp, resource, params): def set_statistics_scope(req, resp, resource, params):

View File

@ -13,12 +13,11 @@ psycopg2 = "^2.9.1"
requests = "^2.24.0" requests = "^2.24.0"
falcon-swagger-ui = {git = "https://github.com/alanorth/falcon-swagger-ui.git", rev="falcon3-update-swagger-ui"} falcon-swagger-ui = {git = "https://github.com/alanorth/falcon-swagger-ui.git", rev="falcon3-update-swagger-ui"}
[tool.poetry.group.dev.dependencies] [tool.poetry.dev-dependencies]
black = "^23.0.0"
fixit = "^2.1.0"
flake8 = "^6.0.0" flake8 = "^6.0.0"
isort = "^5.9.1"
pytest = "^7.0.0" pytest = "^7.0.0"
black = "^23.0.0"
isort = "^5.9.1"
[build-system] [build-system]
requires = ["poetry>=0.12"] requires = ["poetry>=0.12"]