Skip to content

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

Merged
irinaschubert merged 13 commits into
mainfrom
wip/dev-337-add-default-value-for-comments
Jan 10, 2022
Merged

irinaschubert merged 13 commits into
mainfrom
wip/dev-337-add-default-value-for-comments

Conversation

@irinaschubert

@irinaschubert irinaschubert commented Jan 6, 2022 •

Copy link
Copy Markdown

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

@BalduinLandolt BalduinLandolt left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread knora/dsplib/models/group.py Outdated
Comment thread knora/dsplib/utils/expand_all_lists.py Outdated
Comment thread knora/dsplib/models/project.py Outdated
Comment thread knora/dsplib/utils/onto_create_lists.py
Comment thread knora/dsplib/utils/onto_create_lists.py
Comment thread knora/dsplib/utils/onto_create_ontology.py Outdated
Comment thread knora/dsplib/utils/onto_create_ontology.py Outdated
Comment thread knora/dsplib/utils/onto_create_ontology.py
Comment thread knora/dsplib/utils/onto_create_ontology.py
Comment thread knora/dsplib/utils/onto_create_ontology.py
@sonarqubecloud

Copy link
Copy Markdown

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
Copy Markdown
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.

2 participants