Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge The Palace Circulation v14.1.0 into E-kirjasto #11

Merged
merged 100 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
e0f7512
Bump boto3 from 1.29.0 to 1.29.1 (#1517)
dependabot[bot] Nov 17, 2023
fa447b7
Bump pyfakefs from 5.3.0 to 5.3.1 (#1518)
dependabot[bot] Nov 17, 2023
a006f7d
Instead of raising an exception, we should return a problem detail. (…
jonathangreen Nov 17, 2023
8cbe939
Fix parameters for enki call (PP-620) (#1509)
jonathangreen Nov 17, 2023
f3b9c9b
Remove external integrations from collection integrations (PP-503) (#…
jonathangreen Nov 17, 2023
9c730c9
Bump certifi from 2023.7.22 to 2023.11.17 (#1521)
dependabot[bot] Nov 21, 2023
e811817
Bump types-jsonschema from 4.19.0.4 to 4.20.0.0 (#1520)
dependabot[bot] Nov 21, 2023
6334442
Added verbose logging for the customlist sharing workflow (#1522)
RishiDiwanTT Nov 22, 2023
58c489b
PP-745 Removed patron synchronization checks for annotations (#1524)
RishiDiwanTT Nov 23, 2023
fb338a4
Make sure default audience can be selected (PP-752) (#1526)
jonathangreen Nov 23, 2023
4b54670
Add ISBN, when available, to playback time reports. (PP-572) (#1516)
tdilauro Nov 24, 2023
f81b7d5
Bump types-flask-cors from 4.0.0.1 to 4.0.0.2 (#1528)
dependabot[bot] Nov 27, 2023
02fd8fd
Bump types-psycopg2 from 2.9.21.16 to 2.9.21.17 (#1529)
dependabot[bot] Nov 27, 2023
bc2ed3a
Bump mypy from 1.7.0 to 1.7.1 (#1527)
dependabot[bot] Nov 27, 2023
295bdfa
Bump bcrypt from 4.0.1 to 4.1.0 (#1531)
dependabot[bot] Nov 27, 2023
e9e155b
Properly track code coverage for scripts (#1532)
jonathangreen Nov 27, 2023
481ac8c
Library short name being saved into library settings (PP-754) (#1525)
jonathangreen Nov 27, 2023
73aab83
Bump cryptography from 41.0.5 to 41.0.6 (#1536)
dependabot[bot] Nov 29, 2023
cb4f49f
Bump tox from 4.11.3 to 4.11.4 (#1534)
dependabot[bot] Nov 29, 2023
18df5d5
Bump types-psycopg2 from 2.9.21.17 to 2.9.21.18 (#1533)
dependabot[bot] Nov 29, 2023
a99a74f
Remove old columns from collection table (#1498)
jonathangreen Nov 29, 2023
c34943b
Count all eligible licenses (PP-527) (#1535)
tdilauro Nov 29, 2023
fb336c2
Bump bcrypt from 4.1.0 to 4.1.1 (#1537)
dependabot[bot] Nov 29, 2023
13fac2c
Bump boto3 from 1.29.1 to 1.33.2 (#1538)
dependabot[bot] Nov 29, 2023
87d7628
Refactor integration controllers, to reduce copy / paste. (#1539)
jonathangreen Nov 29, 2023
9babdac
Convert MARC Generator to use Integration Configuration (PP-498) (#1523)
jonathangreen Nov 29, 2023
2af463c
PP-750 Time tracking flag (#1530)
RishiDiwanTT Nov 30, 2023
9752886
Bump types-psycopg2 from 2.9.21.18 to 2.9.21.19 (#1542)
dependabot[bot] Nov 30, 2023
fdac72f
Bump boto3 from 1.33.2 to 1.33.5 (#1543)
dependabot[bot] Dec 1, 2023
8adaeec
Bump alembic from 1.12.1 to 1.13.0 (#1545)
dependabot[bot] Dec 1, 2023
487c97f
Bump pyfakefs from 5.3.1 to 5.3.2 (#1544)
dependabot[bot] Dec 1, 2023
14aac24
Add collection name and distributor facets to the crawlable feed. (#1…
jonathangreen Dec 1, 2023
cfd6ebc
Prune old migrations. (#1540)
jonathangreen Dec 4, 2023
e4e8a09
Bump freezegun from 1.2.2 to 1.3.0 (#1550)
dependabot[bot] Dec 4, 2023
55062b9
Bump freezegun from 1.3.0 to 1.3.1 (#1555)
dependabot[bot] Dec 5, 2023
a1f3643
Change the generate_quicksight_url command params to library_uuids fr…
dbernstein Dec 5, 2023
d1b5155
Add the details of the hold notification to the body of the notificat…
jonathangreen Dec 5, 2023
40aca33
MARC export by collection (PP-59) (#1547)
jonathangreen Dec 5, 2023
d5e4df9
Additional warning when marc exporter has no collections configured. …
jonathangreen Dec 6, 2023
14c4a3d
Bump actions/setup-python from 4 to 5 (#1558)
dependabot[bot] Dec 6, 2023
875afbe
MARC export by collection - Cleanup Migration (PP-59) (#1552)
jonathangreen Dec 6, 2023
96e0ca9
Fix 2d72d6876c52 migration failure with overdrive advantage collectio…
jonathangreen Dec 6, 2023
a170786
Fix 2d72d6876c52 migration failure collection name duplication (#1561)
jonathangreen Dec 6, 2023
d6d4f54
Fix for e06f965879ab MARC file deletion migration (PP-773) (#1563)
jonathangreen Dec 7, 2023
54311c8
Allow pyinstrument to profile our test runs (#1557)
jonathangreen Dec 8, 2023
ec82afe
Bump firebase-admin from 6.2.0 to 6.3.0 (#1559)
dependabot[bot] Dec 8, 2023
fc4ce80
Bump types-psycopg2 from 2.9.21.19 to 2.9.21.20 (#1562)
dependabot[bot] Dec 8, 2023
5910e72
Add per-medium breakouts to dashboard statistics inventories. (PP-728…
tdilauro Dec 8, 2023
ba3e35c
Refactor mock webserver into a fixture (#1564)
jonathangreen Dec 8, 2023
139fbf7
Handle `null` medium in dashboard stats. (#1568)
tdilauro Dec 11, 2023
c72013a
Bump typing-extensions from 4.8.0 to 4.9.0 (#1566)
dependabot[bot] Dec 12, 2023
05fe073
Bump feedparser from 6.0.10 to 6.0.11 (#1567)
dependabot[bot] Dec 12, 2023
d85d76b
Bump github/codeql-action from 2 to 3 (#1569)
dependabot[bot] Dec 14, 2023
e451cb2
Break api/controller.py into multiple files (#1565)
jonathangreen Dec 14, 2023
cb1ad8a
Fix flakey marc test. (#1571)
jonathangreen Dec 14, 2023
222298c
Bump boto3 from 1.33.5 to 1.34.0 (#1570)
dependabot[bot] Dec 14, 2023
730d947
Bump bcrypt from 4.1.1 to 4.1.2 (#1574)
dependabot[bot] Dec 15, 2023
333210e
Make it easier to use log_elapsed_time with LoggerMixin (#1573)
jonathangreen Dec 18, 2023
75e6d0d
Remove Python 3.8 & 3.9 (PP-609) (#1572)
jonathangreen Dec 18, 2023
9e28d4e
Bump freezegun from 1.3.1 to 1.4.0 (#1578)
dependabot[bot] Dec 19, 2023
d3b9a36
Bump pre-commit from 3.5.0 to 3.6.0 (#1576)
dependabot[bot] Jan 3, 2024
9b0f124
Bump mypy from 1.7.1 to 1.8.0 (#1581)
dependabot[bot] Jan 3, 2024
fd514e9
Bump alembic from 1.13.0 to 1.13.1 (#1582)
dependabot[bot] Jan 3, 2024
ce38339
Bump jwcrypto from 1.5.0 to 1.5.1 (#1583)
dependabot[bot] Jan 3, 2024
823c611
Change hold/loan notification times. (#1587)
tdilauro Jan 3, 2024
4bc3390
Fix overdrive advantage collection parent reporting (PP-806) (#1590)
jonathangreen Jan 4, 2024
b25b092
Bump sqlalchemy from 1.4.50 to 1.4.51 (#1585)
dependabot[bot] Jan 4, 2024
081cd78
Bump pillow from 10.1.0 to 10.2.0 (#1586)
dependabot[bot] Jan 4, 2024
5f55820
Bump pyspellchecker from 0.7.2 to 0.7.3 (#1588)
dependabot[bot] Jan 4, 2024
9d9efa2
Bump tox-gh-actions from 3.1.3 to 3.2.0 (#1589)
dependabot[bot] Jan 4, 2024
91c9ba0
Faster migration to add the should_track_playtime column to licensepo…
jonathangreen Jan 5, 2024
9a1db63
Bump pytest from 7.4.3 to 7.4.4 (#1596)
dependabot[bot] Jan 8, 2024
3345d63
Bump pycryptodome from 3.19.0 to 3.19.1 (#1595)
dependabot[bot] Jan 8, 2024
4fb6f80
Bump types-jsonschema from 4.20.0.0 to 4.20.0.20240105 (#1594)
dependabot[bot] Jan 8, 2024
50c7ac1
Bump pymarc from 5.1.0 to 5.1.1 (#1593)
dependabot[bot] Jan 8, 2024
7188743
CI check making sure DB migrations keep database in sync (#1597)
jonathangreen Jan 8, 2024
ec257c1
Migration to clean up overdrive settings (PP-797) (#1591)
jonathangreen Jan 8, 2024
aeb0b66
Fix broken Bibliotheca self test. (#1580)
dbernstein Jan 8, 2024
3eac2d8
Bump types-flask-cors from 4.0.0.2 to 4.0.0.20240106 (#1598)
dependabot[bot] Jan 9, 2024
e36dc95
Bump types-pyopenssl from 23.3.0.0 to 23.3.0.20240106 (#1599)
dependabot[bot] Jan 9, 2024
949bc71
Bump types-pillow from 10.1.0.2 to 10.1.0.20240106 (#1600)
dependabot[bot] Jan 9, 2024
576bc86
Bump types-psycopg2 from 2.9.21.20 to 2.9.21.20240106 (#1601)
dependabot[bot] Jan 9, 2024
aa834c4
Bump types-python-dateutil from 2.8.19.14 to 2.8.19.20240106 (#1603)
dependabot[bot] Jan 9, 2024
95c5be2
Bump pycryptodome from 3.19.1 to 3.20.0 (#1604)
dependabot[bot] Jan 10, 2024
eb16280
Bump pyspellchecker from 0.7.3 to 0.8.0 (#1609)
dependabot[bot] Jan 16, 2024
6ce17ef
Bump tox from 4.11.4 to 4.12.0 (#1607)
dependabot[bot] Jan 16, 2024
fdcf265
Bump jinja2 from 3.1.2 to 3.1.3 (#1606)
dependabot[bot] Jan 16, 2024
2c545e3
Bump types-pillow from 10.1.0.20240106 to 10.2.0.20240111 (#1605)
dependabot[bot] Jan 16, 2024
e349ee5
Bump flask-pydantic-spec from 0.5.0 to 0.6.0 (#1608)
dependabot[bot] Jan 16, 2024
276d0db
Ensures that large numbers of libraries can be sent to the anonymous …
dbernstein Jan 17, 2024
63f9684
Audiobook time reports default to previous month (PP-842) (#1610)
tdilauro Jan 17, 2024
1ecb647
Ensure that drm_licensor (FeedEntryType) is serialized properly. (#1611)
dbernstein Jan 17, 2024
032fe69
Merge 'origin/main' into upstream_v14.1.0
ttuovinen Feb 7, 2024
bb4a7ba
Delete obsolete config.py_admin
ttuovinen Feb 7, 2024
c9b4ad5
Fix formattings
ttuovinen Feb 7, 2024
6ed2f05
Mock OpenSearch in provider init test
ttuovinen Feb 7, 2024
e6d3806
Merge changes from origin/main to upstream_v14.1.0
ttuovinen Feb 7, 2024
0e1168b
Fix a bug in authentication
ttuovinen Feb 8, 2024
20c168c
Reorder Alembic mirgations
ttuovinen Feb 8, 2024
e0c406f
Merge branch 'main' into upstream_v14.1.0
ttuovinen Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: python
config-file: ./.github/codeql/config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: ".github/workflows/codeql-analysis.yml:analyze/language:python"
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Lint
on: [push, pull_request]
env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: "3.10"

jobs:
lint:
Expand All @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Mypy (Type check)
on: [push, pull_request]
env:
PYTHON_VERSION: 3.9
PYTHON_VERSION: "3.10"

jobs:
mypy:
Expand All @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python 🐍
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down
36 changes: 32 additions & 4 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: sudo ethtool -K eth0 tx off rx off

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
run: sudo ethtool -K eth0 tx off rx off

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down Expand Up @@ -112,6 +112,34 @@ jobs:
files: ./coverage.xml
flags: migration

docker-test-migrations:
name: Docker migration test
runs-on: ubuntu-latest
permissions:
contents: read

# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. This prevents duplicated runs on internal PRs.
# Some discussion of this here:
# https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

# See comment here: https://github.com/actions/runner-images/issues/1187#issuecomment-686735760
- name: Disable network offload
run: sudo ethtool -K eth0 tx off rx off

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Test migrations
run: ./docker/ci/test_migrations.sh

docker-image-build:
name: Docker build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -308,7 +336,7 @@ jobs:
if: false # Disable temporarily
name: Push circ-${{ matrix.image }}
runs-on: ubuntu-latest
needs: [test, test-migrations, docker-image-build, docker-image-test]
needs: [test, test-migrations, docker-test-migrations, docker-image-build, docker-image-test]
permissions:
contents: read
packages: write
Expand All @@ -334,7 +362,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ repos:
hooks:
- id: pyupgrade
args:
- --py38-plus
- --keep-runtime-typing
- --py310-plus

- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.0
Expand Down
66 changes: 44 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# E-kirjasto Circulation Manager

[![Test & Build](https://github.com/NatLibFi/ekirjasto-circulation/actions/workflows/test-build.yml/badge.svg)](https://github.com/NatLibFi/ekirjasto-circulation/actions/workflows/test-build.yml)

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
![Python: 3.10,3.11](https://img.shields.io/badge/Python-3.10%20|%203.11-blue)
This is the E-kirjasto fork of the [The Palace Project](https://thepalaceproject.org) Palace Manager (which is a fork of
[Library Simplified](http://www.librarysimplified.org/) Circulation Manager).

Expand Down Expand Up @@ -284,29 +290,29 @@ export [email protected]
As mentioned in the [pyenv](#pyenv) section, the `poetry` tool should be executed under a virtual environment
in order to guarantee that it will use the Python version you expect. To use a particular Python version,
you should create a local virtual environment in the cloned `circulation` repository directory. Assuming that
you want to use, for example, Python 3.9.9:
you want to use, for example, Python 3.11.1:

```sh
pyenv virtualenv 3.9.9 circ
pyenv virtualenv 3.11.1 circ
```

This will create a new local virtual environment called `circ` that uses Python 3.9.9. Switch to that environment:
This will create a new local virtual environment called `circ` that uses Python 3.11.1. Switch to that environment:

```sh
pyenv local circ
```

On most systems, using `pyenv` will adjust your shell prompt to indicate which virtual environment you
are now in. For example, the version of Python installed in your operating system might be `3.10.1`, but
using a virtual environment can substitute, for example, `3.9.9`:
using a virtual environment can substitute, for example, `3.11.1`:

```sh
$ python --version
Python 3.10.1

$ pyenv local circ
(circ) $ python --version
Python 3.9.9
Python 3.11.1
```

For brevity, these instructions assume that all shell commands will be executed within a virtual environment.
Expand Down Expand Up @@ -586,7 +592,7 @@ poetry install --only ci

## Testing

The Github Actions CI service runs the unit tests against Python 3.8, 3.9, 3.10, and 3.11 automatically using
The Github Actions CI service runs the unit tests against Python 3.10, and 3.11 automatically using
[tox](https://tox.readthedocs.io/en/latest/).

Tox has an environment for each python version, the module being tested, and an optional `-docker` factor that will
Expand All @@ -602,8 +608,6 @@ with service dependencies running in docker containers.

| Factor | Python Version |
| ------ | -------------- |
| py38 | Python 3.8 |
| py39 | Python 3.9 |
| py310 | Python 3.10 |
| py311 | Python 3.11 |

Expand Down Expand Up @@ -752,28 +756,46 @@ module under the hood to do the profiling.

This profiler uses [PyInstrument](https://pyinstrument.readthedocs.io/en/latest/) to profile the code.

#### Profiling tests suite

PyInstrument can also be used to profile the test suite. This can be useful to identify slow tests, or to identify
performance regressions.

To profile the core test suite, run the following command:

```sh
pyinstrument -m pytest --no-cov tests/core/
```

To profile the API test suite, run the following command:

```sh
pyinstrument -m pytest --no-cov tests/api/
```

#### Environment Variables

- `PALACE_PYINSTRUMENT`: Profiling will the enabled if this variable is set. The saved profile data will be available at
path specified in the environment variable.

- The profile data will have the extension `.pyisession`.
- The data can be accessed with the
[`pyinstrument.session.Session` class](https://pyinstrument.readthedocs.io/en/latest/reference.html#pyinstrument.session.Session).
[`pyinstrument.session.Session` class](https://pyinstrument.readthedocs.io/en/latest/reference.html#pyinstrument.session.Session).
- Example code to print details of the gathered statistics:
```python
import os
from pathlib import Path

from pyinstrument.renderers import HTMLRenderer
from pyinstrument.session import Session

path = Path(os.environ.get("PALACE_PYINSTRUMENT"))
for file in path.glob("*.pyisession"):
session = Session.load(file)
renderer = HTMLRenderer()
renderer.open_in_browser(session)
```

```python
import os
from pathlib import Path

from pyinstrument.renderers import HTMLRenderer
from pyinstrument.session import Session

path = Path(os.environ.get("PALACE_PYINSTRUMENT"))
for file in path.glob("*.pyisession"):
session = Session.load(file)
renderer = HTMLRenderer()
renderer.open_in_browser(session)
```

### Other Environment Variables

Expand Down
46 changes: 0 additions & 46 deletions alembic/versions/20230213_6f96516c7a7b_initial.py

This file was deleted.

This file was deleted.

61 changes: 0 additions & 61 deletions alembic/versions/20230412_dac99ae0c6fd_integration_status.py

This file was deleted.

Loading
Loading