Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/4007 remove the seal #2458

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
Removed seal
  • Loading branch information
RK206 committed Feb 21, 2025
commit 871ba00e04ff2147d9e5c0964e6ac532a1549c20
56 changes: 0 additions & 56 deletions cms/pages/apply/seal.md

This file was deleted.

2 changes: 0 additions & 2 deletions doajtest/fixtures/article.py
Original file line number Diff line number Diff line change
@@ -165,7 +165,6 @@ def make_article_apido_struct():
"id": "abcdefghijk_article",
"admin": {
"in_doaj": True,
"seal": False,
"publisher_record_id": "some_identifier",
"upload_id": "zyxwvutsrqpo_upload_id"
},
@@ -240,7 +239,6 @@ def make_article_apido_struct():
"admin": {
"fields": {
"in_doaj": {"coerce": "bool", "get__default": False},
"seal": {"coerce": "bool", "get__default": False},
"publisher_record_id": {"coerce": "unicode"},
"upload_id": {"coerce": "unicode"}
}
4 changes: 1 addition & 3 deletions doajtest/fixtures/v2/applications.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import rstr

from portality import constants, regex
from doajtest.fixtures.v2.common import JOURNAL_LIKE_BIBJSON, EDITORIAL_FORM_EXPANDED, SUBJECT_FORM_EXPANDED, NOTES_FORM_EXPANDED, OWNER_FORM_EXPANDED, SEAL_FORM_EXPANDED
from doajtest.fixtures.v2.common import JOURNAL_LIKE_BIBJSON, EDITORIAL_FORM_EXPANDED, SUBJECT_FORM_EXPANDED, NOTES_FORM_EXPANDED, OWNER_FORM_EXPANDED
from doajtest.fixtures.v2.journals import JOURNAL_FORM_EXPANDED, JOURNAL_FORM
from portality.lib import dates
from portality.lib.dates import FMT_DATE_YM, FMT_YEAR
@@ -121,7 +121,6 @@ def make_application_spread(cls, desired_output, period):
],
"owner" : "publisher",
"related_journal" : "987654321123456789",
"seal": False,
"date_applied" : "2003-01-01T00:00:00Z"
},
"bibjson" : JOURNAL_LIKE_BIBJSON
@@ -153,7 +152,6 @@ def make_application_spread(cls, desired_output, period):
APPLICATION_FORM_EXPANDED.update(deepcopy(SUBJECT_FORM_EXPANDED))
APPLICATION_FORM_EXPANDED.update(deepcopy(OWNER_FORM_EXPANDED))
APPLICATION_FORM_EXPANDED.update(deepcopy(EDITORIAL_FORM_EXPANDED))
APPLICATION_FORM_EXPANDED.update(deepcopy(SEAL_FORM_EXPANDED))
APPLICATION_FORM_EXPANDED.update(deepcopy(WORKFLOW_FORM_EXPANDED))

from portality.crosswalks.application_form import ApplicationFormXWalk
4 changes: 0 additions & 4 deletions doajtest/fixtures/v2/common.py
Original file line number Diff line number Diff line change
@@ -24,10 +24,6 @@
"editor": "associate"
}

SEAL_FORM_EXPANDED = {
"doaj_seal": [],
}

