Skip to content

Commit

Permalink
Resolve #403 speed issue, but at 45 minutes, the best we can do (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life authored Apr 27, 2023
1 parent 8fed4c2 commit 8f44544
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Python build, virtual environments, and buildouts
.venv
venv
__pycache__/
dist/
Expand Down
9 changes: 5 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ install_requires =
itsdangerous==2.0.1
jinja2==3.0.1
jsonschema==3.0.0
lxml>=4.5
lxml==4.6.3
nltk==3.5
numpy>=1.18
numpy==1.21.2
openapi-schema-validator==0.1.4
openpyxl~=3.0.7
pandas~=1.4.4
pandas==1.3.4
python-dateutil>=2.8
python-jose[cryptography]
pytz==2020.1
Expand Down Expand Up @@ -86,7 +86,7 @@ dev =
pre-commit
sphinx
sphinxcontrib-napoleon
tox
tox==3.28.0
flask_testing==0.8.0
sphinx-rtd-theme==0.5.0
sphinx-argparse==0.2.5
Expand All @@ -103,6 +103,7 @@ dev =
types-requests
types-six
types-waitress
virtualenv==20.8.1

# 👉 Note: The ``-stubs`` and ``types-`` dependencies above ↑ in the ``dev``
# extra must be duplicated in ``.pre-commit-config.yaml`` in order for ``tox``
Expand Down
2 changes: 1 addition & 1 deletion src/pds_doi_service/api/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""
import datetime
import typing
from collections import Iterable
from typing import Iterable

import six

Expand Down
2 changes: 0 additions & 2 deletions src/pds_doi_service/core/actions/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ def _update_dois(self, dois):
return updated_dois

def _get_doi_record_from_pds_identifier(self, pds_identifier):

# Get the record from the transaction database for the current DOI value
transaction_record = self._list_action.transaction_for_identifier(pds_identifier)

Expand All @@ -265,7 +264,6 @@ def _get_doi_record_from_pds_identifier(self, pds_identifier):
return existing_dois[0]

def _get_doi_record_from_doi_identifier(self, doi_identifier):

# Get the record from the transaction database for the current DOI value
transaction_record = self._list_action.transaction_for_doi(doi_identifier)

Expand Down
1 change: 0 additions & 1 deletion src/pds_doi_service/core/input/input_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@


class DOIInputUtil:

MANDATORY_COLUMNS = [
"title",
"publication_date",
Expand Down
5 changes: 3 additions & 2 deletions src/pds_doi_service/core/outputs/test/doi_validator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,9 @@ def test_identifier_validation_doi_id_mismatch(self):
self._doi_validator._check_identifier_fields(doi_obj)

def test_site_url_validation(self):
""" """
# Test with an unreachable (fake) URL
"""
Test validation of site URLs with an unreachable (fake) URL.
"""
doi_obj = Doi(
title=self.title + " different",
publication_date=self.transaction_date,
Expand Down
2 changes: 1 addition & 1 deletion src/pds_doi_service/core/util/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def get_config_defaults_filepath():
def _resolve_relative_path(parser):
# resolve relative path with sys.prefix base path
for section in parser.sections():
for (key, val) in parser.items(section):
for key, val in parser.items(section):
if key.endswith("_file") or key.endswith("_dir"):
parser[section][key] = os.path.abspath(os.path.join(sys.prefix, val))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class ContributorsUtilTestCase(unittest.TestCase):
)

def test_authorized_contributor(self):

authorized_contributor = (
"Cartography and Imaging Sciences Discipline" in self._doi_contributor_util.get_permissible_values()
)
Expand Down

0 comments on commit 8f44544

Please sign in to comment.