Skip to content

Commit

Permalink
chore: pyproject.toml & CI updates (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasdavis authored Dec 29, 2024
1 parent f7d236e commit 07ef3c9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ${{matrix.platform}}
steps:
- name: Checkout
Expand Down
25 changes: 2 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3
args:
- --target-version=py38
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
rev: v0.8.4
hooks:
- id: ruff
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
language_version: python3
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args:
- --py38-plus
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- id: ruff-format
5 changes: 3 additions & 2 deletions docs/dh_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"outputs": [],
"source": [
"# dask_histogram --> boost-histogram fillable with dask collections.\n",
"import dask_histogram as dh\n",
"import boost_histogram as bh\n",
"import dask.array as da\n",
"import boost_histogram as bh"
"\n",
"import dask_histogram as dh"
]
},
{
Expand Down
35 changes: 3 additions & 32 deletions docs/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,6 @@ Push the tag to GitHub (assuming ``origin`` points to the
Making the release
------------------

To make a release of ``dask-histogram`` we just need the ``build`` and
``twine`` packages:

.. code-block::
$ pip install build twine
The build-system that we use (``hatch`` with ``hatch-vcs``) will
automatically set a version based on the latest tag in the repository;
after making the tag we just need to generate the source distribution
and wheel, this is handled by the ``build`` package:

.. code-block::
$ python -m build
Now a new ``dist/`` directory will appear, which contains the files
(continuing to use our example version ``2023.3.1``):

.. code-block::
dask_histogram-2023.3.1.tar.gz
dask_histogram-2023.3.1-py3-none-any.whl
Now we just upload these files to PyPI with ``twine``:

.. code-block::
$ twine upload dist/dask_histogram-2023.3.1*
The GitHub ``regro-cf-autotick-bot`` account will automatically create
a pull request to release a new version on ``conda-forge``.
After pushing the tag, GitHub actions will take care of uploading the
wheel and sdist to PyPI. Please go to the Releases page on the GitHub
repository and Draft a new release associated with the tag.
27 changes: 9 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "dask-histogram"
description = "Histogramming with Dask."
readme = "README.md"
license = {text = "BSD-3-Clause"}
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [
{ name = "Doug Davis", email = "[email protected]" },
]
Expand All @@ -16,11 +16,11 @@ classifiers = [
"License :: OSI Approved :: BSD License",
"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",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
Expand All @@ -34,17 +34,7 @@ dynamic = ["version"]

[project.optional-dependencies]
complete = [
"dask-sphinx-theme >=3.0.2",
"dask[array,dataframe]",
"dask-awkward >=2023.10.0",
"hist",
"pytest",
"sphinx >=4.0.0",
"sphinxcontrib-applehelp>=1.0.0,<1.0.7",
"sphinxcontrib-devhelp>=1.0.0,<1.0.6",
"sphinxcontrib-htmlhelp>=2.0.0,<2.0.5",
"sphinxcontrib-serializinghtml>=1.1.0,<1.1.10",
"sphinxcontrib-qthelp>=1.0.0,<1.0.7",
"dask-histogram[docs,test]"
]
docs = [
"dask-sphinx-theme >=3.0.2",
Expand Down Expand Up @@ -93,11 +83,6 @@ include = ["/src"]
addopts = "-v"
testpaths = ["tests"]

[tool.isort]
profile = "black"
line_length = 88
src_paths = ["src", "tests"]

[tool.mypy]
python_version = "3.9"
files = ["src", "tests"]
Expand All @@ -119,5 +104,11 @@ ignore_missing_imports = true
ignore = "D105"

[tool.ruff]
target-version = "py38"
line-length = 88
src = ["src", "tests"]

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I"]
ignore = ["E501"]
per-file-ignores = {"__init__.py" = ["E402", "F401"]}

0 comments on commit 07ef3c9

Please sign in to comment.