From 0ce6f804094412c8675a22c38fb010578d7c8c0f Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 18 Jun 2024 15:03:57 +0200 Subject: [PATCH 1/2] move all to pyproject.toml --- MANIFEST.in | 23 +++++++++--- README.md | 12 ++++++ README.rst | 18 --------- VERSION | 1 - conda-recipe/meta.yaml | 42 --------------------- modd.conf | 23 ------------ pyproject.toml | 85 +++++++++++++++++++++++++++++++++++++++++- release.sh | 25 ------------- setup.cfg | 83 ----------------------------------------- setup.py | 10 ----- 10 files changed, 114 insertions(+), 208 deletions(-) create mode 100644 README.md delete mode 100644 README.rst delete mode 100644 VERSION delete mode 100644 conda-recipe/meta.yaml delete mode 100644 modd.conf delete mode 100644 release.sh delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in index a9dca905..8bc15f20 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,19 @@ -include *.rst include *.txt -include *.ini -include VERSION -include setup.cfg -recursive-include ioos_qc *.py +include README.md +include pyproject.toml + +graft ioos_qc + +prune .github +prune *.egg-info +prune docs +prune resources +prune tests + +exclude *.nc +exclude *.yml +exclude .coveragerc +exclude .gitignore +exclude .pre-commit-config.yaml +exclude ioos_qc/_version.py +exclude ruff.toml diff --git a/README.md b/README.md new file mode 100644 index 00000000..4d31d4e0 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# IOOS QC + +[![conda_forge_package](https://anaconda.org/conda-forge/ioos_qc/badges/version.svg)](https://anaconda.org/conda-forge/ioos_qc) +[![Default-Tests](https://github.com/ioos/ioos_qc/actions/workflows/tests.yml/badge.svg)](https://github.com/ioos/ioos_qc/actions/workflows/tests.yml) + +Collection of utilities, scripts and tests to assist in automated +quality assurance and quality control for oceanographic datasets and +observing systems. + +[Code](https://github.com/ioos/ioos_qc) \| +[Issues](https://github.com/ioos/ioos_qc/issues) \| +[Documentation](https://ioos.github.io/ioos_qc/) diff --git a/README.rst b/README.rst deleted file mode 100644 index c9581ced..00000000 --- a/README.rst +++ /dev/null @@ -1,18 +0,0 @@ -======= -IOOS QC -======= - -.. image:: https://anaconda.org/conda-forge/ioos_qc/badges/version.svg - :target: https://anaconda.org/conda-forge/ioos_qc - :alt: conda_forge_package - -.. image:: https://travis-ci.org/ioos/ioos_qc.svg?branch=main - :target: https://travis-ci.org/ioos/ioos_qc - :alt: build_status - -Collection of utilities, scripts and tests to assist in automated -quality assurance and quality control for oceanographic datasets and -observing systems. - -`Code `_ | `Issues `_ | `Documentation `_ - diff --git a/VERSION b/VERSION deleted file mode 100644 index 38f77a65..00000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.0.1 diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml deleted file mode 100644 index 817741be..00000000 --- a/conda-recipe/meta.yaml +++ /dev/null @@ -1,42 +0,0 @@ -package: - name: ioos_qc - version: "2.0.1" - -source: - path: ../ - -build: - number: 0 - noarch: python - script: python -m pip install --no-deps --ignore-installed . - -requirements: - host: - - python - - pip - run: - - python - - geojson - - geopandas - - jsonschema - - netCDF4 - - numba - - numpy >=1.14 - - pyproj - - ruamel.yaml - - scipy - - shapely - - simplejson - - xarray - -test: - source_files: - - ioos_qc - imports: - - ioos_qc - -about: - home: https://github.com/ioos/ioos_qc - license: Apache 2.0 - license_file: LICENSE.txt - summary: 'Collection of utilities, scripts and tests to assist in automated quality assurance.' diff --git a/modd.conf b/modd.conf deleted file mode 100644 index d79bb2ec..00000000 --- a/modd.conf +++ /dev/null @@ -1,23 +0,0 @@ -# Requires `unbuffer` from `expect` -# See: https://github.com/cortesi/modd/issues/26#issuecomment-258692008 - -docs/**/*.rst { - prep +onchange: cd docs && sphinx-apidoc -M -f -o source/api ../ioos_qc && make html -} - -docs/build/html/**/*.html docs/build/html/**/*.css { - daemon: devd -m ./docs/build/html -} - -**/*.py { - prep +onchange: py.test --disable-warnings --pep8 -m pep8 @mods - prep +onchange: py.test --disable-warnings --flakes -m flakes @mods -} - -**/test_*.py { - prep +onchange: py.test @mods -} - -**/*.py !**/test_*.py !docs/**/*.py { - prep +onchange: py.test -} diff --git a/pyproject.toml b/pyproject.toml index 7150f71d..0b945543 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,86 @@ [build-system] -requires = ["setuptools>=41.2", "setuptools_scm", "wheel"] build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=42", + "setuptools-scm", + "wheel", +] + +[project] +name = "ioos_qc" +description = "IOOS QARTOD and Quality Control tests implemented in Python" +readme = "README.md" +license = { file = "LICENSE.txt" } +maintainers = [ + { name = "Kyle Wilcox", email = "kyle@axds.co" }, + { name = "Filipe Fernandes", email = "ocefpaf+ioos_qc@gmail.com" }, +] +requires-python = ">=3.8" +classifiers = [ + "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", + "Programming Language :: Python :: 3.12", +] +dynamic = [ + "dependencies", + "version", +] +urls.documentation = "https://ioos.github.io/ioos_qc" +urls.homepage = "https://github.com/ioos/ioos_qc" +urls.repository = "https://github.com/ioos/ioos_qc" + +[project.optional-dependencies] +test = ["dask", "pytest"] +extras = ["bokeh", "nco", "numba"] + +[tool.setuptools] +packages = [ + "ioos_qc", +] +include-package-data = true + +[tool.setuptools.dynamic] +dependencies = { file = [ + "requirements.txt", +] } + +[tool.setuptools_scm] +write_to = "ioos_qc/_version.py" +write_to_template = "__version__ = '{version}'" +tag_regex = "^(?Pv)?(?P[^\\+]+)(?P.*)?$" + +[tool.check-manifest] +ignore = [ + "*.yml", + ".coveragerc", + "docs", + "docs/*", + "tests", + "tests/*", +] + +[tool.pytest.ini_options] +filterwarnings = [ + "error:::ioos_qc.*", + "ignore::UserWarning", + "ignore::RuntimeWarning", +] + +[tool.interrogate] +ignore-init-method = true +ignore-init-module = false +ignore-magic = false +ignore-semiprivate = false +ignore-private = false +ignore-module = false +fail-under = 85 +exclude = [ + "docs", + "tests", +] +verbose = 1 +quiet = false +color = true diff --git a/release.sh b/release.sh deleted file mode 100644 index 856ef8e4..00000000 --- a/release.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -if [ $# -eq 0 ]; then - echo "No version specified, exiting" - exit 1 -fi - -# Set version to release -sed -i "s/^__version__ = .*/__version__ = \"$1\"/" ioos_qc/__init__.py -sed -i "s/version: .*/version: \"$1\"/" conda-recipe/meta.yaml -sed -i "s/version = .*/version = \"$1\"/" docs/source/conf.py -sed -i "s/release = .*/release = \"$1\"/" docs/source/conf.py -echo $1 > VERSION - -# Commit release -git add ioos_qc/__init__.py -git add conda-recipe/meta.yaml -git add VERSION -git add docs/source/conf.py -git commit -m "Release $1" - -# Tag -git tag $1 - -echo "Now push this branch/tag!" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a2bdd2e4..00000000 --- a/setup.cfg +++ /dev/null @@ -1,83 +0,0 @@ -[metadata] -name = ioos_qc -version = attr: ioos_qc.__version__ -description = IOOS QARTOD and Quality Control tests implemented in Python -long_description = file: README.rst -long_description_content_type = text/x-rst -license = Apache -license_file = LICENSE.txt -author = Kyle Wilcox -author_email = kyle@axds.co -url = https://github.com/ioos/ioos_qc -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Intended Audience :: Science/Research - Programming Language :: Python - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Topic :: Scientific/Engineering - Topic :: Scientific/Engineering :: GIS - Topic :: Scientific/Engineering :: Information Analysis - Topic :: Scientific/Engineering :: Mathematics - Topic :: Scientific/Engineering :: Physics - -[options] -packages = find: -install_requires = - geographiclib - geojson - h5netcdf - jsonschema - numpy>=1.14 - pandas - pyparsing - ruamel.yaml - scipy - shapely - xarray -tests_require = - dask - pytest - pytest-flake8>=1.0.4 - flake8 -python_requires = >=3.7,<4 - -[options.extras_require] -extras = - bokeh - nco - numba - -[options.packages.find] -exclude = tests - -[tool:pytest] -addopts = -s -rxs -v -flake8-max-line-length = 100 -flake8-ignore = - *.py E265 E501 E221 E203 E201 E124 E202 E241 E251 W293 W291 W504 - docs/* ALL - ioos_qc/tests/*.py F403 F405 - -[flake8] -max-line-length = 100 -per-file-ignores = - *.py: E265 E501 E221 E203 E201 E124 E202 E241 E251 W293 W291 W504 - ioos_qc/tests/*.py: F403 F405 -exclude = - docs/ - -[tool:isort] -line_length=100 -indent=' ' -balanced_wrapping=1 -multi_line_output=3 -default_section=FIRSTPARTY -use_parentheses=1 -reverse_relative=1 -length_sort=1 -combine_star=1 -order_by_type=0 diff --git a/setup.py b/setup.py deleted file mode 100644 index 72789edb..00000000 --- a/setup.py +++ /dev/null @@ -1,10 +0,0 @@ -from setuptools import setup - -setup( - name="ioos_qc", - use_scm_version={ - "write_to": "ioos_qc/_version.py", - "write_to_template": '__version__ = "{version}"', - "tag_regex": r"^(?Pv)?(?P[^\+]+)(?P.*)?$", - }, -) From 2b2eb5e510fd867361addfff65084fdb1bb87301 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 18 Jun 2024 15:30:06 +0200 Subject: [PATCH 2/2] can't fail on warnings yet --- pyproject.toml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0b945543..7cc2f67e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,13 +62,6 @@ ignore = [ "tests/*", ] -[tool.pytest.ini_options] -filterwarnings = [ - "error:::ioos_qc.*", - "ignore::UserWarning", - "ignore::RuntimeWarning", -] - [tool.interrogate] ignore-init-method = true ignore-init-module = false