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

fix(ontology): add default values for missing comments (DEV-337) #141

Merged
merged 13 commits into from Jan 10, 2022

Conversation

irinaschubert
Copy link

@irinaschubert irinaschubert commented Jan 6, 2022

resolves DEV-337
Default value for missing comments for resources and properties is: "[no comment provided]".
In this PR I also added a check if a group, user or list provided inside the ontology already exists and if so, it just skips over it (instead of throwing an error). Like this, it is possible to repeat the ontology creation several times and it only creates a group, user or list if it does not already exist on the server. With this comes the possibility to update the project information (only longname, descriptions and keywords) - again without throwing an error like before. This makes local testing a lot more convenient.

@irinaschubert irinaschubert self-assigned this Jan 6, 2022
Copy link
Collaborator

@BalduinLandolt BalduinLandolt 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 over all. As always with dsp-tools, there could be more refactoring and cosmetics done... but it also doesn't need to happen in this PR

knora/dsplib/models/group.py Outdated Show resolved Hide resolved
knora/dsplib/utils/expand_all_lists.py Outdated Show resolved Hide resolved
knora/dsplib/models/project.py Outdated Show resolved Hide resolved
knora/dsplib/utils/onto_create_lists.py Show resolved Hide resolved
knora/dsplib/utils/onto_create_lists.py Show resolved Hide resolved
knora/dsplib/utils/onto_create_ontology.py Outdated Show resolved Hide resolved
knora/dsplib/utils/onto_create_ontology.py Outdated Show resolved Hide resolved
knora/dsplib/utils/onto_create_ontology.py Show resolved Hide resolved
knora/dsplib/utils/onto_create_ontology.py Show resolved Hide resolved
knora/dsplib/utils/onto_create_ontology.py Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Jan 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

No Coverage information No Coverage information
0.3% 0.3% Duplication

@irinaschubert
Copy link
Author

Thanks for the review, @BalduinLandolt . I considered all your suggestions but the declaration of variables with None. These are needed to avoid the "local variable '...' might be referenced before assignment" warnings. If you know another, less verbose way to avoid these, I'm open to your suggestion!

@irinaschubert irinaschubert merged commit 6f0094e into main Jan 10, 2022
@irinaschubert irinaschubert deleted the wip/dev-337-add-default-value-for-comments branch January 10, 2022 16:30
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.

None yet

2 participants