-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
2,422 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203, E704 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ jobs: | |
directory: | ||
- matomo-api | ||
- Library-Notification-Service | ||
- annual-reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[settings] | ||
profile=black | ||
known_third_party = api,backoff,cli,click,freezegun,models,psycopg2,pytest,requests,sqlalchemy,structlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM python:3.8 | ||
|
||
WORKDIR /matomo | ||
|
||
ENV PATH="/root/.local/bin:${PATH}" | ||
ENV PYTHONBUFFERED=0 \ | ||
POETRY_VIRTUALENVS_CREATE=false | ||
|
||
|
||
ARG POETRY_VERSION | ||
ENV POETRY_VERSION="${POETRY_VERSION:-1.6.1}" | ||
RUN curl -sSL https://install.python-poetry.org \ | ||
| python3 - --git https://github.com/python-poetry/poetry.git#{$POETRY_VERSION} \ | ||
&& poetry --version | ||
|
||
|
||
COPY poetry.lock pyproject.toml ./ | ||
COPY src ./src | ||
|
||
RUN poetry install | ||
CMD poetry run python src/cli.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Annual Reports | ||
|
||
## Installation | ||
``` | ||
poetry install | ||
docker-compose up -d | ||
export DB_PASSWORD=annual | ||
export DB_USER=annual | ||
export DB_NAME=annual | ||
export DB_HOST=localhost | ||
export DB_PORT=5432 | ||
``` | ||
|
||
## Run | ||
### With specific years | ||
``` | ||
poetry run python src/cli.py -y 2022 -y 2023 | ||
``` | ||
|
||
### For all years | ||
``` | ||
poetry run python src/cli.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '3.1' | ||
|
||
services: | ||
db: | ||
ports: | ||
- "5432:5432" | ||
image: postgres:14 | ||
restart: always | ||
environment: | ||
POSTGRES_PASSWORD: annual | ||
POSTGRES_USER: annual | ||
POSTGRES_DB: annual |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[tool.poetry] | ||
name = "Annual Reports" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["CERN SIS TS"] | ||
packages = [ | ||
{ include = "*", from = "src" }, | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
requests = "^2.31.0" | ||
click = "^8.1.7" | ||
pytest = "^7.4.2" | ||
pytest-vcr = "^1.0.2" | ||
urllib3 = "1.26.7" | ||
freezegun = "^1.2.2" | ||
sqlalchemy = "^2.0.22" | ||
sqlalchemy-utils = "^0.41.1" | ||
structlog = "^23.2.0" | ||
backoff = "^2.2.1" | ||
psycopg2 = "^2.9.9" | ||
|
||
[tool.poetry.dev-dependencies] | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
ipdb = "^0.13.13" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" |
Empty file.
Oops, something went wrong.