Skip to content

Commit

Permalink
Revise additional minor references to CSV import, where data may also…
Browse files Browse the repository at this point in the history
… be imported via API
  • Loading branch information
hakbailey committed Jan 9, 2020
1 parent b4c706f commit e8252af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions solenoid/people/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def __str__(self):
return self.name

name = models.CharField(max_length=100, unique=True)
# DLCs are created as needed during the CSV import process, and we don't
# have liaison information available at that time.
# DLCs are created as needed during the metadata import process, and we
# don't have liaison information available at that time.
liaison = models.ForeignKey(
Liaison,
blank=True,
Expand All @@ -105,9 +105,9 @@ class Meta:
def __str__(self):
return "{self.first_name} {self.last_name}/{self.dlc}".format(self=self) # noqa

# Authors may have blank DLCs in the CSV, but if that happens we're going
# to push it back to the Sympletic layer and request that the user fix it
# there.
# Authors may have blank DLCs in a given paper's metadata, but if that
# happens we're going to push it back to the Sympletic layer and request
# that the user fix it there.
dlc = models.ForeignKey(DLC, on_delete=models.CASCADE)
email = models.EmailField(help_text="Author email address")
first_name = models.CharField(max_length=30)
Expand Down Expand Up @@ -140,8 +140,8 @@ def get_by_mit_id(cls, mit_id):

# These properties allow us to get and set the mit ID using the normal
# API; in particular, we can directly set the ID from the MTI ID value in
# the CSV files. However, under the hood, we're throwing out the sensitive
# data and storing hashes. Hooray!
# the paper metadata. However, under the hood, we're throwing out the
# sensitive data and storing hashes. Hooray!
@property
def mit_id(self):
return self._mit_id_hash
Expand Down
6 changes: 3 additions & 3 deletions solenoid/people/tests.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import hashlib
import os

from django.test import Client, TestCase, override_settings
from django.urls import resolve, reverse
from django.test import TestCase, Client, override_settings

from .models import Liaison, DLC, Author
from .models import DLC, Author, Liaison
from .views import LiaisonList


Expand Down Expand Up @@ -115,7 +115,7 @@ def test_queryset(self):
class DLCTests(TestCase):

# We used to have an option for letting people manually edit DLCs. We've
# backed this out in favor of only creating DLCs via CSV import - there
# backed this out in favor of only creating DLCs via data import - there
# is name authority work going on upstream we would prefer to rely on.
# If it's desirable to put that functionality back, there were tests for it
# here, and it last existed at commit
Expand Down
10 changes: 5 additions & 5 deletions solenoid/records/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ def save(self, *args, **kwargs):
def create_citation(paper_data):
"""Create text suitable for the citation field.
Some CSV records fill in the citation field, but some leave it blank;
in those cases we need to build our own citation text. Stakeholders
have indicated that it doesn't matter what citation format we use or
whether the citation is complete (as long as it includes author, title,
and journal title).
Some Elements papers include the citation field in their metadata,
but some leave it blank; in those cases we need to build our own
citation text. Stakeholders have indicated that it doesn't matter what
citation format we use or whether the citation is complete (as long as
it includes author, title, and journal title).
This method assumes that the supplied paper metadata has already been
validated; it does not perform any validation.
Expand Down

0 comments on commit e8252af

Please sign in to comment.