Skip to content

Commit

Permalink
Using plural to clarify constants.PGS_CITATION type change to list
Browse files Browse the repository at this point in the history
  • Loading branch information
fyvon committed Oct 8, 2024
1 parent 2fc9ff8 commit c0641e8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions catalog/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def pgs_search_examples(request):

def pgs_info(request):
return {
'pgs_citation': constants.PGS_CITATION[0],
'pgs_citations': constants.PGS_CITATION,
'pgs_citation': constants.PGS_CITATIONS[0],
'pgs_citations': constants.PGS_CITATIONS,
'pgs_publications': constants.PGS_PUBLICATIONS,
'pgs_table_helper': constants.TABLE_HELPER,
'ensembl_version': constants.ENSEMBL_VERSION
Expand Down
2 changes: 1 addition & 1 deletion catalog/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ def create_retired(self, data_id, pub_doi, retirement_notes):

def test_retired_score(self):
score_id = 'PGS000999'
score_doi = constants.PGS_CITATION['doi']
score_doi = constants.PGS_CITATIONS[0]['doi']
score_notes = 'This score has been retired'
retired_score = self.create_retired(score_id, score_doi, score_notes)
# Instance
Expand Down
24 changes: 12 additions & 12 deletions pgs_web/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Module storing constants used across the website

PGS_CITATION = [
PGS_CITATIONS = [
{
'title': 'Enhancing the Polygenic Score Catalog with tools for score calculation and ancestry normalization',
'doi': '10.1038/s41588-024-01937-x',
Expand All @@ -21,12 +21,12 @@

PGS_PUBLICATIONS = [
{
'title': PGS_CITATION[0]['title'],
'title': PGS_CITATIONS[0]['title'],
'authors': 'Lambert, Wingfield et al',
'year': PGS_CITATION[0]['year'],
'doi': PGS_CITATION[0]['doi'],
'PMID': PGS_CITATION[0]['PMID'],
'journal': PGS_CITATION[0]['journal']
'year': PGS_CITATIONS[0]['year'],
'doi': PGS_CITATIONS[0]['doi'],
'PMID': PGS_CITATIONS[0]['PMID'],
'journal': PGS_CITATIONS[0]['journal']
},
{
'title': 'The NHGRI-EBI GWAS Catalog: knowledgebase and deposition resource',
Expand All @@ -37,12 +37,12 @@
'journal': 'Nucleic Acids Research 51(D1):D977-D985'
},
{
'title': PGS_CITATION[1]['title'],
'title': PGS_CITATIONS[1]['title'],
'authors': 'Lambert et al',
'year': PGS_CITATION[1]['year'],
'doi': PGS_CITATION[1]['doi'],
'PMID': PGS_CITATION[1]['PMID'],
'journal': PGS_CITATION[1]['journal']
'year': PGS_CITATIONS[1]['year'],
'doi': PGS_CITATIONS[1]['doi'],
'PMID': PGS_CITATIONS[1]['PMID'],
'journal': PGS_CITATIONS[1]['journal']
}
]

Expand All @@ -65,7 +65,7 @@
'TERMS_OF_USE' : 'https://www.ebi.ac.uk/about/terms-of-use',
'TEMPLATEGoogleDoc_URL' : 'https://docs.google.com/spreadsheets/d/1UEGH0NNuQ8ifbsxIhe8HbnG9XYjsIwSF/edit?usp=sharing',
'CurationGoogleDoc_URL' : 'https://drive.google.com/file/d/1QYdKBnEqAmhSZIuMux7ifpT3ZBk9gupT/view',
'CATALOG_PUBLICATION_URL' : 'https://doi.org/'+PGS_CITATION[0]['doi'],
'CATALOG_PUBLICATION_URL' : 'https://doi.org/' + PGS_CITATIONS[0]['doi'],
'EPMC_REST_SEARCH' : 'https://www.ebi.ac.uk/europepmc/webservices/rest/search'
}

Expand Down
2 changes: 1 addition & 1 deletion release/scripts/EuropePMCLinkage.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def generate_xml_file(self):
title = 'Link to the Polygenic Score (PGS) Catalog resource'
url = self.pgs_url
source = 'MED'
pmid = constants.PGS_CITATION['PMID']
pmid = constants.PGS_CITATIONS[0]['PMID']
self.create_xml_link(title,url,source,pmid)

# Add PGS Publications
Expand Down
2 changes: 1 addition & 1 deletion rest_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ def get(self, request):
data = {
'rest_api': constants_rest.PGS_REST_API[0],
'latest_release': latest_release,
'citation': constants.PGS_CITATION[0],
'citation': constants.PGS_CITATIONS[0],
'pgs_catalog_publications': constants.PGS_PUBLICATIONS,
'ensembl_version': constants.ENSEMBL_VERSION,
'terms_of_use': constants.USEFUL_URLS['TERMS_OF_USE']
Expand Down

0 comments on commit c0641e8

Please sign in to comment.