JOURNAL_LIKE_BIBJSON = {
"alternative_title": "Alternative Title",
"apc": {
6 changes: 1 addition & 5 deletions doajtest/fixtures/v2/journals.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
import rstr

from doajtest.fixtures.v2.common import EDITORIAL_FORM_EXPANDED, SUBJECT_FORM_EXPANDED, NOTES_FORM_EXPANDED, \
OWNER_FORM_EXPANDED, SEAL_FORM_EXPANDED, JOURNAL_LIKE_BIBJSON, JOURNAL_LIKE_BIBJSON_FORM_EXPANDED
OWNER_FORM_EXPANDED, JOURNAL_LIKE_BIBJSON, JOURNAL_LIKE_BIBJSON_FORM_EXPANDED
from portality.regex import ISSN_COMPILED


@@ -78,7 +78,6 @@ def question_answers():
{"application_id": "asdfghjkl", "date_accepted": "2018-01-01T00:00:00Z"},
{"application_id": "zxcvbnm"}
],
"seal": False,
"ticked": True
},
"bibjson": JOURNAL_LIKE_BIBJSON
@@ -87,7 +86,6 @@ def question_answers():
JOURNAL_FORM_EXPANDED = {}
JOURNAL_FORM_EXPANDED.update(JOURNAL_LIKE_BIBJSON_FORM_EXPANDED)
JOURNAL_FORM_EXPANDED.update(EDITORIAL_FORM_EXPANDED)
JOURNAL_FORM_EXPANDED.update(SEAL_FORM_EXPANDED)
JOURNAL_FORM_EXPANDED.update(SUBJECT_FORM_EXPANDED)
JOURNAL_FORM_EXPANDED.update(NOTES_FORM_EXPANDED)
JOURNAL_FORM_EXPANDED.update(OWNER_FORM_EXPANDED)
@@ -98,7 +96,6 @@ def question_answers():

JOURNAL_BULK_EDIT = {
"publisher": "Test Publisher",
"doaj_seal": True,
"country": "DZ",
"platform": "HighWire",
"contact_email": "[email protected]",
@@ -156,7 +153,6 @@ def question_answers():
"Continued By",
"LCC Codes",
'Subjects', # (added outside journal2questions)
'DOAJ Seal', # (added outside journal2questions)
'Added on Date', # (added outside journal2questions)
'Last updated Date', # (added outside journal2questions)
# 'Tick: Accepted after March 2014', Removed 2020-12-11
8 changes: 2 additions & 6 deletions doajtest/mocks/preservation.py
Original file line number Diff line number Diff line change
@@ -35,7 +35,6 @@ class PreservationMock:
],
"unpunctitle": "Variation in TMEM106B in chronic traumatic encephalopathy",
"asciiunpunctitle": "Variation in TMEM106B in chronic traumatic encephalopathy",
"has_seal": "Yes",
"doi": "10.1186/s40478-018-0619-9",
"fulltext": "//link.springer.com/article/10.1186/s40478-018-0619-9",
"schema_codes_tree": [
@@ -47,8 +46,7 @@ class PreservationMock:
},
"last_updated": "2020-11-24T21:55:20Z",
"admin": {
"in_doaj": "true",
"seal": "true"
"in_doaj": "true"
},
"created_date": "2018-11-04T12:37:46Z",
"id": "00003741594643f4996e2555a01e03c7",
@@ -260,7 +258,6 @@ class PreservationMock:
],
"unpunctitle": "Variation in TMEM106B in chronic traumatic encephalopathy",
"asciiunpunctitle": "Variation in TMEM106B in chronic traumatic encephalopathy",
"has_seal": "Yes",
"doi": "10.3389/fcosc.2022.1028295",
"fulltext": "https://frontiersin.org/articles/10.3389/fcosc.2022.1028295",
"schema_codes_tree": [
@@ -272,8 +269,7 @@ class PreservationMock:
},
"last_updated": "2020-11-24T21:55:20Z",
"admin": {
"in_doaj": "true",
"seal": "true"
"in_doaj": "true"
},
"created_date": "2018-11-04T12:37:46Z",
"id": "00005741594643f4996e2666a01e0310",
1 change: 0 additions & 1 deletion doajtest/unit/api_tests/test_apiv3_crud_application.py
Original file line number Diff line number Diff line change
@@ -399,7 +399,6 @@ def test_05_outgoing_application_do(self):
assert "notes" not in oa.data.get("admin", {})
assert "editor_group" not in oa.data.get("admin", {})
assert "editor" not in oa.data.get("admin", {})
assert "seal" not in oa.data.get("admin", {})
assert "related_journal" not in oa.data.get("admin", {})

