Skip to content

Commit 5c7a707

Browse files
authored
Merge pull request #20 from arXiv/update-for-subdomain-url
update urls for oaipmh subdomain
2 parents 31f61ee + f8876a7 commit 5c7a707

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

oaipmh/data/oai_config.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,33 @@
77
SUPPORTED_METADATA_FORMATS={
88
"oai_dc":MetadataFormat(
99
prefix="oai_dc",
10-
schema="http://www.openarchives.org/OAI/2.0/oai_dc.xsd",
10+
schema="https://www.openarchives.org/OAI/2.0/oai_dc.xsd",
1111
namespace="http://www.openarchives.org/OAI/2.0/oai_dc/",
1212
all_versions=True
1313
),
1414
"arXiv":MetadataFormat(
1515
prefix="arXiv",
16-
schema="http://arxiv.org/OAI/arXiv.xsd",
16+
schema="https://oaipmh.arxiv.org/OAI/arXiv.xsd",
1717
namespace="http://arxiv.org/OAI/arXiv/",
1818
all_versions=False
1919
),
2020
"arXivOld":MetadataFormat(
2121
prefix="arXivOld",
22-
schema="http://arxiv.org/OAI/arXivOld.xsd",
22+
schema="https://oaipmh.arxiv.org/OAI/arXivOld.xsd",
2323
namespace="http://arxiv.org/OAI/arXivOld/",
2424
all_versions=False
2525
),
2626
"arXivRaw":MetadataFormat(
2727
prefix="arXivRaw",
28-
schema="http://arxiv.org/OAI/arXivRaw.xsd",
28+
schema="https://oaipmh.arxiv.org/OAI/arXivRaw.xsd",
2929
namespace="http://arxiv.org/OAI/arXivRaw/",
3030
all_versions=True
3131
),
3232
}
3333

3434
#required definiton
3535
REPOSITORY_NAME='arXiv'
36-
BASE_URL='https://arxiv.org/oai'
36+
BASE_URL='https://oaipmh.arxiv.org/oai'
3737
PROTOCOL_VERSION='2.0'
3838
EARLIEST_DATE=datetime(2005, 9, 16, 0, 0, tzinfo=timezone.utc) #earliest modtime of a current version of a paper, there are ~90K with this value
3939
DELETED_RECORD='persistent'

oaipmh/templates/record_formats.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{% endmacro%}
1818

1919
{% macro oai_dc_record(record) %}
20-
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
20+
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ https://www.openarchives.org/OAI/2.0/oai_dc.xsd">
2121
<dc:title>{{record.current_meta.title}}</dc:title>
2222
{% for author in record.authors %}
2323
<dc:creator>{{author[0]}}{% if author[2] %} {{ author[2] }}{% endif %}{% if author[1] %}, {{ author[1] }}{% endif %}</dc:creator>
@@ -53,7 +53,7 @@
5353
{% endmacro%}
5454

5555
{% macro arXiv_record(record) %}
56-
<arXiv xmlns="http://arxiv.org/OAI/arXiv/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXiv/ http://arxiv.org/OAI/arXiv.xsd">
56+
<arXiv xmlns="http://arxiv.org/OAI/arXiv/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXiv/ https://oaipmh.arxiv.org/OAI/arXiv.xsd">
5757
<id>{{record.current_meta.paper_id}}</id>
5858
<created>{{record.current_meta.created.strftime('%Y-%m-%d')}}</created>
5959
{% if record.current_meta.updated %}
@@ -107,7 +107,7 @@
107107
{% endmacro%}
108108

109109
{% macro arXivRaw_record(record) %}
110-
<arXivRaw xmlns="http://arxiv.org/OAI/arXivRaw/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXivRaw/ http://arxiv.org/OAI/arXivRaw.xsd">
110+
<arXivRaw xmlns="http://arxiv.org/OAI/arXivRaw/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXivRaw/ https://oaipmh.arxiv.org/OAI/arXivRaw.xsd">
111111
<id>{{record.current_meta.paper_id}}</id>
112112
<submitter>{{record.current_meta.submitter_name}}</submitter>
113113
{% for version in record.versions %}
@@ -153,7 +153,7 @@
153153
{% endmacro%}
154154

155155
{% macro arXivOld_record(record) %}
156-
<arXivOld xmlns="http://arxiv.org/OAI/arXivOld/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXivOld/ http://arxiv.org/OAI/arXivOld.xsd">
156+
<arXivOld xmlns="http://arxiv.org/OAI/arXivOld/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXivOld/ https://oaipmh.arxiv.org/OAI/arXivOld.xsd">
157157
<id>{{record.current_meta.paper_id}}</id>
158158
<title>{{record.current_meta.title}}</title>
159159
<authors>{{record.current_meta.authors}}</authors>

tests/test_identify.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_contents(test_client):
3636

