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

Fix artifact creation, modernise tooling #51

Merged
merged 47 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
64c0672
Attempt to fix artifact creation
tpgillam Aug 6, 2024
28e7702
Even more unique
tpgillam Aug 6, 2024
94ad1a4
Merge branch 'master' into tg/fix_artifact
tpgillam Aug 6, 2024
3b82440
Try to test built wheels
tpgillam Aug 6, 2024
46cbe21
Try again
tpgillam Aug 6, 2024
d2e2c35
Try again
tpgillam Aug 6, 2024
458e20f
Pass location of tox.ini
tpgillam Aug 6, 2024
ead2963
Minimise test requirements
tpgillam Aug 6, 2024
bb72bed
Different way of getting test requirements
tpgillam Aug 6, 2024
4903d7c
Fix typo
tpgillam Aug 6, 2024
b508cd8
Switch to uv
tpgillam Aug 6, 2024
39774f8
Explicitly install uv too
tpgillam Aug 6, 2024
0e08656
Don't install pip
tpgillam Aug 6, 2024
6d28ec9
Consolidate configuration into pyproject.toml
tpgillam Aug 6, 2024
ac59ee6
Don't need an issue template
tpgillam Aug 6, 2024
d6290fc
Consolidate AUTHORS and README
tpgillam Aug 6, 2024
d5952b3
Ignore uv.lock
tpgillam Aug 6, 2024
74c95f5
Remove editorconfig and flake8, which wasn't being run
tpgillam Aug 6, 2024
c75666d
Simplify post-wheel-build tes
tpgillam Aug 6, 2024
4594151
Sane tracebacks
tpgillam Aug 6, 2024
f6d804e
Cleaner Makefile
tpgillam Aug 6, 2024
7edf147
Try to include C code
tpgillam Aug 6, 2024
9196ce4
Maybe fix?
tpgillam Aug 6, 2024
675269d
Loosen check for MacOS
tpgillam Aug 6, 2024
9521d73
Verbose mode
tpgillam Aug 6, 2024
69b3ec7
Cleaner for `upload_pypi` to depend on the `pass` job
tpgillam Aug 6, 2024
e9bf05b
Try to work around issue
tpgillam Aug 6, 2024
722b789
cleaner
tpgillam Aug 8, 2024
9116a42
CONTRIBUTING.rst is too stale
tpgillam Aug 8, 2024
882231e
Add test extra to dev dependencies
tpgillam Aug 8, 2024
1b217f3
Don't use tox
tpgillam Aug 8, 2024
0780eec
Add to history
tpgillam Aug 8, 2024
05d6789
`make test` will also sync
tpgillam Aug 8, 2024
e00ca55
Shouldn't need this extra now
tpgillam Aug 8, 2024
ad83b18
We don't format with black
tpgillam Aug 8, 2024
829cee6
Restore version info to _mt2 module
tpgillam Aug 8, 2024
7b81940
Switch to unittest
tpgillam Aug 8, 2024
2330e7a
Clean up gitignore
tpgillam Aug 8, 2024
539bdc4
unittest
tpgillam Aug 8, 2024
22badaa
See if we can get away without the setuppython step
tpgillam Aug 8, 2024
3b95967
Keep $PATH between steps
tpgillam Aug 8, 2024
f8b3af8
Typo
tpgillam Aug 8, 2024
9a5a872
Try again
tpgillam Aug 8, 2024
56b6d7a
Try to fix windows build
tpgillam Aug 8, 2024
1ccad0c
Try again
tpgillam Aug 8, 2024
37ff0d3
Don't need an author here
tpgillam Aug 8, 2024
d4586fe
Add pyversions shield
tpgillam Aug 8, 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
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Build

on: [push, pull_request]
on:
pull_request:
push:
branches: [main]
tags: ["*"]
tpgillam marked this conversation as resolved.
Show resolved Hide resolved


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -30,7 +35,7 @@ jobs:
run: tox -e oldestnpy

build_wheels:
name: Build wheel for ${{ matrix.os }}-cp${{ matrix.python }}-${{ matrix.arch }}
name: Build wheel for ${{ matrix.os }}-${{ matrix.build }}${{ matrix.python }}-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
# Ensure that a wheel builder finishes even if another fails
Expand Down Expand Up @@ -59,10 +64,14 @@ jobs:
env:
CIBW_BUILD: "${{ matrix.build }}${{ matrix.python }}*"
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_TEST_REQUIREMENTS: "-r requirements_dev.txt tox-gh-actions"
CIBW_TEST_COMMAND: >
tox --conf {project}/tox.ini -e latestnpy &&
tox --conf {project}/tox.ini -e oldestnpy

- uses: actions/upload-artifact@v4
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
with:
name: "artifact-${{ matrix.os }}-${{ matrix.build }}-${{ matrix.python }}-${{ matrix.arch }}"
path: ./wheelhouse/*.whl

build_sdist:
Expand All @@ -83,8 +92,8 @@ jobs:
run: python setup.py sdist

- uses: actions/upload-artifact@v4
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
tpgillam marked this conversation as resolved.
Show resolved Hide resolved
with:
name: artifact-source
path: dist/*.tar.gz

pass:
Expand All @@ -103,8 +112,8 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
8 changes: 0 additions & 8 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
pip
numpy>=1.19.3
bump2version
wheel
watchdog
flake8
tox
coverage
twine

pytest
pytest-runner
9 changes: 1 addition & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@
),
]

setup_requirements = [
"pytest-runner",
]
test_requirements = [
"pytest>=3",
]

setup(
author="Thomas Gillam",
Expand All @@ -59,9 +53,8 @@
keywords="mt2",
name="mt2",
packages=["mt2"],
setup_requires=setup_requirements,
test_suite="tests",
tests_require=test_requirements,
tests_require=["pytest>=3"],
url="https://github.com/tpgillam/mt2",
version=__version__,
ext_modules=ext_modules,
Expand Down
Loading