-
Notifications
You must be signed in to change notification settings - Fork 8
feat(website, backend): Sequence citations #6491
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
Merged
Merged
Changes from all commits
Commits
Show all changes
140 commits
Select commit
Hold shift + click to select a range
c327cf1
Initial backend endpoint for returning crossref cited by information …
tombch 5e669f6
Display citations in frontend
tombch 2f82180
Updated to use seqSetId and version to locate DOI first
tombch 9497e96
Formatting
tombch 8c831f0
Switched SeqSet details page modals to dialogs in line with other Loc…
tombch 5730e79
Formatting
tombch ab09d96
Updated frontend to use get-seqset-citations for total citations and …
tombch e23931d
Same syntax for empty titles
tombch 05bcef9
Add caching for crossref API call
tombch 27470df
Formatting
tombch 2c67ebc
Fixed tests by changing crossref properties from final to private, an…
tombch b891a49
Merge branch 'main' into seqset-citations
tombch e38caa8
Merge branch 'main' into seqset-citations
tombch d3b5500
Merge branch 'main' into seqset-citations
tombch 9199679
Fixing lockfile
tombch f0a2c64
Merge branch 'main' into seqset-citations
tombch 9e865b0
parseCrossRefCitedByXML tests
tombch b8c8d18
Added types + comments
tombch 5c20008
Added tests for getSeqSetCitations, removed relaxed from crossref moc…
tombch a98c60d
Remove caching dependency
tombch 0890599
Merge branch 'main' into seqset-citations
tombch c9ab8a3
Added seqset citations table, enforced unique on non-null seqset DOIs…
tombch c31180a
Merge branch 'main' into seqset-citations
tombch 2e0a647
Update schema documentation based on migration changes
actions-user 5d20ffa
Added skipping of seqset dois if not in the db
tombch c136152
Task depends on seqsets being enabled
tombch f35d284
Updated backend to have a normalised structure for citations - seqset…
tombch cc86479
Merge branch 'main' into seqset-citations
tombch cb53341
Update schema documentation based on migration changes
actions-user 588f7bb
Formatting
tombch 040a7a9
Update frontend to use citing source structure
tombch f1c5c6a
Merge branch 'seqset-citations' of github.com:loculus-project/loculus…
tombch ddfd5c1
Merge branch 'main' into seqset-citations
tombch 55c8a4d
Merge branch 'main' into seqset-citations
tombch 1562e46
Update schema documentation based on migration changes
actions-user f5c39ba
Update citing source to use doi as primary key and remove source type
tombch 766a462
Merge branch 'seqset-citations' of github.com:loculus-project/loculus…
tombch 814564e
Update schema documentation based on migration changes
actions-user 69b1e16
No longer returns seqset dois in DTO, throws exceptions for unparseab…
tombch 162d834
Increased task fixed delay to six hours, removed where clause on pres…
tombch bacb448
Remove requirement for seqset DOI
tombch f1eca3c
Merge branch 'main' into seqset-citations
tombch 5ac697f
Wait/read timeouts for crossref citedby
tombch d728ae5
Refactor parseCrossRefCitedByXML and mergeCitingSources to have list …
tombch 90e27c8
Merge branch 'seqset-citations' of github.com:loculus-project/loculus…
tombch e3ae3f5
Removed unique constraint on doi for now - address in follow-up
tombch 978e375
Claude nitpicks
tombch ca32d4d
Removed new get-seqset-citations and refactored it into existing get-…
tombch f04e67e
Update schema documentation based on migration changes
actions-user d16b13c
Restored log comment
tombch ce4ffae
Merge branch 'seqset-citations' of github.com:loculus-project/loculus…
tombch 77e25dd
Make base dialog transition smoothly
tombch 5e939b9
Prevent reloading seq set citations on modal open
tombch ed87cfc
Close connection in all cases
tombch 4dde77f
Fix tests failing due to modal transitions
tombch 9a56335
Revert "Make base dialog transition smoothly"
tombch 64215e0
Revert "Fix tests failing due to modal transitions"
tombch 2d8c1c5
Reverting dialog transitions
tombch 9300db2
Moved year from string to int
tombch 7b6d90c
Update schema documentation based on migration changes
actions-user 4c1d82c
Updated schema to use integer primary key for citing sources - DOI is…
tombch 112f49e
Merge branch 'seqset-citations' of github.com:loculus-project/loculus…
tombch c14e35d
Update schema documentation based on migration changes
actions-user cf19235
Fixing linting errors
tombch 0b6d55f
Merge branch 'seqset-citations' of github.com:loculus-project/loculus…
tombch 153cdac
Switch to using loculus date provider
tombch e38f4c8
Added citations for sequences
tombch 53e0eae
Merge branch 'main' into seqset-citations
tombch f35ab9d
Fix merge conflicts
tombch 34bf89f
Merge branch 'seqset-citations' into sequence-citations
tombch 8fe2d44
Added view citations button for sequence preview, and updated citatio…
tombch c686b17
Switch to customEnumeration to remove arbitrary length requirement
tombch 04317b6
Updated crossref parsing function to throw on malformed xml and xml m…
tombch 3ad141a
Restructuring backend types to have CitationSource, SeqSetCitationSou…
tombch 8e0ff24
Update schema documentation based on migration changes
actions-user 65229a7
Merge branch 'main' into seqset-citations
tombch f585239
Merge branch 'seqset-citations' into sequence-citations
tombch a482653
Updated to use composed source in endpoint return type
tombch 27824a7
Merge branch 'main' into seqset-citations
tombch 173fa80
Merge branch 'seqset-citations' into sequence-citations
tombch 35f044c
Updated to generic citations list component
tombch 0c0e5b2
Merge branch 'seqset-citations' into sequence-citations
tombch f719206
Formatting
tombch b748218
Updated to citation table
tombch 579dcc3
Count of citations in view button
tombch 2c8301d
Merge branch 'main' into seqset-citations
tombch 4fd697e
Merge branch 'seqset-citations' into sequence-citations
tombch 57b905a
Updated to use citation table
tombch 728d062
Updated crossref parsing function to return validation errors in forw…
tombch 2482a1f
Merge branch 'main' into seqset-citations
tombch fdbf8ab
Merge branch 'seqset-citations' into sequence-citations
tombch 59f8afe
Final css tweaks
tombch a1b9f03
Merge branch 'seqset-citations' of github.com:loculus-project/loculus…
tombch ca675c9
Fixed test
tombch 3ddcd39
Merge branch 'seqset-citations' into sequence-citations
tombch 63e9b76
Merge branch 'main' into seqset-citations
tombch 60ed7aa
Remove invalid width tag
tombch d49eca0
Updated migration
tombch 6b3cce2
Added schema annotation for citations and description for crossref ci…
tombch 19379fb
Updated min width tag
tombch dbc2e52
Format names wiht missing firstname/surname
tombch d6c4ef8
Renamed get-seqset-cited-by-publication to get-seqset-citations
tombch f5f95ea
Parameterised crossref citedby xml validation tests
tombch f2aa649
Updated task description
tombch e2fb4a4
Added link to crossref content registration docs in values yaml
tombch d289025
Updated parseCrossRefCitedByXML function to handle different title tags
tombch 2c3e2aa
Remove start_dev addition
tombch d673f27
Moved duplicate test seqset creation into function
tombch 0227537
Merge branch 'seqset-citations' into sequence-citations
tombch 52304df
Merge branch 'main' into seqset-citations
tombch 7e91593
Updated migration name
tombch c55cf73
Merge branch 'seqset-citations' into sequence-citations
tombch ac717e3
Merge branch 'main' into sequence-citations
tombch 1062c8f
Updated via seqset to from seqset
tombch b6652c1
Renamed get-sequence-cited-by-publication to get-sequence-citations
tombch a9aaf5c
Formatting
tombch 02a33a5
Updated sequence citations to show inline with modal to expand
tombch f1c0cd0
Reverting previous ui
tombch 4574643
Update get-sequence-citations to have optional version parameter
tombch be86cb0
Update sequence citation website display
tombch a477fa0
Fixed error with % using different escape character
tombch d0a9d77
Added parameterised test for sequence citations
tombch 2009f62
Cleaned up website logic
tombch e98764e
Merge branch 'main' into sequence-citations
tombch 898ed7b
Removed dead query provider
tombch 52bfa35
Merge branch 'sequence-citations' of github.com:loculus-project/locul…
tombch a6801e9
Removed other now redundant change
tombch d643c05
Cleaned up test
tombch e967558
Merge branch 'main' into sequence-citations
tombch 20b31e1
Add consistent sort order for citing sources
tombch 50c668d
Comments
tombch 3e710bb
Added commas
tombch 4e32293
Merge branch 'main' into sequence-citations
tombch eef72e7
Log version only when not null
tombch 3e01065
Add comment
tombch f39ab08
Clarify seqset accession version and sequence accession with potentia…
tombch 8084033
Updated schema
tombch d2533ce
Folded in sequence citations to general sections, gated fetching for …
tombch 23e8312
Merge branch 'main' into sequence-citations
tombch fc02ecb
Move citations promise resolve to after redirect/not found response c…
tombch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import { useState, type FC } from 'react'; | ||
|
|
||
| import { CitationDetails, CitationTable } from './CitationTable'; | ||
| import type { SeqSetCitation, SequenceCitation } from '../../types/seqSetCitation'; | ||
| import { BaseDialog } from '../common/BaseDialog'; | ||
| import { Button } from '../common/Button'; | ||
|
|
||
| interface CitationListProps { | ||
| citations: SeqSetCitation[] | SequenceCitation[]; | ||
| maxDisplayedCitations?: number; | ||
| modalTitle?: string; | ||
| } | ||
|
|
||
| const CitationList: FC<CitationListProps> = ({ citations, maxDisplayedCitations, modalTitle }) => { | ||
| const [isOpen, setIsOpen] = useState(false); | ||
| const displayCitationsModalButton = maxDisplayedCitations !== undefined && citations.length > maxDisplayedCitations; | ||
|
|
||
| return ( | ||
| <div className='space-y-2'> | ||
| <BaseDialog | ||
| isOpen={isOpen} | ||
| onClose={() => setIsOpen(false)} | ||
| title={modalTitle ?? 'Citations'} | ||
| fullWidth={false} | ||
| className='min-h-[60vh]' | ||
| > | ||
| <CitationTable isLoading={false} error={null} citations={citations} /> | ||
| </BaseDialog> | ||
| {citations.length > 0 ? ( | ||
| <div className='space-y-2'> | ||
| <ul className='space-y-4'> | ||
| {(maxDisplayedCitations !== undefined | ||
| ? citations.slice(0, maxDisplayedCitations) | ||
| : citations | ||
| ).map((citation: SeqSetCitation | SequenceCitation) => ( | ||
| <li key={citation.source.sourceDOI}> | ||
| <CitationDetails citation={citation} className='text-sm' displayYear /> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| {displayCitationsModalButton && ( | ||
| <Button className='text-sm hover:underline' onClick={() => setIsOpen(true)}> | ||
| View all citations ({citations.length})... | ||
| </Button> | ||
| )} | ||
| </div> | ||
| ) : ( | ||
| <div className='py-8 text-center'> | ||
| <span>No citations found.</span> | ||
| </div> | ||
| )} | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default CitationList; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.