Skip to content

Commit

Permalink
Fix test and Pre-commit errors
Browse files Browse the repository at this point in the history
Bumps the minimum version to 3.9 to match Xpublish itself. Testing on 3.8 and not finding a valid version seemed to be most of the failures.
  • Loading branch information
abkfenris committed May 22, 2024
1 parent 16a8e15 commit 61ff267
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
known_third_party = fastapi,pytest,setuptools,starlette,xarray,xpublish,yaml
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -12,7 +12,7 @@ repos:
types: ["python"]

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8

Expand All @@ -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
46 changes: 22 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=61",
"setuptools_scm[toml]>=3.4",
"setuptools-scm[toml]>=3.4",
"wheel",
]

Expand All @@ -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"
6 changes: 3 additions & 3 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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'


Expand Down

0 comments on commit 61ff267

Please sign in to comment.