generated from isamplesorg/python_template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
add transformer functions and mappers #2
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e1b856c
add transformer functions and mappers
SeanSCao 22b60aa
add example outputs
SeanSCao 92d3c5e
change file name to snake case
SeanSCao 7b74232
add sqlmodel db tests, add transformer function tests, update github …
SeanSCao a8d50ac
change tests using database connection to in-memory database, add mis…
SeanSCao 61a6554
remove db_url parameter from github actions
SeanSCao 5a0116c
fix github actions
SeanSCao c7c4970
fix linting errors
SeanSCao c1883cd
fix linting and mypy errors
SeanSCao 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 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[flake8] | ||
max-line-length = 110 | ||
max-line-length = 120 |
This file contains 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,80 @@ | ||
{ | ||
"$schema": "iSamplesSchemaCore1.0.json", | ||
"@id": "https://data.isamples.org/digitalsample/igsn/10.58052/EOI00002H", | ||
"authorizedBy": [], | ||
"compliesWith": [], | ||
"curation": { | ||
"accessConstraints": "Not Provided", | ||
"curationLocation": "Not Provided", | ||
"description": "Not Provided", | ||
"label": "Not Provided", | ||
"responsibility": [ | ||
{ | ||
"contact_information": "[email protected]", | ||
"name": "Andra Bobbitt", | ||
"role": "sample owner" | ||
}, | ||
{ | ||
"contact_information": "[email protected]; url: https://www.geosamples.org/contact/", | ||
"role": "metadata publisher" | ||
} | ||
] | ||
}, | ||
"description": "Gas. Sampler:Fluid:GTHFS. HFS gastight. Red-center-9. T=250C", | ||
"hasContextCategory": [ | ||
"Subsurface fluid reservoir" | ||
], | ||
"hasMaterialCategory": [ | ||
"Gaseous material" | ||
], | ||
"hasSpecimenCategory": [ | ||
"Other solid object" | ||
], | ||
"informalClassification": [ | ||
"Not Provided" | ||
], | ||
"keywords": [ | ||
{ | ||
"keyword": "Individual Sample", | ||
"scheme_name": "SESAR: Sample Type" | ||
} | ||
], | ||
"label": "J730-GTHFS-16", | ||
"producedBy": { | ||
"@id": "", | ||
"description": "cruiseFieldPrgrm:TN300. launchPlatformName:Jason II. Collection method:Sampler:Fluid:GTHFS. HFS gastight. Red-center-9. T=250C. launch type:ROV, navigation type:USBL", | ||
"hasFeatureOfInterest": "volcano", | ||
"label": "Sampler:Fluid:GTHFS, TN300", | ||
"responsibility": [ | ||
{ | ||
"name": "Evans_Leigh", | ||
"role": "collector" | ||
}, | ||
{ | ||
"name": "Andra Bobbitt", | ||
"role": "sample owner" | ||
}, | ||
{ | ||
"name": "TN300", | ||
"role": "sponsor" | ||
} | ||
], | ||
"resultTime": "2013-09-14", | ||
"samplingSite": { | ||
"description": "Trevi:Jason Tmax=257.9 C. In the direct flow at this small anhydrite mound (anhydrite knocked over).", | ||
"label": "Not Provided", | ||
"location": { | ||
"elevation": "-1520.0 m", | ||
"latitude": 45.946265, | ||
"longitude": -129.983725 | ||
}, | ||
"placeName": [ | ||
"Axial Seamount" | ||
] | ||
} | ||
}, | ||
"registrant": "Andra Bobbitt", | ||
"relatedResource": [], | ||
"sampleidentifier": "IGSN:10.58052/EOI00002H", | ||
"samplingPurpose": "Not Provided" | ||
} |
This file contains 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,88 @@ | ||
{ | ||
"$schema": "iSamplesSchemaCore1.0.json", | ||
"@id": "https://data.isamples.org/digitalsample/igsn/10.58052/IEDUT103B", | ||
"authorizedBy": [], | ||
"compliesWith": [], | ||
"curation": { | ||
"accessConstraints": "Not Provided", | ||
"curationLocation": "University of Florida Department of Geological Sciences", | ||
"description": "Not Provided", | ||
"label": "Not Provided", | ||
"responsibility": [ | ||
{ | ||
"contact_information": "[email protected]", | ||
"name": "Andrea Dutton", | ||
"role": "sample owner" | ||
}, | ||
{ | ||
"contact_information": "[email protected]; url: https://www.geosamples.org/contact/", | ||
"role": "metadata publisher" | ||
} | ||
] | ||
}, | ||
"description": "Macrobiology>Coral>Biology. Coring>HandHeldCorer. piece of short core", | ||
"hasContextCategory": [ | ||
"Not Provided" | ||
], | ||
"hasMaterialCategory": [ | ||
"Organic material", | ||
"Biogenic non-organic material" | ||
], | ||
"hasSpecimenCategory": [ | ||
"Not Provided" | ||
], | ||
"informalClassification": [ | ||
"Not Provided" | ||
], | ||
"keywords": [ | ||
{ | ||
"keyword": "Individual Sample>Cylinder", | ||
"scheme_name": "SESAR: Sample Type" | ||
}, | ||
{ | ||
"keyword": "Pseudodiploria strigosa", | ||
"scheme_name": "taxon: species" | ||
} | ||
], | ||
"label": "JAM42", | ||
"producedBy": { | ||
"@id": "", | ||
"description": "cruiseFieldPrgrm:UF Jamaica 2015 Fieldwork. Collection method:Coring>HandHeldCorer. piece of short core", | ||
"hasFeatureOfInterest": "Reef", | ||
"label": "Coring>HandHeldCorer, UF Jamaica 2015 Fieldwork", | ||
"responsibility": [ | ||
{ | ||
"name": "Andrea Dutton", | ||
"role": "collector" | ||
}, | ||
{ | ||
"name": "Andrea Dutton", | ||
"role": "sample owner" | ||
}, | ||
{ | ||
"name": "UF Jamaica 2015 Fieldwork", | ||
"role": "sponsor" | ||
} | ||
], | ||
"resultTime": "2015-06-19", | ||
"samplingSite": { | ||
"description": "Between Buccaneer Villa, Treasure Beach, and Great Bay", | ||
"label": "Treasure Beach", | ||
"location": { | ||
"elevation": "1.626 m", | ||
"latitude": 17.88451, | ||
"longitude": -77.77107 | ||
}, | ||
"placeName": [ | ||
"Limestone Falmouth Formation ", | ||
"Saint Elizabeth", | ||
"Cornwall", | ||
"Treasure Beach" | ||
] | ||
} | ||
}, | ||
"registrant": "Andrea Dutton", | ||
"relatedResource": [], | ||
"sampleidentifier": "IGSN:10.58052/IEDUT103B", | ||
"samplingPurpose": "Paleosea-level" | ||
} |
This file contains 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,84 @@ | ||
{ | ||
"$schema": "iSamplesSchemaCore1.0.json", | ||
"@id": "https://data.isamples.org/digitalsample/igsn/10.58052/IEEJR000M", | ||
"authorizedBy": [], | ||
"compliesWith": [], | ||
"curation": { | ||
"accessConstraints": "Not Provided", | ||
"curationLocation": "The University of Texas at Austin", | ||
"description": "Not Provided", | ||
"label": "Not Provided", | ||
"responsibility": [ | ||
{ | ||
"contact_information": "[email protected]", | ||
"name": "Evan Ramos", | ||
"role": "sample owner" | ||
}, | ||
{ | ||
"contact_information": "[email protected]; url: https://www.geosamples.org/contact/", | ||
"role": "metadata publisher" | ||
} | ||
] | ||
}, | ||
"description": "Metamorphic>Meta-Carbonate>Rock. Manual>Hammer", | ||
"hasContextCategory": [ | ||
"Earth interior" | ||
], | ||
"hasMaterialCategory": [ | ||
"Rock" | ||
], | ||
"hasSpecimenCategory": [ | ||
"Other solid object" | ||
], | ||
"informalClassification": [ | ||
"Not Provided" | ||
], | ||
"keywords": [ | ||
{ | ||
"keyword": "Individual Sample", | ||
"scheme_name": "SESAR: Sample Type" | ||
}, | ||
{ | ||
"keyword": "Marble", | ||
"scheme_name": "taxon: species" | ||
} | ||
], | ||
"label": "16ER6F3", | ||
"producedBy": { | ||
"@id": "", | ||
"description": "Collection method:Manual>Hammer", | ||
"hasFeatureOfInterest": "Metamorphic aureole", | ||
"label": "Manual>Hammer", | ||
"responsibility": [ | ||
{ | ||
"name": "Jade Star Lackey", | ||
"role": "collector" | ||
}, | ||
{ | ||
"name": "Evan Ramos", | ||
"role": "sample owner" | ||
} | ||
], | ||
"resultTime": "2021-01-19", | ||
"samplingSite": { | ||
"description": "Not Provided", | ||
"label": "Not Provided", | ||
"location": { | ||
"elevation": "Not Provided", | ||
"latitude": 36.461666, | ||
"longitude": -118.583888 | ||
}, | ||
"placeName": [ | ||
"Mineral King", | ||
"Sequoia National Forest", | ||
"California", | ||
"Tulare", | ||
"Silver City" | ||
] | ||
} | ||
}, | ||
"registrant": "Evan Ramos", | ||
"relatedResource": [], | ||
"sampleidentifier": "IGSN:10.58052/IEEJR000M", | ||
"samplingPurpose": "Not Provided" | ||
} |
This file contains 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,76 @@ | ||
{ | ||
"$schema": "iSamplesSchemaCore1.0.json", | ||
"@id": "https://data.isamples.org/digitalsample/igsn/10.58052/IEJEN0040", | ||
"authorizedBy": [], | ||
"compliesWith": [], | ||
"curation": { | ||
"accessConstraints": "Not Provided", | ||
"curationLocation": "Lamont-Doherty Earth Observatory", | ||
"description": "Not Provided", | ||
"label": "Not Provided", | ||
"responsibility": [ | ||
{ | ||
"contact_information": "[email protected]", | ||
"name": "Jonathan Nichols", | ||
"role": "sample owner" | ||
}, | ||
{ | ||
"contact_information": "[email protected]; url: https://www.geosamples.org/contact/", | ||
"role": "metadata publisher" | ||
} | ||
] | ||
}, | ||
"description": "Biology", | ||
"hasContextCategory": [ | ||
"Not Provided" | ||
], | ||
"hasMaterialCategory": [ | ||
"Organic material" | ||
], | ||
"hasSpecimenCategory": [ | ||
"Other solid object" | ||
], | ||
"informalClassification": [ | ||
"Not Provided" | ||
], | ||
"keywords": [ | ||
{ | ||
"keyword": "Grab", | ||
"scheme_name": "SESAR: Sample Type" | ||
} | ||
], | ||
"label": "Goldfin ~20 m moss from 30 cm hummock", | ||
"producedBy": { | ||
"@id": "", | ||
"description": "Not Provided", | ||
"hasFeatureOfInterest": "peatland", | ||
"label": "Not Provided", | ||
"responsibility": [ | ||
{ | ||
"name": "Miriam Jones", | ||
"role": "collector" | ||
}, | ||
{ | ||
"name": "Jonathan Nichols", | ||
"role": "sample owner" | ||
} | ||
], | ||
"resultTime": "2017-09-01", | ||
"samplingSite": { | ||
"description": "Not Provided", | ||
"label": "Not Provided", | ||
"location": { | ||
"elevation": "Not Provided", | ||
"latitude": 60.25455, | ||
"longitude": -149.35756666667 | ||
}, | ||
"placeName": [ | ||
"Gold Fin" | ||
] | ||
} | ||
}, | ||
"registrant": "Jonathan Nichols", | ||
"relatedResource": [], | ||
"sampleidentifier": "IGSN:10.58052/IEJEN0040", | ||
"samplingPurpose": "Not Provided" | ||
} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to formalize these as tests. Will post a link to how we do this in iSamples…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/isamplesorg/isamples_inabox/blob/d269247953602956249888592b3878dd85c93529/tests/test_isamples_metadata.py#L77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you have any questions on these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would need to make some test files with the raw SESAR source records as well.