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

defined_namespace_creator: concatenate several rdfs:comments #2254

Merged
merged 5 commits into from
Mar 13, 2023

Conversation

HanKruiger
Copy link
Contributor

Summary of changes

  • FIxed a bug in defined_namespace_creator so that when a resource in an ontology is commented on multiple times (with e.g. rdfs:comment), it creates only a single class variable in the resulting DefinedNamespace where the Python comment is the concatenation of the rdfs:comments.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Added tests for any changes that have a runtime impact.
  • Checked that all tests and type checking passes.
  • For changes that have a potential impact on users of this project:
    • [/] Updated relevant documentation to avoid inaccuracies.
    • [/] Considered adding additional documentation.
    • [/] Considered adding an example in ./examples for new features.
    • [/] Considered updating our changelog (CHANGELOG.md).
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@aucampia
Copy link
Member

thanks for the PR @HanKruiger, I will probably include this in the release that will go out shortly, but I will maybe make some small changes to your tests first. The change to the code itself looks 💯

@coveralls
Copy link

coveralls commented Mar 13, 2023

Coverage Status

Coverage: 90.782%. Remained the same when pulling d74ccad on HanKruiger:main into 35a3537 on RDFLib:main.

Mainly so it is clear where the file is being used from.
@aucampia aucampia requested a review from a team March 13, 2023 17:46
@aucampia aucampia added review wanted This indicates that the PR is ready for review ready to merge The PR will be merged soon if no further feedback is provided. labels Mar 13, 2023
Copy link
Member

@aucampia aucampia left a comment

Choose a reason for hiding this comment

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

Thanks for this fix @HanKruiger, looks good to me. I just move your test data to a different location though, defined_namespaces are intended for well known externally defined namespaces/vocabularies/ontologies, we don't really have a good place for contrived test data, so I made test/data/contrived with a README.md to explain its purpose.

I will likely merge this later tonight.

@aucampia aucampia requested a review from a team March 13, 2023 17:49
@aucampia aucampia merged commit 60d98db into RDFLib:main Mar 13, 2023
@HanKruiger
Copy link
Contributor Author

Cheers @aucampia! Thanks for the quick merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR will be merged soon if no further feedback is provided. review wanted This indicates that the PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants