Skip to content
Open
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
51 changes: 39 additions & 12 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,54 @@ on:

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools
python -m pip install flake8 pytest
run: python -m pip install --upgrade pdm
- name: Add msbuild to PATH
if: ${{ runner.os == 'Windows' }}
uses: microsoft/setup-msbuild@v2
- name: Build package
run: |
python -m pip install . -v
run: pdm build -v
- name: Install
if: ${{ matrix.python-version == '3.12' }}
run: pdm install -G:all
- name: Test with pytest
run: |
pytest
if: ${{ matrix.python-version == '3.12' }}
run: pdm test
- name: Lint
if: ${{ matrix.python-version == '3.12' }}
run: pdm lint
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: build-py${{ matrix.python-version }}-${{ matrix.os }}
path: dist
retention-days: 5

combine_wheels:
runs-on: ubuntu-latest
needs: build

steps:
- name: Download wheels artifact
uses: actions/download-artifact@v4
with:
merge-multiple: 'true'
path: wheels
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: wheels
path: wheels
retention-days: 5
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ pip-delete-this-directory.txt

# Sphinx documentation
docs/_build/

# pdm
.pdm-python
46 changes: 0 additions & 46 deletions README.txt

This file was deleted.

324 changes: 324 additions & 0 deletions pdm.lock

Large diffs are not rendered by default.

30 changes: 20 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
[build-system]
requires = [
"setuptools>=65.5.0",
"wheel>=0.40",
"numpy>=2.0"
]
build-backend = "setuptools.build_meta"
requires = ["pdm-backend", "numpy>=2.0"]
build-backend = "pdm.backend"

[project]
name = "lttbc"
version = "0.3.0"
description = "Largest triangle three buckets module for Python written in C"
dynamic = ["readme"]
requires-python = ">=3.10"
authors = [
{ name = "European XFEL GmbH", email = "dennis.goeries@xfel.eu" }
{ name = "European XFEL GmbH", email = "dennis.goeries@xfel.eu" },
]
maintainers = [
{ name = "Dennis Goeries", email = "dennis.goeries@xfel.eu" },
Expand All @@ -35,8 +30,23 @@ classifiers = [
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Visualization",
]
readme = "README.md"

[project.urls]
"git" = "https://github.com/dgoeries/lttbc"

[tool.setuptools.dynamic]
readme = { file = ["README.md"], content-type = "text/markdown" }
[tool.pdm.dev-dependencies]
lint = [
"flake8",
]
test = ["pytest", "pytest-cov"]

[tool.pdm.scripts]
test = "pytest tests"
lint = "flake8 src/"

[tool.pdm]
distribution = true

[tool.pdm.build]
run-setuptools = true # run setup.py for the C Extension
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __str__(self):
return numpy.get_include()


lttbc_py = Extension("lttbc", sources=["lttbc.c"],
lttbc_py = Extension("lttbc", sources=["src/lttbc/lttbc.c"],
define_macros=[
("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
include_dirs=[numpy_get_include()],
Expand Down
File renamed without changes.
Empty file added tests/__init__.py
Empty file.
File renamed without changes.
13 changes: 0 additions & 13 deletions tox.ini

This file was deleted.