Skip to content

Commit

Permalink
Merge branch 'main' into marc-alternative-titles
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-butcher authored Mar 21, 2024
2 parents eaf8815 + 4f0234f commit fb18d40
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 92 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Automatically mark any pull requests that have been inactive for 30 days as "Stale"
# then close them 3 days later if there is still no activity.
#
# Shamelessly copied from https://github.com/guardian/.github/blob/main/workflow-templates/stale.yml
name: "Stale PR Handler"

on:
schedule:
# Check for Stale PRs every Monday to Thursday morning
# Don't check on Fridays as it wouldn't be very nice to have a bot mark your PR as Stale on Friday and then close it on Monday morning!
- cron: "0 6 * * MON-THU"

permissions:
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
id: stale
# Read about options here: https://github.com/actions/stale#all-options
with:
# never automatically mark issues as stale
days-before-issue-stale: -1

# Wait 30 days before marking a PR as stale
days-before-stale: 30
stale-pr-message: >
This PR is stale because it has been open 30 days with no activity.
Unless a comment is added or the “stale” label removed, this will be closed in 3 days
# Wait 3 days after a PR has been marked as stale before closing
days-before-close: 3
close-pr-message: This PR was closed because it has been stalled for 3 days with no activity.

# Ignore PR's raised by Dependabot
exempt-pr-labels: "dependencies"
6 changes: 3 additions & 3 deletions pipeline/matcher/scripts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -839,9 +839,9 @@ [email protected]:
obliterator "^1.6.1"

node-fetch@2:
version "2.6.6"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.6.tgz#1751a7c01834e8e1697758732e9efb6eeadfaf89"
integrity sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
dependencies:
whatwg-url "^5.0.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ object MarcCurrentFrequency extends MarcDataTransformer {
field =>
field.subfields
.collect {
case MarcSubfield(tag, content)
if Seq("a", "b").contains(tag) =>
content
case MarcSubfield("a", content) => content
case MarcSubfield("b", content) => content
}
.mkString(" ")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ class MarcXMLRecordTransformerTest
<subfield code="y">Hampster Dance</subfield>
<subfield code="u">https://example.com/hampsterdance</subfield>
</datafield>
<datafield tag ="310">
<subfield code="a">Sizdah Behar on even-numbered years</subfield>
</datafield>
<datafield tag ="856">
<subfield code="y">Hampster Dance</subfield>
<subfield code="u">https://example.com/hampsterdance</subfield>
</datafield>
</record>
)
)
Expand All @@ -79,6 +86,10 @@ class MarcXMLRecordTransformerTest
_.value
) should contain theSameElementsAs Seq("8601416781396", "1477-4615")
}

it("extracts the current frequency") {
work.data.currentFrequency.get shouldBe "Sizdah Behar on even-numbered years"
}

it("extracts the current frequency") {
work.data.currentFrequency.get shouldBe "Sizdah Behar on even-numbered years"
Expand Down
15 changes: 11 additions & 4 deletions sierra_adapter/update_embargoed_holdings/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@
#
# pip-compile
#
anyio==3.7.1
# via httpcore
certifi==2021.5.30
# via httpx
# via
# httpcore
# httpx
h11==0.12.0
# via httpcore
httpcore==0.13.3
httpcore==0.15.0
# via httpx
httpx==0.18.1
httpx==0.23.0
# via -r requirements.in
idna==3.2
# via rfc3986
# via
# anyio
# rfc3986
rfc3986[idna2008]==1.5.0
# via httpx
sniffio==1.2.0
# via
# anyio
# httpcore
# httpx
Loading

0 comments on commit fb18d40

Please sign in to comment.