# check that it does contain admin information that it should
1 change: 0 additions & 1 deletion doajtest/unit/api_tests/test_apiv3_dataobj.py
Original file line number Diff line number Diff line change
@@ -35,7 +35,6 @@ def check_do(self, do):

assert do.data["admin"]["in_doaj"] is self.jm.is_in_doaj(), 'actual val {0} is of type {1}'.format(do.admin.in_doaj, type(do.admin.in_doaj))
assert do.data["admin"]["ticked"] is self.jm.is_ticked() # it's not set in the journal fixture so we expect a None back
assert do.data["admin"]["seal"] is self.jm.has_seal()

# assert isinstance(do.data["bibjson"], dataobj.DataObj), 'Declared as "object" but not a Data Object?'
assert do.data["bibjson"]["title"] == self.jm.bibjson().title
26 changes: 0 additions & 26 deletions doajtest/unit/application_processors/test_maned_journal_review.py
Original file line number Diff line number Diff line change
@@ -137,32 +137,6 @@ def test_02_maned_review_optional_validation(self):
# right, so let's see if we managed to get a title-less journal from this
assert fc.target.bibjson().title is None, fc.target.bibjson().title

def test_04_maned_review_doaj_seal(self):
"""Test the seal checkbox on the maned review form"""

# construct it from form data (with a known source)
formulaic_context = JournalFormFactory.context("admin")
fc = formulaic_context.processor(
formdata=JOURNAL_FORM,
source=models.Journal(**JOURNAL_SOURCE)
)

# set the seal to False using the form
fc.form.doaj_seal.data = []

# run the crosswalk, don't test it at all in this test
fc.form2target()
# patch the target with data from the source
fc.patch_target()

# ensure the model has seal set to False
assert fc.target.has_seal() is False

# Set the seal to True in the object and check the form reflects this
fc.source.set_seal(True)
fc.source2form()

assert 'y' in fc.form.doaj_seal.data

def test_05_maned_review_continuations(self):
# construct it from form data (with a known source)
1 change: 0 additions & 1 deletion doajtest/unit/resources/create_article.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
"id": "abcdefghijk_article",
"admin": {
"in_doaj": true,
"seal": false,
"publisher_record_id": "some_identifier",
"upload_id": "zyxwvutsrqpo_upload_id"
},
6 changes: 0 additions & 6 deletions doajtest/unit/test_bll_object_conversions.py
Original file line number Diff line number Diff line change
@@ -53,7 +53,6 @@ def application_matches(journal, application):
assert application.current_journal == journal.id
assert application.notes == journal.notes
assert application.owner == journal.owner
assert application.has_seal() is journal.has_seal()


