From 5a8acd23a78952d4c57493d87953b36734d00ea1 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 30 Jul 2024 11:18:58 +0200 Subject: [PATCH 1/7] group dependabot PRs --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 563dd9b..7818bef 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,7 @@ updates: interval: "daily" labels: - "Bot" + groups: + github-actions: + patterns: + - '*' From a95f9743e6b655bd384c0bf4156aa4b6955b899b Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 30 Jul 2024 11:19:06 +0200 Subject: [PATCH 2/7] run tests on py312 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a996d67..65d93c0 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.8", "3.9", "3.10", "3.11", "3.12" ] os: [windows-latest, ubuntu-latest, macos-latest] fail-fast: false From 4c870dd7bac7e46f98eae9927a0be72f64cd2756 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 30 Jul 2024 11:29:27 +0200 Subject: [PATCH 3/7] update --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0e1c69..00bddca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,12 +51,12 @@ repos: - id: add-trailing-comma - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.0 + rev: v0.5.5 hooks: - id: ruff - repo: https://github.com/tox-dev/pyproject-fmt - rev: 2.1.3 + rev: 2.1.4 hooks: - id: pyproject-fmt From 69d37f8d8f06f2f7af21d054137e6888462c62c2 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 30 Jul 2024 11:29:48 +0200 Subject: [PATCH 4/7] remove setup.py and setup.cfg --- setup.cfg | 67 ------------------------------------------------------- setup.py | 12 ---------- 2 files changed, 79 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 7e2f13c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,67 +0,0 @@ -[metadata] -name = windrose -version = attr: windrose.__version__ -description = Python Matplotlib, Numpy library to manage wind data, draw windrose (also known as a polar rose plot) -author = Lionel Roubeyrie -maintainer = Sebastien Celles -author_email = s.celles@gmail.co -url = https://github.com/python-windrose/windrose -long_description_content_type = text/markdown -long_description = file: README.md -keywords = python, matplotlib, wind, windrose, compass -license = BCeCILL-B OR BSD-3-Clause -license_files = - LICENCE - LICENCE_BSD-3-Clause.TXT - LICENCE_CECILL-B.TXT -project_urls = - Documentation = https://python-windrose.github.io/windrose - Bug Tracker = https://github.com/python-windrose/windrose/issues - Source Code = https://github.com/python-windrose/windrose -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Science/Research - Operating System :: OS Independent - License :: OSI Approved :: BSD License - Programming Language :: Python - Programming Language :: Python :: 3 - Topic :: Scientific/Engineering - -[options] -zip_safe = True -include_package_data = True -install_requires = - matplotlib >=3 - numpy >=1.21 -python_requires = >=3.6 -packages = find: - -[options.packages.find] -exclude = - contrib - docs - tests - -[options.extras_require] -advanced = - pandas - scipy - -[sdist] -formats = gztar - -[check-manifest] -ignore = - *.yaml - .coveragerc - docs - docs/* - notebooks - notebooks/* - tests - tests/* - paper - paper/* - *.pyc - .binder/ - .binder/* diff --git a/setup.py b/setup.py deleted file mode 100644 index 81beebd..0000000 --- a/setup.py +++ /dev/null @@ -1,12 +0,0 @@ -from setuptools import setup - -setup( - # The package metadata is specified in setup.cfg but GitHub's downstream dependency graph - # does not work unless we put the name this here too. - name="windrose", - use_scm_version={ - "write_to": "windrose/_version.py", - "write_to_template": '__version__ = "{version}"', - "tag_regex": r"^(?Pv)?(?P[^\+]+)(?P.*)?$", - }, -) From fd208ee43023d94a5d36fb07df647c83f415e6db Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 30 Jul 2024 11:47:18 +0200 Subject: [PATCH 5/7] remove .binder and .github from the sdist --- MANIFEST.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index e38342f..476e43b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,6 +10,8 @@ prune notebooks prune paper prune *.egg-info prune samples +prune .binder +prune .github exclude *.yml exclude .pre-commit-config.yaml From 8cc05786e8689ebe681d3d69827593719a0708e7 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 30 Jul 2024 11:47:35 +0200 Subject: [PATCH 6/7] put everything in pyprojct.toml --- pyproject.toml | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 94e54ee..202d454 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,59 @@ requires = [ "wheel", ] +[project] +name = "windrose" +description = "Python Matplotlib, Numpy library to manage wind data, draw windrose (also known as a polar rose plot)" +readme = "README.md" +license = { text = "BSD-3-Clause OR BCeCILL-B" } +maintainers = [ + { name = "Sebastien Celles" }, + { name = "Filipe Fernandes", email = "ocefpaf+windrose@gmail.com" }, +] +authors = [ + { name = "Lionel Roubeyrie", email = "s.celles@gmail.co" }, +] +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 = [ + "version", +] +dependencies = [ + "matplotlib>=3", + "numpy>=1.21", +] +optional-dependencies.extras = [ + "pandas", + "scipy", +] +urls.documentation = "https://python-windrose.github.io/windrose" +urls.homepage = "https://github.com/python-windrose/windrose" +urls.repository = "https://github.com/python-windrose/windrose" + +[tool.setuptools] +packages = [ "windrose" ] +include-package-data = true +license-files = [ + "LICENSE.txt", + "LICENCE_BSD-3-Clause.txt", + "LICENCE_CECILL-B.txt", +] +[tool.setuptools.dynamic] +dependencies = { file = [ "requirements.txt" ] } +readme = { file = "README.md", content-type = "text/markdown" } + +[tool.setuptools_scm] +write_to = "windrose/_version.py" +write_to_template = "__version__ = '{version}'" +tag_regex = "^(?Pv)?(?P[^\\+]+)(?P.*)?$" + [tool.ruff] target-version = "py38" line-length = 79 @@ -29,6 +82,23 @@ per-file-ignores."samples/example_pdf_by.py" = [ "T201", ] +[tool.check-manifest] +ignore = [ + "*.yaml", + ".coveragerc", + "docs", + "docs/*", + "notebooks", + "notebooks/*", + "tests", + "tests/*", + "paper", + "paper/*", + "*.pyc", + ".binder/", + ".binder/*", +] + [tool.interrogate] ignore-init-method = true ignore-init-module = false From 65a444770102304beb1b0647f683aa9feff5bc70 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 30 Jul 2024 11:47:51 +0200 Subject: [PATCH 7/7] avoid noqa --- windrose/__init__.py | 56 ++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/windrose/__init__.py b/windrose/__init__.py index 048f03b..cd14fe0 100644 --- a/windrose/__init__.py +++ b/windrose/__init__.py @@ -3,24 +3,44 @@ from matplotlib.projections import register_projection from .windrose import ( - D_KIND_PLOT, # noqa - DEFAULT_THETA_LABELS, # noqa - DPI_DEFAULT, # noqa - FIGSIZE_DEFAULT, # noqa - WindAxes, # noqa - WindAxesFactory, # noqa - WindroseAxes, # noqa - clean, # noqa - clean_df, # noqa - plot_windrose, # noqa - plot_windrose_df, # noqa - plot_windrose_np, # noqa - wrbar, # noqa - wrbox, # noqa - wrcontour, # noqa - wrcontourf, # noqa - wrpdf, # noqa - wrscatter, # noqa + D_KIND_PLOT, + DEFAULT_THETA_LABELS, + DPI_DEFAULT, + FIGSIZE_DEFAULT, + WindAxes, + WindAxesFactory, + WindroseAxes, + clean, + clean_df, + plot_windrose, + plot_windrose_df, + plot_windrose_np, + wrbar, + wrbox, + wrcontour, + wrcontourf, + wrpdf, + wrscatter, ) +__all__ = [ + "D_KIND_PLOT", + "DEFAULT_THETA_LABELS", + "DPI_DEFAULT", + "FIGSIZE_DEFAULT", + "WindAxes", + "WindAxesFactory", + "WindroseAxes", + "clean", + "clean_df", + "plot_windrose", + "plot_windrose_df", + "plot_windrose_np", + "wrbar", + "wrbox", + "wrcontour", + "wrcontourf", + "wrpdf", + "wrscatter", +] register_projection(WindroseAxes)