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

pyproject + ruff + mesonpy #77

Merged
merged 9 commits into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.github/ export-ignore
.gitignore export-ignore
.gitattributes export-ignore
.gitlab-ci.yml export-ignore
37 changes: 20 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ on:
- cron: '17 3 * * 0'

jobs:
flake8:
name: Flake8
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
-
uses: actions/setup-python@v5
with:
# matches compat target in setup.py
python-version: '3.8'
- name: "Main Script"
run: |
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-flake8.sh
. ./prepare-and-run-flake8.sh "$(basename $GITHUB_REPOSITORY)" ./test
pipx install ruff
ruff check

typos:
name: Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master

pytest-macos:
name: Pytest on macOS
Expand All @@ -34,12 +36,9 @@ jobs:
python-version: '3.x'
- name: "Main Script"
run: |
EXTRA_INSTALL="numpy pybind11"

# https://numpy.org/doc/stable/user/building.html#accelerated-blas-lapack-libraries
# e.g. https://github.com/inducer/pymetis/runs/1303882565?check_suite_focus=true
export NPY_BLAS_ORDER=""
export NPY_LAPACK_ORDER=""
export CC=gcc
PROJECT_INSTALL_FLAGS="--no-build-isolation"
EXTRA_INSTALL="numpy pybind11 meson-python ninja"

curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
. ./build-and-test-py-project.sh
Expand All @@ -58,7 +57,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: "Main Script"
run: |
EXTRA_INSTALL="numpy pybind11"
PROJECT_INSTALL_FLAGS="--no-build-isolation"
EXTRA_INSTALL="numpy pybind11 meson-python ninja"

curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
. ./build-and-test-py-project.sh

Expand All @@ -74,7 +75,9 @@ jobs:
python-version: '3.x'
- name: "Main Script"
run: |
EXTRA_INSTALL="numpy pybind11"
PROJECT_INSTALL_FLAGS="--no-build-isolation"
EXTRA_INSTALL="numpy pybind11 meson-python ninja"

curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/ci-support.sh
. ci-support.sh
build_py_project_in_venv
Expand Down
31 changes: 17 additions & 14 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
Flake8:
script:
- curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/prepare-and-run-flake8.sh
- . ./prepare-and-run-flake8.sh "$CI_PROJECT_NAME" test
Ruff:
script: |
pipx install ruff
ruff check
tags:
- python3
- docker-runner
except:
- tags

Python 3:
script:
- py_version=3
- EXTRA_INSTALL="numpy pybind11"
- curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
- ". ./build-and-test-py-project.sh"
script: |
py_version=3
PROJECT_INSTALL_FLAGS="--no-build-isolation"
EXTRA_INSTALL="numpy pybind11 meson-python ninja"

curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-and-test-py-project.sh
. ./build-and-test-py-project.sh
tags:
- python3
- linux
Expand All @@ -23,9 +25,10 @@ Python 3:
junit: test/pytest.xml

Documentation:
script:
- EXTRA_INSTALL="numpy pybind11"
- curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-docs.sh
- ". ./build-docs.sh"
script: |
PROJECT_INSTALL_FLAGS="--no-build-isolation"
EXTRA_INSTALL="numpy pybind11 meson-python ninja"
curl -L -O https://gitlab.tiker.net/inducer/ci-support/raw/main/build-docs.sh
. ./build-docs.sh
tags:
- python3
17 changes: 0 additions & 17 deletions MANIFEST.in

This file was deleted.

17 changes: 0 additions & 17 deletions Makefile.in

This file was deleted.

34 changes: 0 additions & 34 deletions README_SETUP.txt

This file was deleted.

Loading