Skip to content

Commit 1f2a9f5

Browse files
committed
Merge branch 'release/3.6' into develop
2 parents 5d0bac0 + 025526d commit 1f2a9f5

File tree

9 files changed

+92
-150
lines changed

9 files changed

+92
-150
lines changed

CHANGELOG.rst

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@
33
CHANGELOG
44
=========
55

6+
3.6
7+
---
8+
9+
* accessibility: update hover and focus styles
10+
* chore: switch out semantic-ui for fomantic-ui and update js dependencies
11+
612
3.5
713
---
814

9-
* HathiTrust Data API client code has been removed in favor of using rsync. Configurations for **HATHITRUST_OAUTH_KEY** and **HATHITRUST_OAUTH_SECRET** are no longer needed in local settings.
15+
* bugfix: refactor add new works from HathiTrust admin functionality to use rsync instead of API to work around restrictions on Google digitized
16+
* bugfix: improve overly-aggressive keyword search stemming
17+
* bugfix: remove page data from search index when suppressing works
18+
* New manage command ``index_pages`` to reindex pages more efficiently using multiprocessing
19+
* Refactored to use parasolr instead of SolrClient
1020

1121
3.4
1222
---

DEPLOYNOTES.rst

+17-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
Deploy and Upgrade notes
44
========================
55

6+
3.6
7+
---
8+
9+
* Updates to javascript build tools used to compile fomantic-UI now require that
10+
the version of nodejs be at least v10. This is already specified via the
11+
README, but take care that deployment environments respect it or build
12+
errors will occur.
13+
614
3.5
715
---
816

@@ -15,7 +23,15 @@ Deploy and Upgrade notes
1523
a new Solr configset, using the same name you put in local settings.
1624
3. Run `python manage.py solr_schema` to update (and optionally create)
1725
your configured Solr core with your configured configset.
18-
4. Index data into your new solr core: `python manage.py index`
26+
4. Index data into your new solr core::
27+
28+
python manage.py index -i work
29+
python manage.py index_pages
30+
31+
* HathiTrust Data API client code has been removed in favor of using rsync.
32+
Configurations for **HATHITRUST_OAUTH_KEY** and **HATHITRUST_OAUTH_SECRET**
33+
are no longer needed in local settings.
34+
1935

2036
3.2
2137
---

README.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ at `<https://princeton-cdh.github.io/ppa-django/>`_.
1717
:target: https://github.com/Princeton-CDH/ppa-django/actions/workflows/unit-tests.yml
1818
:alt: Unit test status
1919

20-
.. image:: https://codecov.io/gh/Princeton-CDH/ppa-django/branch/master/graph/badge.svg
20+
.. image:: https://codecov.io/gh/Princeton-CDH/ppa-django/branch/main/graph/badge.svg
2121
:target: https://codecov.io/gh/Princeton-CDH/ppa-django
2222
:alt: Code coverage
2323

2424
.. image:: https://www.codefactor.io/repository/github/princeton-cdh/ppa-django/badge
2525
:target: https://www.codefactor.io/repository/github/princeton-cdh/ppa-django
2626
:alt: CodeFactor
2727

28-
.. image:: https://requires.io/github/Princeton-CDH/ppa-django/requirements.svg?branch=master
29-
:target: https://requires.io/github/Princeton-CDH/ppa-django/requirements/?branch=master
28+
.. image:: https://requires.io/github/Princeton-CDH/ppa-django/requirements.svg?branch=main
29+
:target: https://requires.io/github/Princeton-CDH/ppa-django/requirements/?branch=main
3030
:alt: Requirements Status
3131

32-
This repo uses `git-flow <https://github.com/nvie/gitflow>`_ conventions; **master**
32+
This repo uses `git-flow <https://github.com/nvie/gitflow>`_ conventions; **main**
3333
contains the most recent release, and work in progress will be on the **develop** branch.
3434
Pull requests should be made against develop.
3535

@@ -199,7 +199,7 @@ Github Pages. After the build completes, push to GitHub from the ``docs`` folder
199199

200200
License
201201
-------
202-
This project is licensed under the `Apache 2.0 License <https://github.com/Princeton-CDH/ppa-django/blob/master/LICENSE>`_.
202+
This project is licensed under the `Apache 2.0 License <https://github.com/Princeton-CDH/ppa-django/blob/main/LICENSE>`_.
203203

204204
©2019 Trustees of Princeton University. Permission granted via
205205
Princeton Docket #20-3624 for distribution online under a standard Open Source

ppa/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version_info__ = (3, 5, 0, 'dev')
1+
__version_info__ = (3, 6, 0, None)
22

33

44
# Dot-connect all but the last. Last is dash-connected if not None.

ppa/archive/management/commands/generate_corpus.py

-7
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,6 @@ def __init__(self, name, doc_limit=-1, preprocess_fns=None, pbar=True):
154154
results = SolrQuerySet() \
155155
.facet(SolrCorpus.DOC_ID_FIELD, limit=self.doc_limit)
156156

