diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 41238a4..b6e40e0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] os: [windows-latest, ubuntu-latest, macos-latest] fail-fast: false diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000..f29848f --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,2 @@ +[settings] +known_third_party = fastapi,pytest,setuptools,starlette,xarray,xpublish,yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ada03ef..6a65c64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: trailing-whitespace types: ["python"] @@ -12,7 +12,7 @@ repos: types: ["python"] - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 @@ -22,11 +22,11 @@ repos: - id: seed-isort-config - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/tox-dev/pyproject-fmt - rev: "0.9.1" + rev: "2.1.3" hooks: - id: pyproject-fmt diff --git a/pyproject.toml b/pyproject.toml index 003d65a..64c69df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "setuptools.build_meta" requires = [ "setuptools>=61", - "setuptools_scm[toml]>=3.4", + "setuptools-scm[toml]>=3.4", "wheel", ] @@ -11,42 +11,40 @@ name = "xpublish-intake" description = "An xpublish plugin for serving intake catalogs" readme = "README.md" authors = [ - { name="Kyle Wilcox", email="kyle@axds.co" }, + { name = "Kyle Wilcox", email = "kyle@axds.co" }, ] -requires-python = ">=3.8" +requires-python = ">=3.9" classifiers = [ - "Environment :: Web Environment", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", ] -dynamic =[ +dynamic = [ "version", ] dependencies = [ "xpublish", ] -[project.urls] -"Bug Tracker" = "https://github.com/axiom-data-science/xpublish-intake/issues" -"Homepage" = "https://github.com/axiom-data-science/xpublish-intake" +urls."Bug Tracker" = "https://github.com/axiom-data-science/xpublish-intake/issues" +urls."Homepage" = "https://github.com/axiom-data-science/xpublish-intake" +entry-points."xpublish.plugin".intake = "xpublish_intake.plugins:IntakePlugin" [tool.setuptools] -packages = ["xpublish_intake"] +packages = [ + "xpublish_intake", +] zip-safe = false include-package-data = true [tool.setuptools_scm] write_to = "xpublish_intake/_version.py" write_to_template = "__version__ = '{version}'" - -[project.entry-points."xpublish.plugin"] -intake = "xpublish_intake.plugins:IntakePlugin" diff --git a/tests/utils.py b/tests/utils.py index f18dbf5..9b32622 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -60,7 +60,7 @@ def test_intake_root(self, dsid, client): assert dsid in content['sources'] ds = content['sources'][dsid] - assert ds['args']['path'] == f'http://testserver/datasets/{dsid}/catalog.yaml' + assert ds['args']['path'] == f'http://testserver/datasets/{dsid}/catalog.yaml' # noqa: E231 assert ds['driver'] == 'intake.catalog.local.YAMLFileCatalog' def test_intake_dataset(self, dsid, client): @@ -86,12 +86,12 @@ def test_intake_dataset(self, dsid, client): # } # } - assert content['metadata']['access_url'] == f'http://testserver/datasets/{dsid}/catalog.yaml' + assert content['metadata']['access_url'] == f'http://testserver/datasets/{dsid}/catalog.yaml' # noqa: E231 assert content['name'] == dsid assert f'{dsid}-zarr' in content['sources'] ds = content['sources'][f'{dsid}-zarr'] - assert ds['args']['urlpath'] == f'http://testserver/datasets/{dsid}/zarr' + assert ds['args']['urlpath'] == f'http://testserver/datasets/{dsid}/zarr' # noqa: E231 assert ds['driver'] == 'zarr'