Skip to content
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

codespell: config, workflow + fixes #214

Merged
merged 5 commits into from
Oct 5, 2023
Merged

Conversation

yarikoptic
Copy link
Member

No description provided.

@welcome
Copy link

welcome bot commented Mar 12, 2023

Thanks for opening your first pull request! We are happy to have your contributions 🎉 😄

@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (8c934ad) 93.78% compared to head (486b4de) 94.19%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #214      +/-   ##
==========================================
+ Coverage   93.78%   94.19%   +0.41%     
==========================================
  Files          17       17              
  Lines         965      965              
==========================================
+ Hits          905      909       +4     
+ Misses         60       56       -4     
Files Coverage Δ
datalad_dataverse/_version.py 100.00% <ø> (ø)
datalad_dataverse/add_sibling_dataverse.py 81.94% <ø> (ø)
datalad_dataverse/baseremote.py 90.99% <ø> (ø)
datalad_dataverse/dataset.py 93.52% <ø> (ø)
datalad_dataverse/tests/test_dataset.py 99.18% <ø> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mih
Copy link
Member

mih commented Mar 13, 2023

Hey, thanks for the PR. I will have to leave it hanging here for a bit. There are substantial reorganizations and deletions going on. It already has conflicts, and resolving them cannot have enough priority right now. Sorry.

@yarikoptic
Copy link
Member Author

note that actual fixes are just datalad rerun away, so the last commit could be dropped and reran easily later.

@mih
Copy link
Member

mih commented Mar 13, 2023

Cool, that simplifies things. Thx!

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w || :",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@yarikoptic
Copy link
Member Author

I don't think errors in docs and appveyor like

>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://demo.dataverse.org/api/v1/dataverses/dv-b0d40816-5ef4-11ee-af7e-7d5823a458c2/datasets?User-Agent=pydataverse&key=9f08610e-0e99-4b29-b657-9b60536b39c8
../../../dlvenv/lib/python3.8/site-packages/requests/models.py:1021: HTTPError

could be related to these changes but I could be proven wrong

@yarikoptic
Copy link
Member Author

fwiw - docs were red for a few recent runs throughout recent months, so indeed not related

@adswa
Copy link
Member

adswa commented Oct 4, 2023

Its not your changes from this PR that cause the majority of issues - they upgraded the dataverse version on demo.dataverse.org, and that seemingly contained a few breaking changes.

We've broken it down this far:

What breaks is the dataverse_dataset fixture, which uses Pydataverse to create a temporary dataset at demo.dataverse.org.
Since 5.14, license metadata is required when creating a dataset via the API: https://github.com/IQSS/dataverse/blob/master/doc/release-notes/5.14-release-notes.md#handling-of-license-information-fixed-in-the-api. Simply adding the necessary metadata like in the diff below does not seem to fix things immediately, though, so there might more.

diff --git a/datalad_dataverse/tests/utils.py b/datalad_dataverse/tests/utils.py
index 4a0237a..5c6973e 100644
--- a/datalad_dataverse/tests/utils.py
+++ b/datalad_dataverse/tests/utils.py
@@ -104,26 +104,32 @@ def create_test_dataverse_dataset(api, collection, name):
     str
       The persistent DOI for the dataset
     """
-    meta = {
-        "http://purl.org/dc/terms/title": name,
-        "http://purl.org/dc/terms/subject":
-        "Medicine, Health and Life Sciences",
-        "http://purl.org/dc/terms/creator": {
-            "https://dataverse.org/schema/citation/authorName": "DataLad",
-            "https://dataverse.org/schema/citation/authorAffiliation":
-            "datalad.org"
+    meta = {"datasetVersion": {
+        "license": {
+            "name": "CC0 1.0",
+            "uri": "http://creativecommons.org/publicdomain/zero/1.0"
         },
-        "https://dataverse.org/schema/citation/datasetContact": {
-            "https://dataverse.org/schema/citation/datasetContactEmail":
-            "team@datalad.org",
-            "https://dataverse.org/schema/citation/datasetContactName":
-            "DataLad"
-        },
-        "https://dataverse.org/schema/citation/dsDescription": {
-            "https://dataverse.org/schema/citation/dsDescriptionValue":
-            "no description"
-        }
-    }
+        "metadataBlocks": {
+            "http://purl.org/dc/terms/title": name,
+            "http://purl.org/dc/terms/subject":
+            "Medicine, Health and Life Sciences",
+            "http://purl.org/dc/terms/creator": {
+                "https://dataverse.org/schema/citation/authorName": "DataLad",
+                "https://dataverse.org/schema/citation/authorAffiliation":
+                "datalad.org"
+            },
+            "https://dataverse.org/schema/citation/datasetContact": {
+                "https://dataverse.org/schema/citation/datasetContactEmail":
+                "team@datalad.org",
+                "https://dataverse.org/schema/citation/datasetContactName":
+                "DataLad"
+            },
+            "https://dataverse.org/schema/citation/dsDescription": {
+                "https://dataverse.org/schema/citation/dsDescriptionValue":
+                "no description"
+            }
+    }}}

Copy link
Member

@adswa adswa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, thanks!

@adswa adswa merged commit ffc3908 into datalad:main Oct 5, 2023
5 checks passed
@welcome
Copy link

welcome bot commented Oct 5, 2023

Congrats on merging your first pull request! 😎 The Datalad team is thankful for your contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants