Skip to content
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
35 changes: 27 additions & 8 deletions .github/workflows/buildAndUploadPyPi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ jobs:
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ]
os: [ ubuntu-latest, windows-latest, macos-14 ]
# os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-14]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.3
uses: pypa/cibuildwheel@v3.0.0
env:
CIBW_PLATFORM: ${{ matrix.platform || 'auto' }}

- uses: actions/upload-artifact@v4
with:
Expand All @@ -33,9 +36,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build sdist
run: pipx run build --sdist
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy cython build
# - name: Compile cython code
# run: |
# python setup.py build_ext --inplace
# - name: Install avaframe
# run: |
# pip install .
- name: create source distribution
run: python -m build
# - name: Build sdist
# run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
Expand All @@ -48,7 +69,7 @@ jobs:
environment: pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
# if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
Expand All @@ -59,6 +80,4 @@ jobs:
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
# To test: repository-url: https://test.pypi.org/legacy/
- uses: pypa/gh-action-pypi-publish@release/v1
111 changes: 0 additions & 111 deletions .github/workflows/releaseWithManylinux.yml

This file was deleted.

22 changes: 1 addition & 21 deletions .github/workflows/runTestSinglePython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ on:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'avaframe/com4FlowPy/**'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'avaframe/com4FlowPy/**'
workflow_dispatch:

jobs:
Expand All @@ -36,34 +34,16 @@ jobs:
pip install flake8 pytest pytest-cov
pip install numpy cython
pip install setuptools
pip install pytest_mock
# This compilation is necessary to have the .c file for the next step
# Alternative is to include the .c file in the repo
pip install pytest-mock
- name: Compile cython code
run: |
python setup.py build_ext --inplace --define CYTHON_TRACE
- name: Install avaframe
run: |
pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -ra --cov --cov-report=xml --cov-report lcov:cov.info --cov-config=.coveragerc
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_ID }}
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# fail_ci_if_error: false
# name: codecov-umbrella
# verbose: true
- uses: qltysh/qlty-action/coverage@main
with:
coverage-token: ${{secrets.QLTY_COVERAGE_TOKEN}}
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include avaframe/RELEASE-VERSION
include avaframe/version.py
include avaframe/in3Utils/logging.conf
include avaframe/com1DFA/*.pyx
include avaframe/com1DFA/*.pxd
recursive-include avaframe *Cfg.ini
global-exclude local_*Cfg.ini
prune benchmarks
37 changes: 26 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[build-system]
# Cython dependency is optional, see setup.py for details.
# For the package (run-time) dependencies, see setup.cfg.
#requires = ["setuptools", "wheel", "numpy", "Cython"]
#build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
requires = ["setuptools", "numpy", "Cython", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "avaframe"
Expand Down Expand Up @@ -50,29 +48,46 @@ dependencies = [
"salib"
]

# Setuptools
[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
exclude = ["docs"]
namespaces = false

[tool.setuptools_scm]
version_scheme = "no-guess-dev"
local_scheme = "node-and-date"

# Cibuildwhell
[tool.cibuildwheel]
# Only build on CPython 3.12
#build = "cp312-*"
skip = ["*musllinux*","*-win32"]
build-verbosity = 1
before-build = "pip install cython numpy"

#Flake8
[tool.flake8]
max-line-length = 109
select = ['B950']
extend-ignore = ['E203', 'E501']

#Black
[tool.black]
line-length = 109

[tool.hatch.version]
source = "vcs"

[tool.hatch.version.raw-options]
version_scheme = "no-guess-dev"
local_scheme = "node-and-date"

# PIXI setup
[tool.pixi.workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "win-64", "osx-64"]

[tool.pixi.dependencies]
pytest = "*"
pytest-mock ="*"
setuptools = "*"
setuptools-scm = "*"

# Feature dev
[tool.pixi.feature.dev.pypi-dependencies]
Expand Down
Loading
Loading