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

Adding terms of use in DDI #11071

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

lubitchv
Copy link
Contributor

@lubitchv lubitchv commented Dec 6, 2024

What this PR does / why we need it:
It adds custom terms of use and standard license in DDI export.
It adds standard license to DDI import.
In this case DDI import and export match and will include both standard and custom licenses.

Which issue(s) this PR closes:

Suggestions on how to test this:
Create two datasets, one with standard license and another custom license. Publish it. Look at export DDI. For standard license it should contain something like:
<dataAccs> <notes type="DVN:TOU" level="dv"> <a href="http://creativecommons.org/publicdomain/zero/1.0">CC0 1.0</a> </notes> </dataAccs>
For custom license, it should contain something like:
<dataAccs><notes type="DVN:TOU" level="dv">This is my terms</notes></dataAccs>

Then try to create a new datasets with these DDI xmls using importddi api. See that for standard license it appears as standard and custom Terms of use appear as custom.

@pdurbin pdurbin added the Type: Bug a defect label Dec 6, 2024
@sekmiller sekmiller self-assigned this Dec 13, 2024
xmlw.writeCharacters(version.getTermsOfUse());
xmlw.writeEndElement(); //notes
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add to DdiExportUtilTest.java to exercise this code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added dataset-finch-terms-of-use.json and dataset-finch-terms-of-use.xml which is used in testJson2DdiNoFilesTermsOfUse() for custom terms of use

xmlw.writeCharacters("<a href=" + '"' + uri + '"' + ">" + name + "</a>");
xmlw.writeEndElement(); //notes
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, please add a test to DdiExportUtilTest.java

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The standard license was already in dataset-finch1.json and dataset-finch1.xml was updated to add the standard license.

Copy link
Contributor

@sekmiller sekmiller 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 in general. Please add tests to DdiExportUtilTest.java and update from dev. We have recently released version 6.5.

Thanks!

@coveralls
Copy link

coveralls commented Dec 13, 2024

Coverage Status

coverage: 22.581% (+0.01%) from 22.571%
when pulling 32de244 on lubitchv:9871-termsofuse_license
into e3b5795 on IQSS:develop.

@lubitchv
Copy link
Contributor Author

@sekmiller I updated the branch from the develop and added to the DdiExportUtilTest to test for standard license and custom terms of use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug a defect
Projects
Status: In Review 🔎
Development

Successfully merging this pull request may close these issues.

Feature Request/Idea: Add Standard CC and Custom Licenses to DDI Export Metadata
4 participants