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

General cleanup #5

Merged
merged 4 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
- uses: actions/setup-python@v2
- name: Build a binary wheel and a source tarball
run: |
python -mpip install setuptools versioneer wheel
python setup.py sdist bdist_wheel
python -mpip install setuptools build wheel
python -m build
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[settings]
known_third_party = entrypoints,omero,omero_marshal,omero_rdf,rdflib,setuptools,versioneer,wikidataintegrator
known_third_party = entrypoints,omero,omero_marshal,omero_rdf,rdflib,wikidataintegrator
2 changes: 0 additions & 2 deletions .omeroci/README

This file was deleted.

13 changes: 0 additions & 13 deletions .omeroci/release

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ repos:
]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
rev: v1.7.1
hooks:
- id: mypy
language_version: python3
Expand Down
71 changes: 71 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[build-system]
requires = [
"setuptools>=60",
"setuptools-scm>=8.0",
]

[tools.setuptools.dynamic]
version = {attr = "omero_rdf.__version__"}

[project]
name = "omero-rdf"
readme = "README.rst"
dynamic = ["version"]
description="A plugin for exporting rdf from OMERO"

requires-python = ">3.8"

dependencies = [
"omero-py>=5.8",
"entrypoints",
"types-entrypoints",
"future",
"rdflib",
"omero-marshal",
"wikidataintegrator",
]

classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Plugins",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
]

keywords = [
"OMERO.cli", "plugin",
]

authors = [
{name = "The Open Microscopy Team"},
]

[project.optional-dependencies]
tests = [
"pytest",
"restview",
"mox3",
]

[project.urls]
Repository = "https://github.com/German-BioImaging/omero-rdf"
Changelog = "https://github.com/German-BioImaging/omero-rdf/blob/master/CHANGES.txt"

[project.entry-points."omero_rdf.annotation_handler"]
idr_annotations = "omero_rdf.idr_annotations:IDRAnnotationHandler"

[tool.setuptools]
package-dir = {""= "src"}

[tools.mypy]
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
disallow_any_generics = false
ignore_missing_imports = true
27 changes: 0 additions & 27 deletions setup.cfg

This file was deleted.

79 changes: 0 additions & 79 deletions setup.py

This file was deleted.

9 changes: 3 additions & 6 deletions src/omero_rdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ def handle(self, data: Data) -> None:
if output:
s, p, o = output
if None in (s, p, o):
print(f""" skipping None value: {s} {p} {o}""")
logging.debug("skipping None value: %s %s %s", s, p, o)
else:
print(f"""{s.n3():50}\t{p.n3():60}\t{o.n3()} .""")
print(f"""{s.n3()}\t{p.n3()}\t{o.n3()} .""")

def rdf(
self, data: Data, _id: Optional[Subj] = None
Expand All @@ -180,7 +180,7 @@ def rdf(
raise Exception(f"missing id: {data}")
_id = self.get_identity(_type, str_id)
if _id in self.cache:
logging.debug(f"# skipping previously seen {_id}")
logging.debug("# skipping previously seen %s", _id)
return
else:
self.cache.add(_id)
Expand Down Expand Up @@ -344,6 +344,3 @@ def _lookup(
if not obj:
self.ctx.die(110, f"No such {_type}: {oid}")
return obj

from . import _version
__version__ = _version.get_versions()['version']
Loading