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
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,17 @@ on:
types: [created]

jobs:
deploy:

pypi:
name: Publish sdist to Pypi
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: '3.11'
- run: uv build --sdist
# Check that basic features work and we didn't miss to include crucial files
- name: import test (sdist)
run: uv run --isolated --no-project -p 3.11 --with dist/*.tar.gz bsplines2d/tests/prepublish.py
- name: publish
run: uv publish -t ${{ secrets.PYPI_API_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/python-publish-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package wheels

on:
push:
tags:
- '*'
branches:
- main
release:
types: [created]

jobs:
pypi:
name: Publish wheel to Pypi
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- run: uv build --wheel
# Check that basic features work and we didn't miss to include crucial files
- name: import test (wheel)
run: uv run --isolated --no-project -p ${{ matrix.python-version }} --with dist/*.whl bsplines2d/tests/prepublish.py
- name: publish
run: uv publish -t ${{ secrets.PYPI_API_TOKEN }}
51 changes: 0 additions & 51 deletions .github/workflows/python-testing-branch.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/python-testing-matrix-devel.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/python-testing-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Testing matrix

on:
push:
branches: [ devel ]
pull_request:
branches: [ devel ]

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:

# git checkout
- uses: actions/checkout@v4

# Install uv
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}

# Install library
- name: Install the project
run: uv sync --all-extras --dev

# Run tests
- name: Run tests
# For example, using `pytest`
run: uv run pytest bsplines2d/tests
10 changes: 10 additions & 0 deletions CLASSIFIERS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Natural Language :: English
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

7 changes: 0 additions & 7 deletions MANIFEST.in

This file was deleted.

32 changes: 0 additions & 32 deletions _updateversion.py

This file was deleted.

3 changes: 3 additions & 0 deletions bsplines2d/tests/prepublish.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
print('test import datastock')
import datastock as ds
print('import datastock ok')
77 changes: 40 additions & 37 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,58 +1,61 @@
[build-system]
requires = ["setuptools", "setuptools_scm"]
build-backend = "setuptools.build_meta"


#[tool.setuptools.packages.find]
#where = ["datastock"]
#include = ["datastock*"]
#namespaces = false

[tool.setuptools]
packages = ["bsplines2d", "bsplines2d.tests", "bsplines2d.tests.test_data"]


[tool.setuptools_scm]
version_file = "bsplines2d/_version.py"

[tool.setuptools.package-data]
mypkg = ["*.txt", "*.npz"]


[tool.setuptools.dynamic]
classifiers = {file = ["CLASSIFIERS.txt"]}


[project]
name = "bsplines2d"
license = {file = "LICENSE"}
dynamic = ["version"]
description = "Generic handler for multiple bsplines basis"
readme = "README.md"
requires-python = ">=3.6"
license = {text = "MIT"}
dynamic = ["version", "classifiers"]
description = "Generic handler for 1d and 1d bsplines meshes, uses datastock"
authors = [
{name = "Didier VEZINET", email = "[email protected]"},
{name = "Didier VEZINET", email = "[email protected]"},
]
maintainers = [
{name = "Didier VEZINET", email = "[email protected]"},
{name = "Didier VEZINET", email = "[email protected]"},
]
keywords = ["data", "analysis", "interactive", "2d meshing", "Collection"]
classifiers = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 5 - Production/Stable",

# Indicate who your project is intended for
"Intended Audience :: Science/Research",

# Specify the Python versions you support here.
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
keywords = [
"data", "analysis", "interactive", "bsplines", "Collection", "mesh",
]
requires-python = ">=3.8"
dependencies = [
"numpy",
"scipy",
"matplotlib",
"astropy",
"contourpy",
"datastock>=0.0.49",
"contourpy",
'datastock>=0.0.54',
]


[build-system]
requires = [
"setuptools>=40.8.0, <64",
"wheel",
"numpy",
]
[project.urls]
Homepage = "https://github.com/ToFuProject/bsplines2d"
Issues = "https://github.com/ToFuProject/bsplines2d/issues"


[dependency-groups]
dev = [
"pytest",
]


[project.optional-dependencies]
linting = [
'ruff'
Expand Down
Loading
Loading