3737
text=response.get_data(as_text=True)
3838
assert "<repositoryName>arXiv</repositoryName>" in text
39-
assert "<baseURL>https://arxiv.org/oai</baseURL>" in text
39+
assert "<baseURL>https://oaipmh.arxiv.org/oai</baseURL>" in text
4040
assert "<earliestDatestamp>2005-09-16</earliestDatestamp>" in text
4141
assert "<granularity>YYYY-MM-DD</granularity>" in text
4242
assert "<description>" in text

tests/test_list_meta_formats.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def test_good_params(test_client):
99
assert "<error code=" not in text
1010
assert '<metadataPrefix>arXiv</metadataPrefix>' in text
1111
assert '<metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>' in text
12-
assert '<schema>http://arxiv.org/OAI/arXivRaw.xsd</schema>' in text
12+
assert '<schema>https://oaipmh.arxiv.org/OAI/arXivRaw.xsd</schema>' in text
1313
assert '<ListMetadataFormats>' in text
1414
assert '<request verb="ListMetadataFormats">' in text
1515

@@ -30,7 +30,7 @@ def test_good_params(test_client):
3030
assert "<error code=" not in text
3131
assert '<metadataPrefix>arXiv</metadataPrefix>' in text
3232
assert '<metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>' in text
33-
assert '<schema>http://arxiv.org/OAI/arXivRaw.xsd</schema>' in text
33+
assert '<schema>https://oaipmh.arxiv.org/OAI/arXivRaw.xsd</schema>' in text
3434
assert '<ListMetadataFormats>' in text
3535
assert '<request verb="ListMetadataFormats" identifier="oai:arXiv.org:1001.3172">' in text
3636

tests/test_record_format.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_oai_dc_format(test_client):
1616
response = test_client.get("/oai", query_string=params)
1717
assert response.status_code == 200
1818
text=response.get_data(as_text=True)
19-
assert '<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">' in text
19+
assert '<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ https://www.openarchives.org/OAI/2.0/oai_dc.xsd">' in text
2020
assert '<dc:title>Gauge Fixing in the Maxwell Like Gravitational Theory in Minkowski Spacetime and in the Equivalent Lorentzian Spacetime</dc:title>' in text
2121
assert '<dc:creator>Rodrigues Jr, Waldyr A.</dc:creator>' in text
2222
assert '<dc:creator>da Rocha, Roldao</dc:creator>' in text
@@ -37,7 +37,7 @@ def test_arXivOld_format(test_client):
3737
response = test_client.get("/oai", query_string=params)
3838
assert response.status_code == 200
3939
text=response.get_data(as_text=True)
40-
assert '<arXivOld xmlns="http://arxiv.org/OAI/arXivOld/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXivOld/ http://arxiv.org/OAI/arXivOld.xsd">' in text
40+
assert '<arXivOld xmlns="http://arxiv.org/OAI/arXivOld/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXivOld/ https://oaipmh.arxiv.org/OAI/arXivOld.xsd">' in text
4141
assert '<id>0806.4129</id>' in text
4242
assert '<title>Gauge Fixing in the Maxwell Like Gravitational Theory in Minkowski Spacetime and in the Equivalent Lorentzian Spacetime</title>' in text
4343
assert '<authors>Roldao da Rocha, Waldyr A. Rodrigues Jr</authors>' in text
@@ -55,7 +55,7 @@ def test_arXiv_format(test_client):
5555
response = test_client.get("/oai", query_string=params)
5656
assert response.status_code == 200
5757
text=response.get_data(as_text=True)
58-
assert '<arXiv xmlns="http://arxiv.org/OAI/arXiv/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXiv/ http://arxiv.org/OAI/arXiv.xsd">' in text
58+
assert '<arXiv xmlns="http://arxiv.org/OAI/arXiv/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXiv/ https://oaipmh.arxiv.org/OAI/arXiv.xsd">' in text
5959
assert '<id>0806.4129</id>' in text
6060
assert '<title>Gauge Fixing in the Maxwell Like Gravitational Theory in Minkowski Spacetime and in the Equivalent Lorentzian Spacetime</title>' in text
6161
assert '<keyname>da Rocha</keyname>' in text
@@ -75,7 +75,7 @@ def test_arXivRaw_format(test_client):
7575
response = test_client.get("/oai", query_string=params)
7676
assert response.status_code == 200
7777
text=response.get_data(as_text=True)
78-
assert '<arXivRaw xmlns="http://arxiv.org/OAI/arXivRaw/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXivRaw/ http://arxiv.org/OAI/arXivRaw.xsd">' in text
78+
assert '<arXivRaw xmlns="http://arxiv.org/OAI/arXivRaw/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://arxiv.org/OAI/arXivRaw/ https://oaipmh.arxiv.org/OAI/arXivRaw.xsd">' in text
7979
assert '<id>0806.4129</id>' in text
8080
assert '<title>Gauge Fixing in the Maxwell Like Gravitational Theory in Minkowski Spacetime and in the Equivalent Lorentzian Spacetime</title>' in text
8181
assert '<authors>Roldao da Rocha, Waldyr A. Rodrigues Jr</authors>' in text

0 commit comments

Comments
 (0)