157-
print('*** solrqueryset')
158-
print(results)
159-
print(results.get_facets().facet_fields)
160-
161157
"""
162158
An OrderedDict of doc_id => page count mapping
163159
An OrderedDict is important here in case we want to save document-level
@@ -184,9 +180,6 @@ def __iter__(self):
184180
format(doc_id))
185181
continue
186182

187-
print('*** solrqueryset')
188-
print(SolrQuerySet)
189-
190183
result = SolrQuerySet() \
191184
.search(**{SolrCorpus.DOC_ID_FIELD: doc_id}) \
192185
.order_by(SolrCorpus.PAGE_ORDER_FIELD)

ppa/archive/templates/archive/add_from_hathi.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ <h2>Processed {{ results|length }} HathiTrust Identifier{{ results|pluralize}}.<
3535
<td>{{ htid }}</td>
3636
<td>{{ result }}</td>
3737
{% if 'Success' in result or htid in existing_ids %}
38-
<td><a href="{{ admin_urls|dict_item:htid }}" target="_blank">
38+
<td><a href="{{ admin_urls|dict_item:htid }}" target="_blank" rel="noopener noreferrer">
3939
View in Admin</a></td>
40-
<td><a href="{% url 'archive:detail' htid %}" target="_blank">
40+
<td><a href="{% url 'archive:detail' htid %}" target="_blank" rel="noopener noreferrer">
4141
View on Site</a></td>
4242
{% else %}
4343
<td></td><td></td>

ppa/archive/templates/archive/digitizedwork_detail.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ <h1 class="header">{{ object.title }}</h1>
8787
<th scope="row">View{% if object.source == object.OTHER %} external record
8888
{% else %} on {{ object.get_source_display }}{% endif %}</th>
8989
<td>
90-
<a href="{{ object.source_url }}" target="_blank">{{ object.source_id }}</a>
90+
<a href="{{ object.source_url }}" target="_blank" rel="noopener noreferrer">{{ object.source_id }}</a>
9191
</td>
9292
</tr>
9393
{% endif %}

ppa/archive/templates/archive/snippets/page_preview.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="page">
1212
<div class="preview">
1313
<a href="{% page_url item_id page.order %}"
14-
target=_blank>
14+
target="_blank" rel="noopener noreferrer">
1515
{% page_image_url item_id page.order 225 as 1x_img %}
1616
{% page_image_url item_id page.order 450 as 2x_img %}
1717
{# img with data-src/srcset attributes for lazy-loading #}
@@ -27,7 +27,7 @@
2727
{% if page.title %}<a>p. {{ page.title }}</a>{% endif %}
2828
<div class="snippets">
2929
<p class="page-number">
30-
<a href="{% page_url item_id page.order %}" target=_blank>
30+
<a href="{% page_url item_id page.order %}" target="_blank" rel="noopener noreferrer">
3131
p. {{ page.label }}
3232
</a>
3333
</p>

requirements.lock

+53-130
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,59 @@
1-
alabaster==0.7.12
2-
appnope==0.1.0
3-
atomicwrites==1.3.0
4-
attrs==19.1.0
5-
Babel==2.7.0
6-
backcall==0.1.0
7-
beautifulsoup4==4.6.0
8-
bleach==3.1.0
9-
boto==2.49.0
10-
boto3==1.9.174
11-
botocore==1.12.174
12-
cached-property==1.5.1
13-
certifi==2019.3.9
14-
chardet==3.0.4
15-
coverage==4.5.3
16-
cycler==0.10.0
17-
Cython==0.29.13
18-
decorator==4.4.0
19-
defusedxml==0.6.0
20-
dictionaries==0.0.1
21-
Django==2.2.12
22-
django-apptemplates==1.4
23-
django-cas-ng==3.6.0
24-
django-csp==3.5
25-
django-debug-toolbar==2.0
26-
django-fullurl==1.0
27-
django-grappelli==2.13.3
28-
django-modelcluster==5.0.1
1+
attrdict==2.0.1
2+
beautifulsoup4==4.8.2
3+
bleach==3.3.0
4+
cached-property==1.5.2
5+
certifi==2020.12.5
6+
chardet==4.0.0
7+
dataclasses==0.8
8+
dictionaries==0.0.2
9+
Django==2.2.23
10+
django-apptemplates==1.5
11+
django-cas-ng==4.1.1
12+
django-csp==3.7
13+
django-fullurl==1.1
14+
django-grappelli==2.15.1
15+
django-modelcluster==5.1
2916
django-semanticui-forms==1.6.5
30-
django-taggit==1.2.0
31-
django-treebeard==4.3
32-
django-webpack-loader==0.6.0
33-
djangorestframework==3.9.4
34-
docutils==0.14
35-
draftjs-exporter==2.1.6
36-
entrypoints==0.3
17+
django-taggit==1.4.0
18+
django-treebeard==4.5.1
19+
django-webpack-loader==1.0.0
20+
djangorestframework==3.12.4
21+
draftjs-exporter==2.1.7
3722
eulxml==1.1.3
38-
funcy==1.12
39-
future==0.17.1
40-
gensim==3.7.3
41-
html5lib==1.0.1
42-
idna==2.8
43-
imagesize==1.1.0
44-
importlib-metadata==0.17
45-
ipykernel==5.1.2
46-
ipython==7.7.0
47-
ipython-genutils==0.2.0
48-
ipywidgets==7.5.1
49-
jedi==0.15.1
50-
Jinja2==2.10.1
51-
jmespath==0.9.4
52-
joblib==0.13.2
53-
jsonschema==3.0.2
54-
jupyter==1.0.0
55-
jupyter-client==5.3.1
56-
jupyter-console==6.0.0
57-
jupyter-core==4.5.0
58-
kazoo==2.2.1
59-
kiwisolver==1.1.0
60-
l18n==2018.5
61-
ldap3==2.6
62-
lxml==4.3.3
63-
MarkupSafe==1.1.1
64-
matplotlib==3.1.1
65-
mistune==0.8.4
66-
more-itertools==7.0.0
67-
mysqlclient==1.4.2.post1
68-
nbconvert==5.6.0
69-
nbformat==4.4.0
70-
notebook==6.0.0
71-
numexpr==2.6.9
72-
numpy==1.16.4
73-
oauthlib==3.0.1
74-
packaging==19.0
23+
gensim==4.0.1
24+
html5lib==1.1
25+
idna==2.10
26+
l18n==2020.6.1
27+
ldap3==2.9
28+
lxml==4.6.3
29+
mysqlclient==2.0.3
30+
numpy==1.19.5
31+
oauthlib==3.1.0
32+
packaging==20.9
7533
Pairtree==0.8.1
76-
pandas==0.24.2
77-
pandocfilters==1.4.2
78-
parso==0.5.1
79-
pexpect==4.7.0
80-
pickleshare==0.7.5
81-
Pillow==5.4.1
82-
pluggy==0.12.0
34+
parasolr==0.6.1
35+
Pillow==7.2.0
8336
ply==3.11
84-
progressbar2==3.42.0
85-
prometheus-client==0.7.1
86-
prompt-toolkit==2.0.9
87-
ptyprocess==0.6.0
88-
pucas==0.6.0
89-
py==1.8.0
90-
py-flags==1.1.2
91-
pyasn1==0.4.5
92-
Pygments==2.4.2
93-
pyLDAvis==2.1.2
94-
pymarc==3.1.13
95-
pyparsing==2.4.0
96-
pyrsistent==0.15.4
97-
pytest==5.4.1
98-
pytest-cov==2.7.1
99-
pytest-django==3.5.1
100-
python-cas==1.4.0
101-
python-dateutil==2.8.0
102-
python-utils==2.3.0
103-
pytz==2019.1
104-
pyzmq==18.1.0
105-
qtconsole==4.5.3
106-
requests==2.22.0
107-
requests-oauthlib==1.2.0
108-
s3transfer==0.2.1
109-
scipy==1.3.0
110-
Send2Trash==1.5.0
111-
six==1.12.0
112-
smart-open==1.8.4
113-
snowballstemmer==1.2.1
114-
-e [email protected]:rlskoeser/SolrClient.git@7420ab3ca97be6fcc178d74e10c136b73b332edd#egg=SolrClient
115-
Sphinx==2.1.2
116-
sphinxcontrib-applehelp==1.0.1
117-
sphinxcontrib-devhelp==1.0.1
118-
sphinxcontrib-htmlhelp==1.0.2
119-
sphinxcontrib-jsmath==1.0.1
120-
sphinxcontrib-qthelp==1.0.2
121-
sphinxcontrib-serializinghtml==1.1.3
122-
sqlparse==0.3.0
123-
termcolor==1.1.0
124-
terminado==0.8.2
125-
testpath==0.4.2
126-
tornado==6.0.3
127-
traitlets==4.3.2
128-
Unidecode==1.0.23
129-
urllib3==1.25.3
130-
wagtail==2.8.1
131-
Wand==0.5.4
132-
wcwidth==0.1.7
37+
progressbar2==3.53.1
38+
pucas==0.7.0
39+
py-flags==1.1.4
40+
pyasn1==0.4.8
41+
pymarc==4.1.0
42+
pyparsing==2.4.7
43+
python-cas==1.5.0
44+
python-utils==2.5.6
45+
pytz==2021.1
46+
requests==2.25.1
47+
requests-oauthlib==1.3.0
48+
scipy==1.5.4
49+
six==1.16.0
50+
smart-open==5.0.0
51+
soupsieve==2.2.1
52+
sqlparse==0.4.1
53+
Unidecode==1.2.0
54+
urllib3==1.26.4
55+
wagtail==2.9.3
56+
Wand==0.6.6
13357
webencodings==0.5.1
134-
widgetsnbextension==3.5.1
13558
Willow==1.3
136-
zipp==0.5.1
59+
XlsxWriter==1.4.3

0 commit comments

Comments
 (0)