class TestBLLObjectConversions(DoajTestCase):
@@ -76,7 +75,6 @@ def test_02_application_2_journal(self, name, application_type, manual_update_ar
#########################################

cj = None
has_seal = bool(randint(0, 1))
application = None
if application_type == "present":
application = Suggestion(**ApplicationFixtureFactory.make_application_source())
@@ -94,7 +92,6 @@ def test_02_application_2_journal(self, name, application_type, manual_update_ar
application.set_editor("appeditor")
application.set_owner("appowner")

application.set_seal(has_seal)
application.add_note("Application Note")

if current_journal == "present":
@@ -153,7 +150,6 @@ def test_02_application_2_journal(self, name, application_type, manual_update_ar
assert journal.editor_group == "appeditorgroup"
assert journal.editor == "appeditor"
assert journal.owner == "appowner"
assert journal.has_seal() == has_seal

if current_journal == "present":
assert len(journal.notes) == 2
@@ -165,14 +161,12 @@ def test_02_application_2_journal(self, name, application_type, manual_update_ar
assert journal.editor_group == "journaleditorgroup"
assert journal.editor == "journaleditor"
assert journal.owner == "journalowner"
assert journal.has_seal() == has_seal
assert len(journal.notes) == 2

elif current_journal == "none" or current_journal == "missing":
assert journal.editor_group is None
assert journal.editor is None
assert journal.owner is None
assert journal.has_seal() == has_seal
assert len(journal.notes) == 1

if current_journal == "present":
11 changes: 0 additions & 11 deletions doajtest/unit/test_models.py
Original file line number Diff line number Diff line change
@@ -57,7 +57,6 @@ def test_02_journal_model_rw(self):

# check some properties of empty objects
assert not j.has_been_manually_updated()
assert not j.has_seal()
assert not j.is_in_doaj()
assert not j.is_ticked()

@@ -66,7 +65,6 @@ def test_02_journal_model_rw(self):
j.set_created("2001-01-01T00:00:00Z")
j.set_last_updated("2002-01-01T00:00:00Z")
j.set_last_manual_update("2004-01-01T00:00:00Z")
j.set_seal(True)
j.set_owner("richard")
j.set_editor_group("worldwide")
j.set_editor("eddie")
@@ -82,7 +80,6 @@ def test_02_journal_model_rw(self):
assert j.last_manual_update == "2004-01-01T00:00:00Z"
assert j.last_manual_update_timestamp.strftime(FMT_DATETIME_STD) == "2004-01-01T00:00:00Z"
assert j.has_been_manually_updated() is True
assert j.has_seal() is True
assert j.owner == "richard"
assert j.editor_group == "worldwide"
assert j.editor == "eddie"
@@ -204,16 +201,13 @@ def test_03_article_model_rw(self):
"""Read and write properties into the article model"""
a = models.Article()
assert not a.is_in_doaj()
assert not a.has_seal()

a.set_in_doaj(True)
a.set_seal(True)
a.set_publisher_record_id("abcdef")
a.set_upload_id("zyxwvu")

assert a.data.get("admin", {}).get("publisher_record_id") == "abcdef"
assert a.is_in_doaj()
assert a.has_seal()
assert a.upload_id() == "zyxwvu"

def test_04_suggestion_model_rw(self):
@@ -222,14 +216,12 @@ def test_04_suggestion_model_rw(self):

# check some properties of empty objects
assert not s.has_been_manually_updated()
assert not s.has_seal()

# methods for all journal-like objects
s.set_id("abcd")
s.set_created("2001-01-01T00:00:00Z")
s.set_last_updated("2002-01-01T00:00:00Z")
s.set_last_manual_update("2004-01-01T00:00:00Z")
s.set_seal(True)
s.set_owner("richard")
s.set_editor_group("worldwide")
s.set_editor("eddie")
@@ -245,7 +237,6 @@ def test_04_suggestion_model_rw(self):
assert s.last_manual_update == "2004-01-01T00:00:00Z"
assert s.last_manual_update_timestamp.strftime(FMT_DATETIME_STD) == "2004-01-01T00:00:00Z"
assert s.has_been_manually_updated() is True
assert s.has_seal() is True
assert s.owner == "richard"
assert s.editor_group == "worldwide"
assert s.editor == "eddie"
@@ -1324,14 +1315,12 @@ def test_27_article_journal_sync(self):
j = models.Journal(**JournalFixtureFactory.make_journal_source(in_doaj=True))
a = models.Article(**ArticleFixtureFactory.make_article_source(in_doaj=False, with_journal_info=False))

assert a.has_seal() is False
assert a.bibjson().journal_issns != j.bibjson().issns()

reg = models.Journal()
changed = a.add_journal_metadata(j, reg)

assert changed is True
assert a.has_seal() is False
assert a.is_in_doaj() is True
assert a.bibjson().journal_issns == j.bibjson().issns()
assert a.bibjson().publisher == j.bibjson().publisher
Loading