Skip to content

Commit

Permalink
Merge pull request #383 from psd-tools/update-ci-configuration
Browse files Browse the repository at this point in the history
Migrate build tools to pyproject.toml
  • Loading branch information
kyamagu committed Jan 4, 2024
2 parents 8b8dc68 + 37caaf6 commit 2230f5a
Show file tree
Hide file tree
Showing 90 changed files with 6,366 additions and 5,514 deletions.
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

57 changes: 24 additions & 33 deletions .github/workflows/ci.yml
Expand Up @@ -9,25 +9,6 @@ on:
types: [published]

jobs:
lint:
name: Run linting
runs-on: ubuntu-latest
if: github.event_name != 'release'
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'

- name: Lint with flake8
run: |
pip install --upgrade pip
pip install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
Expand All @@ -37,13 +18,17 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'
python-version: "3.x"

- name: Install build dependencies
run: python -m pip install build setuptools

- name: Build sdist
run: python setup.py sdist
run: python -m build --sdist

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz

build_wheels:
Expand All @@ -52,28 +37,34 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build: [cp37-*, cp38-*, cp39-*, cp310-*, cp311-*]
build: [cp38, cp39, cp310, cp311, cp312]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v3

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Build wheels
uses: pypa/cibuildwheel@v2.13.1
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_BUILD: ${{ matrix.build }}-*
CIBW_ARCHS_LINUX: auto aarch64
CIBW_ARCHS_MACOS: x86_64 universal2
CIBW_BEFORE_BUILD: pip install cython
CIBW_TEST_REQUIRES: pytest numpy ipython
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_TEST_COMMAND: pytest {project}/tests
CIBW_TEST_SKIP: "*arm64 *aarch64 *musllinux* *i686 *win32"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.os }}-${{ matrix.build }}
path: ./wheelhouse/*.whl

publish:
Expand All @@ -82,9 +73,9 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
merge-multiple: true
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
186 changes: 169 additions & 17 deletions .gitignore
@@ -1,21 +1,173 @@
.tox
build
*.pyc
### Generated by gibo (https://github.com/simonwhitaker/gibo)
### https://raw.github.com/github/gitignore/b2ccc4644b997fa2e86da5ae37f3b053c39f3d7b/Python.gitignore

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so
*.c

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
*.DS_Store
psd_tools*.egg-info
*~
\#*
\.\#*
*.html
dist
.cache
.coverage

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.python-version
*.ipynb
.ipynb_checkpoint/
.pytest_cache
tmp/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/


### https://raw.github.com/github/gitignore/b2ccc4644b997fa2e86da5ae37f3b053c39f3d7b/Global/macOS.gitignore

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Expand Up @@ -4,12 +4,12 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.12"

sphinx:
configuration: docs/conf.py
configuration: docs/conf.py

python:
install:
Expand Down
10 changes: 10 additions & 0 deletions CHANGES.rst
@@ -1,3 +1,13 @@
1.9.29 (2024-01-04)
-------------------

- [ci] Update CI configuration (#383)
- [dev] Migrate the builder to pyproject.toml
- [dev] Update linter and formatter to pysen
- [dev] Deprecate tox
- [psd] Add new color sheet (#380)
- [psd] Fix transparency check (#370)

1.9.28 (2023-07-04)
-------------------

Expand Down
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

0 comments on commit 2230f5a

Please sign in to comment.