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

create_from_excel/pandas return as list of concepts that are worngly defined in the excelfile #396

Merged
merged 7 commits into from
Apr 7, 2022

Conversation

francescalb
Copy link
Collaborator

@francescalb francescalb commented Apr 6, 2022

Description:

closes #393
A dictionary with lists of concepts that are wrongly defined is returned as well as the
produced ontology and catalog when using the --force option in create_from_excel.

The keys of the dictionary are keys on why these concepts are in the given list.

Different keys are returned for the following reasons:

  • "already_defined": These are concepts that are already in the ontology, either because they were already added in a previous line of the excelfile/pandas dataframe, or because it is already defined in the imported ontologies.
  • "in_imported_ontologies": Concepts that are defined in the excel, but already exist in the imported ontologies. This is a subset of the 'already_defined'
  • "wrongly_defined": Concepts that are given an invalid prefLabel (e.g. with a space in the name).
  • "missing_parents": Concepts that are missing parents. These concepts are added in the top of the ontology.
  • "invalid_parents": Concepts that invalidly defined parents.These concepts are added in the top of the ontology.
  • "nonadded_concepts": List of all concepts that are not added, either because the prefLabel is invalid, or because the concept has already been added once or already exists in an imported ontology.

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:

@francescalb francescalb changed the title create_from_excel/pandas return as list of concepts that are worngly defined create_from_excel/pandas return as list of concepts that are worngly defined in the excelfile Apr 6, 2022
@francescalb francescalb requested a review from jesper-friis April 6, 2022 12:29
@francescalb francescalb marked this pull request as ready for review April 6, 2022 12:29
ontopy/excelparser.py Outdated Show resolved Hide resolved
@francescalb francescalb merged commit 5d2971f into master Apr 7, 2022
@francescalb francescalb deleted the flb/issue393 branch April 7, 2022 09:27
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.

Return a list of the concepts that are disregarded during when converting from excel with -force argument
2 participants