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

Release v3.12 #640

Merged
merged 81 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
6169c45
search within cluster revisions (#593)
rlskoeser Feb 29, 2024
9a25d25
Don't display uncategorized collection in search if facet count is zero
rlskoeser Feb 29, 2024
e415610
Merge branch 'release/3.11.3' into develop
rlskoeser Feb 29, 2024
ff397b5
Manage command to update hathitrust page counts (#594); do not save o…
rlskoeser Mar 5, 2024
9f514dd
Fix for pairtree prefix and version file issue (#611)
laurejt Mar 5, 2024
85bbf8f
Update codecov action for javascript unit tests to v4
rlskoeser Mar 7, 2024
6fc5420
Add method to get first page in original page range for excerpts
rlskoeser Mar 7, 2024
63d9079
Preliminary manage command to check on excerpt page range mismatches
rlskoeser Mar 7, 2024
0c89dd2
Handle rsync for more records at once, add optional output dir param
rlskoeser Mar 7, 2024
5555927
Update hathi_rsync command for bulk rsync, report on updated htids
rlskoeser Mar 7, 2024
77f35d0
Update tests for change to where mets xml is loaded
rlskoeser Mar 7, 2024
7be1c08
Update ppa/archive/import_util.py
rlskoeser Mar 7, 2024
4108474
Update ppa/archive/management/commands/hathi_rsync.py
rlskoeser Mar 7, 2024
4d71678
Update ppa/archive/management/commands/hathi_rsync.py
rlskoeser Mar 7, 2024
c233378
Report skipped htid; use proper temp directory; report any changed files
rlskoeser Mar 7, 2024
1cab68d
Implement & test validation for rsync output directory
rlskoeser Mar 7, 2024
4cdfeaf
Feature/excerpt revisions (#616)
rlskoeser Mar 7, 2024
99c7059
Update ppa/archive/management/commands/hathi_rsync.py
rlskoeser Mar 8, 2024
d4e7145
Update ppa/archive/import_util.py
rlskoeser Mar 8, 2024
b758fa2
Update ppa/archive/tests/test_import_util.py
rlskoeser Mar 8, 2024
380e04b
Improve readability and formatting based on suggestions from @laurejt
rlskoeser Mar 8, 2024
11a2815
Remove debug print statement; document how csv header row is populated
rlskoeser Mar 8, 2024
42bb5ad
Merge branch 'feature/hathi-rsync-all' into develop
rlskoeser Mar 8, 2024
50d67b0
Remove extraneous tabs in page count script summary output
rlskoeser Mar 8, 2024
672dc6e
Merge pull request #615 from Princeton-CDH/feature/check-excerpt-page…
jerielizabeth Mar 11, 2024
3538f5d
Implement and test 303 redirect for multiple cluster params (#621)
rlskoeser Mar 19, 2024
468496e
Fix 1-based indexing when checking excerpt page ranges
rlskoeser Mar 19, 2024
2c645d5
Merge branch 'hotfix/3.11.4' into develop
rlskoeser Mar 20, 2024
0fdb842
Feature/collect version labels (#624)
laurejt Mar 21, 2024
bd7a6b1
Customize fields when saving as new #591
rlskoeser Mar 21, 2024
c34c92d
Handle excerpt page count & indexing when saving new records #591
rlskoeser Mar 21, 2024
191e84b
Update unit tests and remove redundant excerpt logic
rlskoeser Mar 22, 2024
c82fd2f
Update tests so creating test excerpts works without hathi data
rlskoeser Mar 22, 2024
766c264
Merge pull request #628 from Princeton-CDH/save-new-excerpts
rlskoeser Mar 22, 2024
5bc539b
Include protected_fields in read-only fields copied when saving as new
rlskoeser Mar 25, 2024
f586df1
Make protected_fields editable so we can copy when using save as new
rlskoeser Mar 25, 2024
07fe596
Make protected_fields not required when editing in admin
rlskoeser Mar 25, 2024
36f6065
Handle empty string when converting value to protected field flag
rlskoeser Mar 25, 2024
9954fcc
Remove debug print statement in admin view
rlskoeser Mar 25, 2024
c07effc
Warn on missing page count; improve output for negative work/page diff
rlskoeser Mar 28, 2024
203c682
New manage command to update excerpt digital page range
rlskoeser Mar 28, 2024
0379a08
Update adjust_excerpts to avoid duplication, add unit tests
rlskoeser Mar 28, 2024
d296e0a
Update tests so they do not error without hathi data setting
rlskoeser Mar 28, 2024
a8677c0
Merge pull request #634 from Princeton-CDH/feature/fix-excerpt-pages
rlskoeser Mar 28, 2024
401f44c
Check the correct variable for negative page count difference
rlskoeser Mar 28, 2024
ae124a0
Add old work id field to DigitizedWork
rlskoeser Apr 4, 2024
94d22e0
Data migration to populate old work id for excerpt + first digital page
rlskoeser Apr 4, 2024
df468e7
Update digitized work url and view to use original start page
rlskoeser Apr 4, 2024
f8a4930
Add unique constraint on source id + original page range
rlskoeser Apr 4, 2024
0d169c1
Add redirect based on old work id (first digital page)
rlskoeser Apr 4, 2024
3f61db2
Merge pull request #635 from Princeton-CDH/feature/excerpt-stable-ids
rlskoeser Apr 4, 2024
1f1dba7
Configure wagtail admin base url
rlskoeser Apr 4, 2024
93b42d8
Remove unsupported draftail feature 'document'
rlskoeser Apr 4, 2024
1e286eb
Refactor django settings to use split-settings approach
rlskoeser Apr 4, 2024
f907a8f
Simplify unit test setup; only testing on postgresql, not mysql
rlskoeser Apr 4, 2024
d918cb3
Update sphinx workflow for local settings path change
rlskoeser Apr 4, 2024
05d2f3e
Remove unused test requirements file (out of date, overlaps with dev)
rlskoeser Apr 4, 2024
ebe3607
Suppress deprecation warnings when running pytest
rlskoeser Apr 4, 2024
e3b482d
Update and clean up sample local settings
rlskoeser Apr 4, 2024
a2e3442
Merge pull request #636 from Princeton-CDH/cleanup-warnings
rlskoeser Apr 4, 2024
c611cbe
Cleanup debug print statements in unit tests
rlskoeser Apr 4, 2024
37ec6e0
Document order of steps (rsync, reindex, correct excerpts) for deploy
rlskoeser Apr 4, 2024
3dd8e8b
Fix formatting in deploy notes; clarify local settings change
rlskoeser Apr 4, 2024
12d1da9
Fix configuration for optional django-debug-toolbar
rlskoeser Apr 4, 2024
07ac7a5
Fix configuration for optional django-debug-toolbar
rlskoeser Apr 4, 2024
ed0f4d8
Actually commit import of debug_toolbar to check for import error
rlskoeser Apr 4, 2024
00b8771
Index work first page as string instead of integer in solr
rlskoeser Apr 4, 2024
2065c1e
Link to original source must use first digital page, not original
rlskoeser Apr 5, 2024
5d5ed2a
Adjust and test view regex for excerpt with single page
rlskoeser Apr 8, 2024
c9e4f86
Update DigitizedWork string method to use original pages
rlskoeser Apr 8, 2024
e21e49f
Improve behavior for digwork admin source link #427
rlskoeser Apr 8, 2024
83f6a63
Add custom validation to ensure source id + first page orig is unique
rlskoeser Apr 8, 2024
14294af
Use mock to skip trying to index pages when testing clean logic
rlskoeser Apr 8, 2024
8ddeb9f
Merge pull request #637 from Princeton-CDH/feature/revise-excerpt-ids
rlskoeser Apr 8, 2024
f96c3d8
Correct hathi page link generation for excerpts in admin #427
rlskoeser Apr 9, 2024
0c94b90
Update hathi page url to use normal url params syntax
rlskoeser Apr 9, 2024
ff23f31
Exclude current object when validating first page unique for source
rlskoeser Apr 9, 2024
fb654f7
Merge pull request #638 from Princeton-CDH/feature/revise-excerpt-ids
rlskoeser Apr 9, 2024
3264dc7
Set version to 3.12 and document changes
rlskoeser Apr 11, 2024
81f05df
Update npm packages via npm audit fix
rlskoeser Apr 11, 2024
3953a6d
Require parasolr 0.9.2
rlskoeser Apr 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/sphinx_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: pip install -r dev-requirements.txt

- name: Setup local_settings.py
run: python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> ppa/local_settings.py
run: python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> ppa/settings/local_settings.py

- name: Build Sphinx docs
run: cd sphinx-docs && make -b coverage html
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ on:
- cron: "0 16 * * 2"

env:
DB_NAME: ppa
DB_USER: ppa
DB_PASSWORD: ppa
DJANGO_ENV: test

jobs:
js-unit:
Expand All @@ -28,7 +26,7 @@ jobs:
${{ runner.os }}-node-
- run: npm ci
- run: npm run test:unit
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
flags: javascript

Expand All @@ -49,13 +47,6 @@ jobs:
ports:
- 8983:8983
steps:
# Set the value of DJANGO_DB_BACKEND which is used in ci/testsettings.py to
# configure django's ORM based on whether we're testing postgres or mysql
- name: Set django database backend adapter
env:
BACKEND: postgresql
run: echo "DJANGO_DB_BACKEND=$(echo "$BACKEND")" >> $GITHUB_ENV

- name: Checkout repository
uses: actions/checkout@v4

Expand Down Expand Up @@ -89,12 +80,10 @@ jobs:
pip install -r dev-requirements.txt

- name: Setup local_settings.py
run: |
cp ci/testsettings.py ppa/local_settings.py
python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> ppa/local_settings.py
run: python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> ppa/settings/local_settings.py

- name: Run pytest
run: py.test --cov=./ --cov-report=xml
run: pytest --cov=./ --cov-report=xml

- name: Upload test coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
CHANGELOG
=========

3.12
----
- As an admin, I want the Source ID link in list view to go to the first page of the excerpt for articles and excerpts, so that I can more easily access excerpt content.
- As a developer, I want a script to do a one-time bulk fix of HathiTrust excerpt page ranges from a spreadsheet so that we can pull the corret content from updated HathiTrust materials.
- As a developer, I want a script to update all HathiTrust content so that I can refresh locally cached data with OCR improvements and other changes.
- bugfix: excerpt work ID is now based on sourceID + original page range
rather than digital page range
- bugfix: fix indexing and page count for new excerpts when there are multiple excerpts from a single source
- bugfix: improved index_pages script error handling for missing page count
in database when running in expedited mode
- new manage command to to report on possible HathiTrust excerpt page range mismatches based on page labels in METS-ALTO
- utility script to get volume last modification date from public HathiTrust website
- updated settings to use django-split-settings
- address deprecation warnings and suppress warnings for dependencies

3.11.4
------

Expand Down
26 changes: 26 additions & 0 deletions DEPLOYNOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@
Deploy and Upgrade notes
========================

3.12
----

* Settings are now configured with django-split-settings as a module;
local_settings.py must be moved to ppa/settings/local_settings.py
* Index ids for excerpts have changed; this requires reindexing works
and pages for excerpts and articles; pages should be indexed
after running rsync. To reindex works::

python manage.py index -i work

* Local pairtree data should be updated for all HathiTrust works::

python manage.py hathi_rsync

* After pairtree content has been updated, pages should be updated
in Solr::

python manage.py index_pages

* Digital page ranges for HathiTrust excerpts should be corrected
using a CSV file provided by the project team::

python manage.py adjust_excerpts HT_excerpt_corrections.csv


3.11.2
------

Expand Down
21 changes: 7 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Initial setup and installation:

- Copy sample local settings and configure for your environment::

cp ppa/local_settings.py.sample ppa/local_settings.py
cp ppa/settings/local_settings.py.sample ppa/settings/local_settings.py

- Create a database, configure in local settings in the `DATABASES` dictionary, change `SECRET_KEY`, and run migrations::

Expand Down Expand Up @@ -109,29 +109,22 @@ either set of assets frequently. These two processes are separate as well::
Tests
~~~~~

Python unit tests are written with `py.test <http://doc.pytest.org/>`_ but use
Python unit tests are written with `pytest <http://doc.pytest.org/>`_ but use
Django fixture loading and convenience testing methods when that makes
things easier. To run them, first install development requirements::

pip install -r dev-requirements.txt

Run tests using py.test. Note that this currently requires the
top level project directory be included in your python path. You can
accomplish this either by calling pytest via python::
To run all python unit tests, use: `pytest`

python -m pytest

Or, if you wish to use the ``pytest`` command directly, simply add the
top-level project directory to your python path environment variable::

setenv PYTHONPATH . # csh
export PYTHONPATH=. # bash
Some deprecation warnings for dependencies have been suppressed in
pytest.ini; to see warnings, run with `pytest -Wd`.

Make sure you configure a test solr connection and set up an empty
Solr core using the same instructions as for the development core.

Note that python unit tests access a test server over HTTP, and therefore
expect static files to be compiled see "Frontend development setup" above
Some python unit tests access rendered views, and therefore
expect static files to be compiled; see "Frontend development setup" above
for how to do this.

In a CI context, we use a fake webpack loader backend that ignores missing assets.
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-r requirements.txt
pytest>=5.0
pytest>=7.0
pytest-django>=4.5.2
pytest-cov
django-debug-toolbar
Expand Down
Loading
Loading