diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 901df24c..e880829f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.9.3-dev +current_version = 0.10.1-dev commit = True tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(?:-(?P[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+(?P[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))? diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f0d22074..76fa5446 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,6 +60,7 @@ jobs: matrix: os: [ ubuntu-latest ] python-version: [ "3.8", "3.11" ] + pydantic: [ "pydantic1", "pydantic2" ] exclude: - os: windows-latest python-version: 3.8 @@ -77,4 +78,4 @@ jobs: pip install tox - name: Test with pytest run: - tox -e py + tox -e py-${{ matrix.pydantic }} diff --git a/docs/source/conf.py b/docs/source/conf.py index 844113a3..f7c93947 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -26,11 +26,9 @@ "sphinx.ext.todo", # 'sphinx.ext.mathjax', "sphinx.ext.viewcode", - "sphinx_autodoc_typehints", "sphinx_click.ext", "sphinx_automodapi.automodapi", "sphinx_automodapi.smart_resolver", - # 'texext', ] # Add any paths that contain templates here, relative to this directory. @@ -60,7 +58,7 @@ # # The full version, including alpha/beta/rc tags. -release = "0.9.3-dev" +release = "0.10.1-dev" # The short X.Y version. parsed_version = re.match( diff --git a/setup.cfg b/setup.cfg index 2ca4e3ed..02f65bb0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ ########################## [metadata] name = pyobo -version = 0.9.3-dev +version = 0.10.1-dev description = Handling and writing OBO long_description = file: README.rst @@ -59,9 +59,9 @@ install_requires = tabulate cachier pystow>=0.2.7 - bioversions>=0.5.181 - bioregistry>=0.9.62 - bioontologies>=0.3.0 + bioversions>=0.5.202 + bioregistry>=0.10.0 + bioontologies>=0.4.0 zenodo-client>=0.0.5 class_resolver psycopg2-binary @@ -85,11 +85,13 @@ package_dir = where = src [options.extras_require] +tests = + coverage + pytest docs = - sphinx<7.0 + sphinx sphinx-rtd-theme sphinx-click - sphinx-autodoc-typehints sphinx_automodapi web = flask diff --git a/src/pyobo/struct/reference.py b/src/pyobo/struct/reference.py index 3ec399b0..57021cc0 100644 --- a/src/pyobo/struct/reference.py +++ b/src/pyobo/struct/reference.py @@ -20,7 +20,7 @@ class Reference(curies.Reference): """A namespace, identifier, and label.""" - name: Optional[str] = Field(description="the name of the reference") + name: Optional[str] = Field(default=None, description="the name of the reference") @validator("prefix") def validate_prefix(cls, v): # noqa diff --git a/src/pyobo/version.py b/src/pyobo/version.py index 3f2eab59..22b4b6df 100644 --- a/src/pyobo/version.py +++ b/src/pyobo/version.py @@ -14,7 +14,7 @@ "get_git_hash", ] -VERSION = "0.9.3-dev" +VERSION = "0.10.1-dev" def get_git_hash() -> str: diff --git a/tox.ini b/tox.ini index 4b27c60a..3a880cc9 100644 --- a/tox.ini +++ b/tox.ini @@ -19,15 +19,18 @@ envlist = readme docs # the actual tests - py + py-pydantic1 + py-pydantic2 # always keep coverage-report last # coverage-report [testenv] commands = coverage run -p -m pytest --durations=20 {posargs:tests} deps = - coverage - pytest + pydantic1: pydantic<2.0 + pydantic2: pydantic>=2.0 +extras = + tests [testenv:coverage-clean] deps = coverage