Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to pyproject.toml package setup #306

Merged
merged 32 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d79f8a4
Switch to pyproject.toml package setup
GenevieveBuckley Mar 29, 2023
39c9e19
Add keywords to pyproject.toml
GenevieveBuckley Mar 30, 2023
47482f6
Add flake8 exclude paths
GenevieveBuckley Mar 30, 2023
b43d1f9
Update dependencies to match new minimum versions
GenevieveBuckley Aug 2, 2023
0cebc85
Fix setuptools_scm problem displaying version number in conda list
GenevieveBuckley Aug 2, 2023
73b4f3e
Minimum version constraint for optional cupy dependency
GenevieveBuckley Aug 2, 2023
bccbff7
Link to contributors page on github
GenevieveBuckley Aug 2, 2023
c0f4a6d
Fix typo, readme file is RST format
GenevieveBuckley Aug 2, 2023
7a5aea9
Merge main branch
GenevieveBuckley Aug 2, 2023
62572bd
Update pyproject.toml
GenevieveBuckley Aug 2, 2023
1f7a356
Update pyproject.toml
GenevieveBuckley Aug 4, 2023
7ed8408
Update pyproject.toml
GenevieveBuckley Aug 4, 2023
4bbfec7
Update pyproject.toml
GenevieveBuckley Aug 4, 2023
b242050
Update pyproject.toml
GenevieveBuckley Aug 4, 2023
6c558d6
Update pyproject.toml
GenevieveBuckley Aug 8, 2023
7fd9052
Update pyproject.toml
GenevieveBuckley Aug 8, 2023
9e76bf5
Merge branch 'main' into pyproject-toml
m-albert Mar 19, 2024
8478b98
Merge main branch
GenevieveBuckley May 15, 2024
9b48223
Use 'python -m build', instead of 'python setup.py sdist bdist_wheel'
GenevieveBuckley May 15, 2024
53540c1
Add python3.12 classifier for PyPI
GenevieveBuckley May 15, 2024
6871271
Merge main, remove wheel dependency in favour of build
GenevieveBuckley May 15, 2024
596b79f
Replace versioneer with setuptools-scm (simpler to maintain, better l…
GenevieveBuckley May 15, 2024
2987471
Install python build tool with pip, conda-forge versions are out-of-date
GenevieveBuckley May 15, 2024
2a9e4ea
Add pytest-timeout dependency to environment files (otherwise pytest …
GenevieveBuckley May 15, 2024
62f8701
Update contributing guide, drop setup.py and use pip install instead
GenevieveBuckley May 15, 2024
125b182
Try to fix readthedocs getting the dask-image version string
GenevieveBuckley May 15, 2024
ee6a767
Update installation guide to use pip, not setup.py
GenevieveBuckley May 15, 2024
0d2e8cc
Update dependency versions in pyproject.toml
GenevieveBuckley May 15, 2024
c4e5f72
Install dask-image with pip, not setup.py, for GPU CI tests
GenevieveBuckley May 15, 2024
5f8e580
Update some parts of the Makefule for GPU CI tests (removing setup.py)
GenevieveBuckley May 15, 2024
9c6b8d4
ReadTheDocs must install dask_image package
GenevieveBuckley May 15, 2024
49d9c33
Add twine to dependencies, update Makefile away from setup.py
GenevieveBuckley May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ omit =
*/eggs/*
*/.eggs/*
*tests/*
*/versioneer.py
*/_version.py
*/_vendor/*
*/dispatch/*
4 changes: 2 additions & 2 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# setuptools-scm dynamically generated version
dask_image/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ Ready to contribute? Here's how to set up `dask-image` for local development.
2. Clone your fork locally::

$ git clone [email protected]:your_name_here/dask-image.git
$ cd dask-image

3. Install your local copy into an environment. Assuming you have conda installed, this is how you set up your fork for local development (on Windows drop `source`). Replace `"<some version>"` with the Python version used for testing.::

$ conda create -n dask-image-env python="<some version>"
$ source activate dask-image-env
$ python setup.py develop
$ python -m pip install -e .

4. Create a branch for local development::

Expand All @@ -100,7 +101,7 @@ Ready to contribute? Here's how to set up `dask-image` for local development.
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions::

$ flake8 dask_image tests
$ python setup.py test or py.test
$ pytest

To get flake8, just conda install it into your environment.

Expand Down Expand Up @@ -164,7 +165,7 @@ Finally, install the development version of dask-image::

.. code-block:: console

$ pip install -e .
$ pip install -e ".[test]""

For local testing, please run ``pytest`` in the test environment::

Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ recursive-exclude * *.py[co]

recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif

include versioneer.py
include dask_image/_version.py
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ lint: ## check style with flake8
flake8 dask_image tests

test: ## run tests quickly with the default Python
python setup.py test
python -m pip install ".[test]"
pytest

test-all: ## run tests on every Python version with tox
tox

coverage: ## check code coverage quickly with the default Python
coverage run --source dask_image setup.py test
coverage run -m pytest
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
Expand All @@ -71,13 +72,13 @@ docs: ## generate Sphinx HTML documentation, including API docs
$(BROWSER) docs/_build/html/index.html

release: clean ## package and upload a release
python setup.py sdist upload
python setup.py bdist_wheel upload
python -m build
ls -l dist
twine upload dist/*

dist: clean ## builds source and wheel package
python setup.py sdist
python setup.py bdist_wheel
python -m build
ls -l dist

install: clean ## install the package to the active Python's site-packages
python setup.py install
python -m pip install .
5 changes: 4 additions & 1 deletion continuous_integration/environment-3.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ channels:
dependencies:
- python=3.10.*
- pip==23.0.1
- wheel==0.38.4
- coverage==7.2.1
- flake8==6.0.0
- pytest==7.2.2
- pytest-cov==4.0.0
- pytest-flake8==1.1.1
- pytest-timeout >=2.3.1
- dask==2024.4.1
- numpy==1.24.2
- scipy==1.10.1
- scikit-image==0.19.3
- pims==0.6.1
- slicerator==1.1.0
- pandas==2.0.0
- twine==5.0.0
- pip:
- build==1.2.1
5 changes: 4 additions & 1 deletion continuous_integration/environment-3.11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ channels:
dependencies:
- python=3.11.*
- pip==23.0.1
- wheel==0.38.4
- coverage==7.2.1
- flake8==6.0.0
- pytest==7.2.2
- pytest-cov==4.0.0
- pytest-flake8==1.1.1
- pytest-timeout >=2.3.1
- dask==2024.4.1
- numpy==1.24.2
- scipy==1.10.1
- scikit-image==0.19.3
- pims==0.6.1
- slicerator==1.1.0
- pandas==2.0.0
- twine==5.0.0
- pip:
- build==1.2.1
5 changes: 4 additions & 1 deletion continuous_integration/environment-3.12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ channels:
dependencies:
- python=3.12.*
- pip==24.0
- wheel==0.43.0
- coverage==7.5.1
- flake8==7.0.0
- pytest==8.2.0
- pytest-cov==5.0.0
- pytest-flake8==1.1.1
- pytest-timeout >=2.3.1
- dask==2024.4.1
- numpy==1.26.4
- scipy==1.13.0
- scikit-image==0.22.0
- pims==0.6.1
- slicerator==1.1.0
- pandas==2.2.2
- twine==5.0.0
- pip:
- build==1.2.1
5 changes: 4 additions & 1 deletion continuous_integration/environment-3.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ channels:
dependencies:
- python=3.9.*
- pip==24.0
- wheel==0.43.0
- coverage==7.5.1
- flake8==7.0.0
- pytest==8.2.0
- pytest-cov==5.0.0
- pytest-flake8==1.1.1
- pytest-timeout >=2.3.1
- dask==2024.4.1
- numpy==1.26.4
- scipy==1.13.0
- scikit-image==0.22.0
- pims==0.6.1
- slicerator==1.1.0
- pandas==2.2.2
- twine==5.0.0
- pip:
- build==1.2.1
3 changes: 2 additions & 1 deletion continuous_integration/environment-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ channels:
dependencies:
- python=3.9.*
- pip==22.3
- wheel==0.37.1
- jinja2<3.1
- dask==2024.4.1
- numpy==1.23.4
Expand All @@ -16,6 +15,8 @@ dependencies:
- slicerator==1.1.0
- pandas==2.0.0
- pip:
- build==1.2.1
- .. # install dask_image from this repository source
# FIXME: This workaround is required until we have sphinx>=5, as enabled by
# dask-sphinx-theme no longer pinning sphinx-book-theme==0.2.0. This is
# tracked in https://github.com/dask/dask-sphinx-theme/issues/68.
Expand Down
2 changes: 1 addition & 1 deletion continuous_integration/gpuci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rapids-logger "Install cupy"
python -m pip install cupy-cuda112 -f https://pip.cupy.dev/pre

rapids-logger "Install dask-image"
python setup.py install
python -m pip install .

rapids-logger "Check Python versions"
python --version
Expand Down
8 changes: 0 additions & 8 deletions dask_image/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
# -*- coding: utf-8 -*-
from ._version import get_versions

__version__ = get_versions()['version']
del get_versions

from . import _version
__version__ = _version.get_versions()['version']
Loading