Skip to content

Commit

Permalink
Run pre-commit run --all
Browse files Browse the repository at this point in the history
Closes #194.
  • Loading branch information
shoeffner committed Jul 18, 2024
1 parent 3b6fe06 commit 43c69b6
Show file tree
Hide file tree
Showing 10 changed files with 222 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ First, start always by reading the [Contribution Guide](https://pydataverse.read
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/gdcc/pyDataverse/pulls) for the same update/change?
* [ ] Have you followed the guidelines in our [Contribution Guide](https://pydataverse.readthedocs.io/en/master/contributing/contributing.html)?
* [ ] Have you read the [Code of Conduct](https://github.com/gdcc/pyDataverse/blob/master/CODE_OF_CONDUCT.md)?
* [ ] Do your changes in a seperate branch. Branches MUST have descriptive names.
* [ ] Do your changes in a separate branch. Branches MUST have descriptive names.
* [ ] Have you merged the latest changes from upstream to your branch?

**Describe the PR**
Expand All @@ -45,7 +45,7 @@ First, start always by reading the [Contribution Guide](https://pydataverse.read

* [ ] Have you used tox and/or pytest for testing the changes?
* [ ] Did the local testing ran successfully?
* [ ] Did the Continous Integration testing (Travis-CI) ran successfully?
* [ ] Did the Continuous Integration testing (Travis-CI) ran successfully?

**Commits**

Expand Down
2 changes: 1 addition & 1 deletion local-test.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ CONFIGBAKER_IMAGE=docker.io/gdcc/configbaker:unstable

# Services
POSTGRES_VERSION=15
SOLR_VERSION=9.3.0
SOLR_VERSION=9.3.0
2 changes: 0 additions & 2 deletions tests/api/test_async_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@


class TestAsyncAPI:

@pytest.mark.asyncio
async def test_async_api(self, native_api):

async with native_api:
tasks = [native_api.get_info_version() for _ in range(10)]
responses = await asyncio.gather(*tasks)
Expand Down
96 changes: 77 additions & 19 deletions tests/data/dataset_upload_full_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,18 @@
"typeName": "kindOfData",
"multiple": true,
"typeClass": "primitive",
"value": ["KindOfData1", "KindOfData2"]
"value": [
"KindOfData1",
"KindOfData2"
]
},
{
"typeName": "language",
"multiple": true,
"typeClass": "controlledVocabulary",
"value": ["German"]
"value": [
"German"
]
},
{
"typeName": "series",
Expand Down Expand Up @@ -489,25 +494,37 @@
"typeName": "relatedMaterial",
"multiple": true,
"typeClass": "primitive",
"value": ["RelatedMaterial1", "RelatedMaterial2"]
"value": [
"RelatedMaterial1",
"RelatedMaterial2"
]
},
{
"typeName": "relatedDatasets",
"multiple": true,
"typeClass": "primitive",
"value": ["RelatedDatasets1", "RelatedDatasets2"]
"value": [
"RelatedDatasets1",
"RelatedDatasets2"
]
},
{
"typeName": "otherReferences",
"multiple": true,
"typeClass": "primitive",
"value": ["OtherReferences1", "OtherReferences2"]
"value": [
"OtherReferences1",
"OtherReferences2"
]
},
{
"typeName": "dataSources",
"multiple": true,
"typeClass": "primitive",
"value": ["DataSources1", "DataSources2"]
"value": [
"DataSources1",
"DataSources2"
]
},
{
"typeName": "originOfSources",
Expand Down Expand Up @@ -569,7 +586,10 @@
"typeName": "geographicUnit",
"multiple": true,
"typeClass": "primitive",
"value": ["GeographicUnit1", "GeographicUnit2"]
"value": [
"GeographicUnit1",
"GeographicUnit2"
]
},
{
"typeName": "geographicBoundingBox",
Expand Down Expand Up @@ -613,13 +633,19 @@
"typeName": "unitOfAnalysis",
"multiple": true,
"typeClass": "primitive",
"value": ["UnitOfAnalysis1", "UnitOfAnalysis2"]
"value": [
"UnitOfAnalysis1",
"UnitOfAnalysis2"
]
},
{
"typeName": "universe",
"multiple": true,
"typeClass": "primitive",
"value": ["Universe1", "Universe2"]
"value": [
"Universe1",
"Universe2"
]
},
{
"typeName": "timeMethod",
Expand Down Expand Up @@ -776,25 +802,39 @@
"typeName": "astroType",
"multiple": true,
"typeClass": "controlledVocabulary",
"value": ["Image", "Mosaic", "EventList", "Cube"]
"value": [
"Image",
"Mosaic",
"EventList",
"Cube"
]
},
{
"typeName": "astroFacility",
"multiple": true,
"typeClass": "primitive",
"value": ["Facility1", "Facility2"]
"value": [
"Facility1",
"Facility2"
]
},
{
"typeName": "astroInstrument",
"multiple": true,
"typeClass": "primitive",
"value": ["Instrument1", "Instrument2"]
"value": [
"Instrument1",
"Instrument2"
]
},
{
"typeName": "astroObject",
"multiple": true,
"typeClass": "primitive",
"value": ["Object1", "Object2"]
"value": [
"Object1",
"Object2"
]
},
{
"typeName": "resolution.Spatial",
Expand All @@ -818,13 +858,19 @@
"typeName": "coverage.Spectral.Bandpass",
"multiple": true,
"typeClass": "primitive",
"value": ["Bandpass1", "Bandpass2"]
"value": [
"Bandpass1",
"Bandpass2"
]
},
{
"typeName": "coverage.Spectral.CentralWavelength",
"multiple": true,
"typeClass": "primitive",
"value": ["3001", "3002"]
"value": [
"3001",
"3002"
]
},
{
"typeName": "coverage.Spectral.Wavelength",
Expand Down Expand Up @@ -900,7 +946,10 @@
"typeName": "coverage.Spatial",
"multiple": true,
"typeClass": "primitive",
"value": ["SkyCoverage1", "SkyCoverage2"]
"value": [
"SkyCoverage1",
"SkyCoverage2"
]
},
{
"typeName": "coverage.Depth",
Expand Down Expand Up @@ -1007,7 +1056,10 @@
"typeName": "studyAssayOtherOrganism",
"multiple": true,
"typeClass": "primitive",
"value": ["OtherOrganism1", "OtherOrganism2"]
"value": [
"OtherOrganism1",
"OtherOrganism2"
]
},
{
"typeName": "studyAssayMeasurementType",
Expand All @@ -1024,7 +1076,10 @@
"typeName": "studyAssayOtherMeasurmentType",
"multiple": true,
"typeClass": "primitive",
"value": ["OtherMeasurementType1", "OtherMeasurementType2"]
"value": [
"OtherMeasurementType1",
"OtherMeasurementType2"
]
},
{
"typeName": "studyAssayTechnologyType",
Expand Down Expand Up @@ -1052,7 +1107,10 @@
"typeName": "studyAssayCellType",
"multiple": true,
"typeClass": "primitive",
"value": ["CellType1", "CellType2"]
"value": [
"CellType1",
"CellType2"
]
}
]
},
Expand Down
144 changes: 72 additions & 72 deletions tests/data/file_upload_ds_minimum.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
{
"datasetVersion": {
"metadataBlocks": {
"citation": {
"fields": [
{
"multiple": true,
"typeClass": "compound",
"typeName": "author",
"value": [
{
"authorName": {
"multiple": false,
"typeClass": "primitive",
"typeName": "authorName",
"value": "John Doe"
}
}
]
},
{
"multiple": true,
"typeClass": "compound",
"typeName": "datasetContact",
"value": [
{
"datasetContactName": {
"multiple": false,
"typeClass": "primitive",
"typeName": "datasetContactName",
"value": "John Doe"
},
"datasetContactEmail": {
"multiple": false,
"typeClass": "primitive",
"typeName": "datasetContactEmail",
"value": "john@doe.com"
}
}
]
},
{
"multiple": true,
"typeClass": "compound",
"typeName": "dsDescription",
"value": [
{
"dsDescriptionValue": {
"multiple": false,
"typeClass": "primitive",
"typeName": "dsDescriptionValue",
"value": "This is a description of the dataset"
}
}
]
},
{
"multiple": true,
"typeClass": "controlledVocabulary",
"typeName": "subject",
"value": [
"Other"
]
},
{
"multiple": false,
"typeClass": "primitive",
"typeName": "title",
"value": "My dataset"
}
]
}
}
"datasetVersion": {
"metadataBlocks": {
"citation": {
"fields": [
{
"multiple": true,
"typeClass": "compound",
"typeName": "author",
"value": [
{
"authorName": {
"multiple": false,
"typeClass": "primitive",
"typeName": "authorName",
"value": "John Doe"
}
}
]
},
{
"multiple": true,
"typeClass": "compound",
"typeName": "datasetContact",
"value": [
{
"datasetContactName": {
"multiple": false,
"typeClass": "primitive",
"typeName": "datasetContactName",
"value": "John Doe"
},
"datasetContactEmail": {
"multiple": false,
"typeClass": "primitive",
"typeName": "datasetContactEmail",
"value": "john@doe.com"
}
}
]
},
{
"multiple": true,
"typeClass": "compound",
"typeName": "dsDescription",
"value": [
{
"dsDescriptionValue": {
"multiple": false,
"typeClass": "primitive",
"typeName": "dsDescriptionValue",
"value": "This is a description of the dataset"
}
}
]
},
{
"multiple": true,
"typeClass": "controlledVocabulary",
"typeName": "subject",
"value": [
"Other"
]
},
{
"multiple": false,
"typeClass": "primitive",
"typeName": "title",
"value": "My dataset"
}
]
}
}
}
}
Loading

0 comments on commit 43c69b6

Please sign in to comment.