Skip to content

Commit

Permalink
Merge branch 'master' into flb/update_owlready2_0.45
Browse files Browse the repository at this point in the history
  • Loading branch information
francescalb authored Oct 25, 2024
2 parents 87090a7 + 582935b commit bc6ff20
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cd_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
publish:
name: External
uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.7.4
uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.8.3
if: github.repository == 'emmo-repo/EMMOntoPy' && startsWith(github.ref, 'refs/tags/v')
with:
git_username: EMMOntoPy Developers
Expand All @@ -31,5 +31,4 @@ jobs:
changelog_exclude_labels: dependencies

secrets:
PyPI_token: ${{ secrets.PYPI_TOKEN }}
PAT: ${{ secrets.RELEASE_PAT }}
2 changes: 1 addition & 1 deletion .github/workflows/ci_automerge_dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
update-dependabot-branch:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.7.4
uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.8.3
if: github.repository_owner == 'emmo-repo' && startsWith(github.event.pull_request.head.ref, 'dependabot/') && github.actor == 'dependabot[bot]'
secrets:
PAT: ${{ secrets.RELEASE_PAT }}
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd_updated_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
updates-to-master:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v2.7.4
uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v2.8.3
if: github.repository_owner == 'emmo-repo'
with:
git_username: EMMOntoPy Developers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
create-collected-pr:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v2.7.4
uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v2.8.3
if: github.repository_owner == 'emmo-repo'
with:
git_username: EMMOntoPy Developers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
tests:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.7.4
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.8.3
with:
# General
install_extras: "[dev,docs]"
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-symlinks
- id: check-xml
Expand All @@ -17,13 +17,13 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/ambv/black
rev: 24.4.2
rev: 24.10.0
hooks:
- id: black
name: Blacken

- repo: https://github.com/PyCQA/bandit
rev: '1.7.9'
rev: '1.7.10'
hooks:
- id: bandit
args: [-r]
Expand All @@ -36,7 +36,7 @@ repos:
# exclude: ^tests/.*$

- repo: https://github.com/SINTEF/ci-cd
rev: v2.7.4
rev: v2.8.3
hooks:
- id: docs-api-reference
args:
Expand Down
31 changes: 28 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
# Changelog

## [v0.7.0.1](https://github.com/emmo-repo/EMMOntoPy/tree/v0.7.0.1) (2024-02-29)
## [v7.0.2](https://github.com/emmo-repo/EMMOntoPy/tree/v7.0.2) (2024-10-24)

