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

Flb/get descendants #405

Merged
merged 10 commits into from
Apr 28, 2022
Merged

Flb/get descendants #405

merged 10 commits into from
Apr 28, 2022

Conversation

francescalb
Copy link
Collaborator

@francescalb francescalb commented Apr 26, 2022

Description:

Added get_descendants as function to ontology

  • takes arguments
    • classes: one owl.ThingClass or an iterable sequence of such.
    • common: wether to return only common descendants or not
    • generations: number of generations to return. Defaults to all.

Type of change:

  • Bug fix.
  • New feature.
  • Documentation update.

Checklist:

This checklist can be used as a help for the reviewer.

  • Is the code easy to read and understand?
  • Are comments for humans to read, not computers to disregard?
  • Does a new feature has an accompanying new test (in the CI or unit testing schemes)?
  • Has the documentation been updated as necessary?
  • Does this close the issue?
  • Is the change limited to the issue?
  • Are errors handled for all outcomes?
  • Does the new feature provide new restrictions on dependencies, and if so is this documented?

Comments:

* takes arguments
	- classes: one owl.ThingClass or a list of such.
	- common: wether to return only common descendants or not
	- generations: number of generations to return. Defaults to -1
	  unless 'common' is True.
	- all_descendants: Return all descendants, default False, unless
	 'common' is True and generations not given explicitly.
ontopy/ontology.py Outdated Show resolved Hide resolved
ontopy/ontology.py Outdated Show resolved Hide resolved
ontopy/ontology.py Outdated Show resolved Hide resolved
ontopy/ontology.py Outdated Show resolved Hide resolved
ontopy/ontology.py Outdated Show resolved Hide resolved
ontopy/ontology.py Outdated Show resolved Hide resolved
ontopy/ontology.py Outdated Show resolved Hide resolved
ontopy/ontology.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@jesper-friis jesper-friis left a comment

Choose a reason for hiding this comment

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

Added some comments. Good test

ontopy/ontology.py Outdated Show resolved Hide resolved
@francescalb francescalb merged commit b5ff57c into master Apr 28, 2022
@CasperWA CasperWA deleted the flb/get_descendants branch May 5, 2022 09:24
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