Skip to content

Commit

Permalink
Merge pull request #5 from joshmoore/setuptools_scm
Browse files Browse the repository at this point in the history
General cleanup
  • Loading branch information
joshmoore authored Feb 6, 2024
2 parents e60af1f + abe4e44 commit c85865d
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 822 deletions.
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

0 comments on commit c85865d

Please sign in to comment.