-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from alexfikl/update-build-system
Use pyproject.toml and Github Actions
- Loading branch information
Showing
7 changed files
with
222 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ 'master' ] | ||
pull_request: | ||
branches: [ 'master' ] | ||
schedule: | ||
# at 12:00 (UTC) on the first day of the month | ||
- cron: '0 12 1 * *' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: Unittest (${{ matrix.os }}-${{ matrix.compiler }}-py${{ matrix.python-version }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
compiler: [gcc, clang] | ||
python-version: ['3.10', '3.11', '3.x'] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install System Dependencies | ||
if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang' | ||
run: | | ||
sudo apt-get install libomp5 libomp-dev | ||
- name: Install Python Dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools setuptools-scm wheel | ||
python -m pip install --upgrade numpy scipy jitcxde_common chspy sympy | ||
- name: Run Tests | ||
env: | ||
CC: ${{ matrix.compiler }} | ||
run: | | ||
python -m pip install --verbose --no-build-isolation --editable . | ||
python -m unittest discover -b -f -v tests | ||
python tests/compare_C_and_Python_core.py 30 | ||
python tests/compare_C_and_Python_core_2.py 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
*~ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
version.py | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
tests/*_new.dat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = [ | ||
"setuptools>=64", | ||
"setuptools-scm>=7", | ||
] | ||
|
||
[project] | ||
name = "jitcdde" | ||
dynamic = ["version"] | ||
description = "Just-in-Time Compilation for Delay Differential Equations" | ||
readme = "README.rst" | ||
license = { text = "BSD-3-Clause" } | ||
authors = [ | ||
{ name = "Gerrit Ansmann", email = "gansmann@uni-bonn.de" }, | ||
] | ||
requires-python = ">=3.10" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: POSIX", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: Microsoft :: Windows", | ||
"Programming Language :: Python", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
] | ||
dependencies = [ | ||
"jitcxde_common>=1.3", | ||
"chspy>=1.1", | ||
"numpy", | ||
"symengine>=0.3.1.dev0", | ||
] | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
# NOTE: required for expr.simplify (symengine calls sympy for that) | ||
# https://github.com/symengine/symengine.py/issues/405 | ||
"sympy", | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://jitcdde.readthedocs.io" | ||
Homepage = "http://github.com/neurophysik/jitcdde" | ||
|
||
[tool.setuptools.packages.find] | ||
include = [ | ||
"jitcdde*", | ||
] | ||
|
||
[tool.setuptools.package-data] | ||
jitcdde = [ | ||
"jitced_template.c", | ||
] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "jitcdde/version.py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters