Skip to content

Commit

Permalink
Replace cyfunc with native cython ufuncs. (#28)
Browse files Browse the repository at this point in the history
* Add workflow dispatch trigger.

* Update actions and Python version.

* Add `.readthedocs.yaml` config and `index.rst` symlink.

* Fix Python version identifier.

* Preinstall cython and cyfunc.

* Remove compiled cython for `clean` target.

* Update requirements and replace cyfunc with `cython.ufunc`.

* Update cython installation.

* Add pyproject.toml for build dependencies.

* Remove Cython pre-install step.
  • Loading branch information
tillahoffmann authored Mar 22, 2024
1 parent 6f6e2d8 commit ee7c652
Show file tree
Hide file tree
Showing 10 changed files with 256 additions and 274 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:
Expand All @@ -13,11 +14,11 @@ jobs:
command: [make build, make inference_test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8.x
python-version: "3.10"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build docs, lint, and test
Expand Down
9 changes: 9 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.10"
python:
install:
- requirements: requirements.txt
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ docs : doctests

clean :
rm -rf docs/_build PolyChordLite
rm -f shedding/*.so shedding/*.c

clean-results:
rm -rf workspace figures results.html
Expand Down
1 change: 0 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def setup(app):
project = 'shedding'
copyright = '2020, Till Hoffmann'
author = 'Till Hoffmann'
master_doc = 'README'


# -- General configuration ---------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions index.rst
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
requires = ["setuptools", "wheel", "Cython", "numpy", "scipy"]

[project]
name = 'shedding'
version = '0.1'
authors = [{ name = 'Till Hoffmann' }]
dependencies = ['numpy', 'scipy']

[tool.setuptools]
packages = ['shedding']
11 changes: 10 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
-e file:.[tests,docs]
-e file:.
cython
flake8
jinja2
jsonschema
jupyter
linuxdoc @ git+http://github.com/return42/linuxdoc.git
localscope
matplotlib
pandas
pytest
pytest-cov
sphinx
tqdm
Loading

0 comments on commit ee7c652

Please sign in to comment.