Skip to content

Commit

Permalink
Merge branch 'develop' into feature/3619_publisher_csv_validator
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-jones committed Oct 26, 2023
2 parents bb88d7c + 39b564f commit 9b70dc6
Show file tree
Hide file tree
Showing 22 changed files with 1,205 additions and 658 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ src*
build/*
dist/*
tmp/*

*.zip
!doajtest/unit/resources/*.zip
!doajtest/preservation_upload_test_package/*.zip

scratch.py
.coverage
htmlcov/*
Expand Down
224 changes: 224 additions & 0 deletions doajtest/mocks/preservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,227 @@ class PreservationMock:
"es_type": "article"
}

ARTICLE_DATA_JOURNAL2 = {
"index": {
"issn": [
"2673-611X"
],
"date": "2016-10-01T00:00:00Z",
"date_toc_fv_month": "2016-10-01T00:00:00Z",
"subject": [
"Science: Natural history (General): General. Including nature conservation, geographical distribution"
],
"schema_subject": [
"LCC:Neurology. Diseases of the nervous system"
],
"classification": [
"Neurology. Diseases of the nervous system"
],
"publisher": [
"Frontiers Media S.A."
],
"license": [
"CC BY"
],
"language": [
"English"
],
"country": "United Kingdom",
"schema_code": [
"LCC:RC346-429"
],
"classification_paths": [
"Medicine: Internal medicine: Neurosciences. Biological psychiatry. Neuropsychiatry: Neurology. Diseases of the nervous system"
],
"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": [
"LCC:RC31-1245",
"LCC:RC346-429",
"LCC:RC321-571",
"LCC:R"
]
},
"last_updated": "2020-11-24T21:55:20Z",
"admin": {
"in_doaj": "true",
"seal": "true"
},
"created_date": "2018-11-04T12:37:46Z",
"id": "00005741594643f4996e2666a01e0310",
"bibjson": {
"title": "Variation in TMEM106B in chronic traumatic encephalopathy",
"year": "2018",
"month": "11",
"start_page": "1",
"end_page": "9",
"abstract": "Abstract The genetic basis of chronic traumatic encephalopathy (CTE) is poorly understood. Variation in transmembrane protein 106B (TMEM106B) has been associated with enhanced neuroinflammation during aging and with TDP-43-related neurodegenerative disease, and rs3173615, a missense coding SNP in TMEM106B, has been implicated as a functional variant in these processes. Neuroinflammation and TDP-43 pathology are prominent features in CTE. The purpose of this study was to determine whether genetic variation in TMEM106B is associated with CTE risk, pathological features, and ante-mortem dementia. Eighty-six deceased male athletes with a history of participation in American football, informant-reported Caucasian, and a positive postmortem diagnosis of CTE without comorbid neurodegenerative disease were genotyped for rs3173615. The minor allele frequency (MAF = 0.42) in participants with CTE did not differ from previously reported neurologically normal controls (MAF = 0.43). However, in a case-only analysis among CTE cases, the minor allele was associated with reduced phosphorylated tau (ptau) pathology in the dorsolateral frontal cortex (DLFC) (AT8 density, odds ratio [OR] of increasing one quartile = 0.42, 95% confidence interval [CI] 0.22–0.79, p = 0.008), reduced neuroinflammation in the DLFC (CD68 density, OR of increasing one quartile = 0.53, 95% CI 0.29–0.98, p = 0.043), and increased synaptic protein density (β = 0.306, 95% CI 0.065–0.546, p = 0.014). Among CTE cases, TMEM106B minor allele was also associated with reduced ante-mortem dementia (OR = 0.40, 95% CI 0.16–0.99, p = 0.048), but was not associated with TDP-43 pathology. All case-only models were adjusted for age at death and duration of football play. Taken together, variation in TMEM106B may have a protective effect on CTE-related outcomes.",
"journal": {
"volume": "6",
"number": "1",
"publisher": "BMC",
"title": "Acta Neuropathologica Communications",
"country": "GB",
"license": [
{
"title": "CC BY",
"type": "CC BY",
"url": "https://actaneurocomms.biomedcentral.com/submission-guidelines/copyright",
"open_access": "true"
}
],
"language": [
"EN"
],
"issns": [
"2673-611X"
]
},
"identifier": [
{
"type": "doi",
"id": "10.1186/s40478-018-0619-9"
},
{
"type": "eissn",
"id": "2051-5960"
}
],
"keywords": [
"Chronic traumatic encephalopathy",
"TMEM106B",
"Neuroinflammation",
"Football",
"Traumatic brain injury",
"Tau"
],
"link": [
{
"type": "fulltext",
"url": "http://link.springer.com/article/10.1186/s40478-018-0619-9",
"content_type": "HTML"
}
],
"subject": [
{
"scheme": "LCC",
"term": "Neurology. Diseases of the nervous system",
"code": "RC346-429"
}
],
"author": [
{
"name": "Jonathan D. Cherry",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Jesse Mez",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "John F. Crary",
"affiliation": "Department of Pathology, Fishberg Department of Neuroscience, Friedman Brain Institute, Ronald M. Loeb Center for Alzheimer’s Disease, Icahn School of Medicine at Mount Sinai School"
},
{
"name": "Yorghos Tripodis",
"affiliation": "Department of Biostatistics, Boston University School of Public Health"
},
{
"name": "Victor E. Alvarez",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Ian Mahar",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Bertrand R. Huber",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Michael L. Alosco",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Raymond Nicks",
"affiliation": "Department of Veterans Affairs Medical Center"
},
{
"name": "Bobak Abdolmohammadi",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Patrick T. Kiernan",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Laney Evers",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Sarah Svirsky",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Katharine Babcock",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Hannah M. Gardner",
"affiliation": "VA Boston Healthcare System"
},
{
"name": "Gaoyuan Meng",
"affiliation": "VA Boston Healthcare System"
},
{
"name": "Christopher J. Nowinski",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Brett M. Martin",
"affiliation": "Department of Biostatistics, Boston University School of Public Health"
},
{
"name": "Brigid Dwyer",
"affiliation": "Department of Neurology, Boston University School of Medicine"
},
{
"name": "Neil W. Kowall",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Robert C. Cantu",
"affiliation": "Department of Anatomy and Neurobiology, Boston University School of Medicine"
},
{
"name": "Lee E. Goldstein",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Douglas I. Katz",
"affiliation": "Department of Neurology, Boston University School of Medicine"
},
{
"name": "Robert A. Stern",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Lindsay A. Farrer",
"affiliation": "Department of Neurology, Boston University School of Medicine"
},
{
"name": "Ann C. McKee",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
},
{
"name": "Thor D. Stein",
"affiliation": "Boston University Alzheimer’s Disease and CTE Center, Boston University School of Medicine"
}
]
},
"es_type": "article"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ~~ ArticlesPreservation:FunctionalTest -> Preservation:Feature ~~
suite: Articles Preservation
testset: User Test Script
testset: Upload Preservation Files
tests:
- title: Publisher without preservation role
context:
Expand All @@ -22,7 +22,8 @@ tests:
steps:
- step: Ensure that the archive package has been created with correct structure
- step: Go to preservation area /publisher/preservation
- step: Select 'Browse' and select the paaackage zip file
- step: Select 'Browse' and select the package zip file
resource: /preservation_upload_test_package/valid_article.zip
- step: click 'Upload'
results:
- 'A flash message appears at the top of the screen: File uploaded and waiting
Expand All @@ -40,7 +41,8 @@ tests:
steps:
- step: Create a incorrect or junk file that does not have articles
- step: Go to preservation area /publisher/preservation
- step: Select 'Browse' and select the paaackage zip file
- step: Select 'Browse' and select the package zip file
resource: /preservation_upload_test_package/invalid_article.zip
- step: click 'Upload'
results:
- 'A flash message appears at the top of the screen: File uploaded and waiting
Expand All @@ -56,9 +58,11 @@ tests:
context:
role: publisher
steps:
- step: Create a incorrect or junk file that does not have articles
- step: Make sure not to login as admin user as admin does not have restrictions. Login as publisher.
- step: Ensure that the archive package has been created with correct structure but the article does not own by the logged in user.
- step: Go to preservation area /publisher/preservation
- step: Select 'Browse' and select the paaackage zip file
- step: Select 'Browse' and select the package zip file
resource: /preservation_upload_test_package/valid_article.zip
- step: click 'Upload'
results:
- 'A flash message appears at the top of the screen: File uploaded and waiting
Expand All @@ -75,11 +79,47 @@ tests:
- if the status is 'partially success', show details link will be displayed. When
clicked on the link details of how many articles successful and how many not
successful will be displayed
- title: Upload correctly structured file with multiple journals and it is processed correctly
context:
role: publisher
setup:
- Have a publisher account which is the owner of 3 journals that are in DOAJ, and which have articles
uploaded for them
- Select 1 article from each journal and note its DOI
- Download the multi_journals.zip test package (see link below in second step)
- Unzip the multi_journals.zip test package
- In the identifiers.csv file in the root of the test package, put each of the DOIs from your articles
next to one of the article directory names listed (removing the existing test DOIs that are present in that
file already). For example you will have a line which reads "article1,10.1224/mydoi/3" where the DOI
is the one from your article.
- Re-zip the multi_journals.zip package. This wil be the file you will upload for testing in the below script
steps:
- step: Ensure that the archive package has been created with correct structure
- step: Ensure that the archive package contains more than one article with different journals.
A sample zip file is available for testing purpose. If there are no articles with the DOIs specified in the indentifiers.csv
file in your DSoace instance,
the results may not be as expected. In that case unzip the file and update the identifiers.csv file with appropriate identifiers for the articles.
resource: /preservation_upload_test_package/multi_journals.zip
- step: Go to preservation area /publisher/preservation
- step: Select 'Browse' and select the package zip file
- step: click 'Upload'
results:
- 'A flash message appears at the top of the screen: File uploaded and waiting
to be processed.'
- Upload status is shown in 'History of uploads' with status processing
- step: wait a short amount of time for the job to process, then reload the page
(do not re-submit the form data). If the job remains in "pending", reload the
page until the status changes.
results:
- Upload status in 'History of uploads' changes to 'successfully processed' and
the 'Notes' shows as 'uploaded to archive server'
- The 'Notes' has the label 'UPLOADED PACKAGES'
- Under the label 'UPLOADED PACKAGES', details of the packages that were uploaded are displayed in the format <journal_id>_<Date>.tar.gz
- title: Test maintenance mode for 'Upload preservation file' tab
context:
role: publisher
steps:
- step: Set the value of 'PRESERVATION_PAGE_UNDER_MAINTENANCE' to True in the configuration file (app.cfg/dev.cfg/test.cfg)
- step: Go to preservation area /publisher/preservation
results:
- Maintenance page should be displayed with the content as 'This page is currently offline for maintenance'
- Maintenance page should be displayed with the content as 'This page is currently offline for maintenance'
1 change: 1 addition & 0 deletions doajtest/unit/resources/invalid_article.zip
1 change: 1 addition & 0 deletions doajtest/unit/resources/multi_journals.zip
Binary file not shown.
1 change: 1 addition & 0 deletions doajtest/unit/resources/valid_article.zip
Loading

0 comments on commit 9b70dc6

Please sign in to comment.