[Full Changelog](https://github.com/emmo-repo/EMMOntoPy/compare/v0.7.1...v7.0.2)

**Closed issues:**

- excelparser, allow for = in strings for other annotations. [\#751](https://github.com/emmo-repo/EMMOntoPy/issues/751)
- Add options to ontoconvert for adding annotations expected by FOOPS [\#728](https://github.com/emmo-repo/EMMOntoPy/issues/728)

[Full Changelog](https://github.com/emmo-repo/EMMOntoPy/compare/v0.7.1...v0.7.0.1)
**Merged pull requests:**

- Updated to owlready2==0.44 [\#780](https://github.com/emmo-repo/EMMOntoPy/pull/780) ([francescalb](https://github.com/francescalb))
- Added release\_pat secret to ci\_cd\_updated\_master workflow [\#777](https://github.com/emmo-repo/EMMOntoPy/pull/777) ([francescalb](https://github.com/francescalb))
- Added test for descriptions [\#766](https://github.com/emmo-repo/EMMOntoPy/pull/766) ([jesper-friis](https://github.com/jesper-friis))
- Fixed failing test\_save in master [\#756](https://github.com/emmo-repo/EMMOntoPy/pull/756) ([jesper-friis](https://github.com/jesper-friis))
- Added possibility for = in extra annotations defined in excelparser [\#752](https://github.com/emmo-repo/EMMOntoPy/pull/752) ([francescalb](https://github.com/francescalb))
- Load doamin-battery instead of battinfo which is just an extra wrapping [\#745](https://github.com/emmo-repo/EMMOntoPy/pull/745) ([francescalb](https://github.com/francescalb))
- Rewriting ontodoc based on domain-battery [\#742](https://github.com/emmo-repo/EMMOntoPy/pull/742) ([jesper-friis](https://github.com/jesper-friis))
- Make it possible to run HermiT on EMMO [\#740](https://github.com/emmo-repo/EMMOntoPy/pull/740) ([jesper-friis](https://github.com/jesper-friis))
- Added minor fixes for ontoconvert [\#739](https://github.com/emmo-repo/EMMOntoPy/pull/739) ([jesper-friis](https://github.com/jesper-friis))
- Added additional recognised prefixes [\#734](https://github.com/emmo-repo/EMMOntoPy/pull/734) ([jesper-friis](https://github.com/jesper-friis))
- Copy EMMO annotations [\#733](https://github.com/emmo-repo/EMMOntoPy/pull/733) ([jesper-friis](https://github.com/jesper-friis))
- Add --copy-annotation option to ontoconvert [\#732](https://github.com/emmo-repo/EMMOntoPy/pull/732) ([jesper-friis](https://github.com/jesper-friis))
- Updated list of IRIs to ignore when checking prefLabel [\#731](https://github.com/emmo-repo/EMMOntoPy/pull/731) ([jesper-friis](https://github.com/jesper-friis))

## [v0.7.1](https://github.com/emmo-repo/EMMOntoPy/tree/v0.7.1) (2024-02-29)

[Full Changelog](https://github.com/emmo-repo/EMMOntoPy/compare/v0.7.0...v0.7.1)
[Full Changelog](https://github.com/emmo-repo/EMMOntoPy/compare/v0.7.0.1...v0.7.1)

## [v0.7.0.1](https://github.com/emmo-repo/EMMOntoPy/tree/v0.7.0.1) (2024-02-29)

[Full Changelog](https://github.com/emmo-repo/EMMOntoPy/compare/v0.7.0...v0.7.0.1)

**Closed issues:**

Expand Down
2 changes: 1 addition & 1 deletion ontopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# pylint: disable=wrong-import-position,wrong-import-order
import sys

__version__ = "0.7.1"
__version__ = "7.0.2"

# Ensure correct Python version
if sys.version_info < (3, 7):
Expand Down
6 changes: 4 additions & 2 deletions ontopy/excelparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ExcelError(EMMOntoPyException):

def create_ontology_from_excel( # pylint: disable=too-many-arguments, too-many-locals
excelpath: str,
*,
concept_sheet_name: str = "Concepts",
metadata_sheet_name: str = "Metadata",
imports_sheet_name: str = "ImportedOntologies",
Expand Down Expand Up @@ -290,7 +291,7 @@ def _relative_to_absolute_paths(path):
)


def create_ontology_from_pandas( # pylint:disable=too-many-locals,too-many-branches,too-many-statements,too-many-arguments
def create_ontology_from_pandas( # pylint:disable=too-many-locals,too-many-branches,too-many-statements,too-many-arguments, too-many-positional-arguments
data: pd.DataFrame,
objectproperties: pd.DataFrame,
annotationproperties: pd.DataFrame,
Expand Down Expand Up @@ -584,6 +585,7 @@ def _add_literal( # pylint: disable=too-many-arguments
data: Union[pd.DataFrame, pd.Series],
destination: owlready2.prop.IndividualValueList, #
name: str,
*,
metadata: bool = False,
only_one: bool = False,
sep: str = ";",
Expand Down Expand Up @@ -902,7 +904,7 @@ def _add_range_domain(
return onto, properties_with_errors


def _make_entity_list( # pylint: disable=too-many-arguments
def _make_entity_list( # pylint: disable=too-many-arguments, too-many-positional-arguments
onto: owlready2.Ontology,
row: pd.Series,
rowheader: str,
Expand Down
9 changes: 8 additions & 1 deletion ontopy/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def __init__( # pylint: disable=too-many-arguments,too-many-locals
self,
ontology,
root=None,
*,
leaves=None,
entities=None,
relations="isA",
Expand Down Expand Up @@ -296,7 +297,7 @@ def __init__( # pylint: disable=too-many-arguments,too-many-locals
elif root:
self.add_branch(
root,
leaves,
leaves=leaves,
relations=relations,
edgelabels=edgelabels,
addnodes=addnodes,
Expand Down Expand Up @@ -326,6 +327,7 @@ def __init__( # pylint: disable=too-many-arguments,too-many-locals
def add_entities( # pylint: disable=too-many-arguments
self,
entities=None,
*,
relations="isA",
edgelabels=None,
addnodes=False,
Expand Down Expand Up @@ -353,6 +355,7 @@ def add_entities( # pylint: disable=too-many-arguments
def add_branch( # pylint: disable=too-many-arguments,too-many-locals
self,
root,
*,
leaves=None,
include_leaves=True,
strict_leaves=False,
Expand Down Expand Up @@ -427,6 +430,7 @@ def add_branch( # pylint: disable=too-many-arguments,too-many-locals
def add_parents( # pylint: disable=too-many-arguments
self,
name,
*,
levels=1,
relations="isA",
edgelabels=None,
Expand Down Expand Up @@ -522,6 +526,7 @@ def add_edge(self, subject, predicate, obj, edgelabel=None, **attrs):
def add_source_edges( # pylint: disable=too-many-arguments,too-many-branches
self,
source,
*,
relations=None,
edgelabels=None,
addnodes=None,
Expand Down Expand Up @@ -607,6 +612,7 @@ def add_source_edges( # pylint: disable=too-many-arguments,too-many-branches

def add_edges( # pylint: disable=too-many-arguments
self,
*,
sources=None,
relations=None,
edgelabels=None,
Expand Down Expand Up @@ -998,6 +1004,7 @@ def setmodules(onto):
def plot_modules( # pylint: disable=too-many-arguments
src,
filename=None,
*,
fmt=None,
show=False,
strip_base=None,
Expand Down
6 changes: 5 additions & 1 deletion ontopy/ontodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ def __init__( # pylint: disable=too-many-arguments
template,
ontodoc,
basedir=".",
*,
figdir="genfigs",
figformat="png",
figscale=1.0,
Expand Down Expand Up @@ -756,7 +757,7 @@ def process_branches(self):
branch, int(opts.header_level) # pylint: disable=no-member
).split("\n")

def _make_branchfig( # pylint: disable=too-many-arguments,too-many-locals
def _make_branchfig( # pylint: disable=too-many-arguments,too-many-locals, too-many-positional-arguments
self,
name: str,
path: "Union[Path, str]",
Expand Down Expand Up @@ -1142,6 +1143,7 @@ def process(self):
def write( # pylint: disable=too-many-arguments
self,
outfile,
*,
fmt=None,
pandoc_option_files=(),
pandoc_options=(),
Expand Down Expand Up @@ -1288,6 +1290,7 @@ def run_pandoc( # pylint: disable=too-many-arguments
genfile,
outfile,
fmt,
*,
pandoc_option_files=(),
pandoc_options=(),
verbose=True,
Expand Down Expand Up @@ -1444,6 +1447,7 @@ def get_maxwidth(fmt):
def get_docpp( # pylint: disable=too-many-arguments
ontodoc,
infile,
*,
figdir="genfigs",
figformat="png",
maxwidth=None,
Expand Down
6 changes: 6 additions & 0 deletions ontopy/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ def set_default_label_annotations(self):
def get_by_label(
self,
label: str,
*,
label_annotations: str = None,
prefix: str = None,
imported: bool = True,
Expand Down Expand Up @@ -586,6 +587,7 @@ def set_common_prefix(

def load( # pylint: disable=too-many-arguments,arguments-renamed
self,
*,
only_local=False,
filename=None,
format=None, # pylint: disable=redefined-builtin
Expand Down Expand Up @@ -677,6 +679,7 @@ def load( # pylint: disable=too-many-arguments,arguments-renamed

def _load( # pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
self,
*,
only_local=False,
filename=None,
format=None, # pylint: disable=redefined-builtin
Expand Down Expand Up @@ -864,6 +867,7 @@ def save(
filename=None,
format=None,
dir=".",
*,
mkdir=False,
overwrite=False,
recursive=False,
Expand Down Expand Up @@ -1162,6 +1166,7 @@ def rec_imported(onto, imported):

def get_entities( # pylint: disable=too-many-arguments
self,
*,
imported=True,
classes=True,
individuals=True,
Expand Down Expand Up @@ -1571,6 +1576,7 @@ def get_branch( # pylint: disable=too-many-arguments
root,
leaves=(),
include_leaves=True,
*,
strict_leaves=False,
exclude=None,
sort=False,
Expand Down
2 changes: 2 additions & 0 deletions ontopy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ class ReadCatalogError(IOError):

def read_catalog( # pylint: disable=too-many-locals,too-many-statements,too-many-arguments
uri,
*,
catalog_file="catalog-v001.xml",
baseuri=None,
recursive=False,
Expand Down Expand Up @@ -602,6 +603,7 @@ def _validate_installed_version(
def convert_imported( # pylint: disable=too-many-arguments,too-many-locals
input_ontology: "Union[Path, str]",
output_ontology: "Union[Path, str]",
*,
input_format: "Optional[str]" = None,
output_format: str = "xml",
url_from_catalog: "Optional[bool]" = None,
Expand Down
5 changes: 3 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pre-commit>=2.21.0,<3; python_version<"3.9"
pre-commit~=3.7; python_version>="3.9"
pre-commit~=4.0; python_version>="3.9"
pylint~=2.17; python_version<"3.8"
pylint~=3.2; python_version>="3.8"
pylint==3.2; python_version=="3.8"
pylint~=3.3; python_version>="3.9"
pytest~=7.4; python_version<"3.8"
pytest~=8.3; python_version>="3.8"
pytest-cov~=4.1; python_version<"3.8"
Expand Down
3 changes: 2 additions & 1 deletion requirements_docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ mkdocs~=1.6; python_version>="3.8"
mkdocs-awesome-pages-plugin~=2.9
mkdocs-material~=9.5; python_version>="3.8"
mkdocs-material~=9.2; python_version<"3.8"
mkdocstrings[python-legacy]~=0.25.1; python_version>="3.8"
mkdocstrings[python-legacy]~=0.26.2; python_version>="3.9"
mkdocstrings[python-legacy]==0.26.1; python_version=="3.8"
mkdocstrings[python-legacy]~=0.22.0; python_version<"3.8"

0 comments on commit bc6ff20

Please sign in to comment.