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
41 changes: 0 additions & 41 deletions .conda/bld.bat

This file was deleted.

2 changes: 1 addition & 1 deletion .conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
make

# Build cython wrapper
$PYTHON setup.py daspk install
make install

15 changes: 7 additions & 8 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
# For conda build
package:
name: pydas
version: '1.0.3'
version: '1.0.4'

source:
path: ../

build:
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
string: py{{ CONDA_PY }}h{{ PKG_HASH }}npy{{ NPY_VER }}_{{ PKG_BUILDNUM }}

requirements:
build:
- {{ compiler('c') }} # [unix]
- {{ compiler('fortran') }} # [unix]
- {{ compiler('c') }}
- {{ compiler('fortran') }}
host:
- python 3.7
- python
- cython
- numpy
- setuptools
run:
- python 3.7
- python
- {{ pin_compatible('numpy') }}

test:
source_files:
- tests
requires:
- nose
- matplotlib
imports:
- pydas
- pydas.dassl
- pydas.daspk
commands:
- nosetests -P --all-modules -v -w tests
- python -m unittest -v tests/daspkTest.py tests/dasslTest.py

about:
home: http://github.com/ReactionMechanismGenerator/PyDAS
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build Package

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
workflow_dispatch:
push:
branches:
- stable
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-latest]
numpy-version: ["1.21", "1.22", "1.23", "1.24", "1.25", "1.26", "2.0"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- numpy-version: "1.21"
python-version: "3.10"
- numpy-version: "1.21"
python-version: "3.11"
- numpy-version: "1.22"
python-version: "3.11"
- numpy-version: "1.21"
python-version: "3.12"
- numpy-version: "1.22"
python-version: "3.12"
- numpy-version: "1.23"
python-version: "3.12"
- numpy-version: "1.24"
python-version: "3.12"
- numpy-version: "1.25"
python-version: "3.12"
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.os }} Python ${{ matrix.python-version }} Numpy ${{ matrix.numpy-version }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: false
conda-solver: libmamba
auto-activate-base: true
activate-environment: ""
- name: Install Build Tools
run: conda install python anaconda-client conda-build
- name: Configure Auto-Upload
if: github.ref == 'refs/heads/stable'
run: |
conda config --set anaconda_upload yes
- name: Build Binary
run: |
# set a default value to the conda_token if needed (like from forks)
: "${CONDA_TOKEN:=${{ secrets.ANACONDA_TOKEN }}}"
: "${CONDA_TOKEN:=default_value}"
echo "CONDA_TOKEN=$CONDA_TOKEN" >> $GITHUB_ENV
conda config --add channels conda-forge
CONDA_NPY=${{ matrix.numpy-version }} CONDA_PY=${{ matrix.python-version }} conda build --token $CONDA_TOKEN --user rmg .
result:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [build]
steps:
- run: exit 1
# see https://github.com/orgs/community/discussions/26822?sort=new#discussioncomment-8285141
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
18 changes: 2 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,10 @@ dassl: DASSL cython
daspk: DASPK31 cython

cython:
ifeq (,$$(wildcard daspk31/solver/ddaspk.o))
# DASPK3.1 was not compiled. Cythonize the wrapper for only DASSL.
python setup.py build_ext $(CYTHON_FLAGS)
else
# Cythonize both DASSL and DASPK3.1 wrappers
python setup.py build_ext daspk $(CYTHON_FLAGS)
endif

pip install .

install: DASSL DASPK31 DASKR cython
ifeq (,$$(wildcard pydas/daspk.so))
# the file "pydas/daspk.so" does not exist, so don't install daspk
python setup.py install
@echo "NOTE: Installed without DASPK, because it had not been compiled."
else
# the file "pydas/daspk.so" does exist, so install daspk
python setup.py daspk install
endif
pip install .

test:
cd tests; python dasslTest.py
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# PyDAS
## Python Wrapper to DASPK, DASSL, and DASKR

> [!WARNING]
> PyDAS is no longer receiving updates. The ReactionMechanismGenerator organization has no developers capable of maintaining it.

The usage documentation is still relevant but no new updates will be released and we are unable to fix any bugs.
We will continue to release conda packages for PyDAS as long as possible.

To build PyDAS, clone this repository, install the dependencies (find them with `conda search -c rmg pydas`), upgrade whichever are causing problems, then navigate to the `.conda` directory and run `conda build .`.
Installation instructions in the documentation directory are _not_ up to date.

The original README file is maintained in this repository, for posterity.
19 changes: 0 additions & 19 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
.. warning::
PyDAS is currently abandonware. The ReactionMechanismGenerator
organization no longer has developers capable of maintaining it.

The usage documentation is still relevant but no new updates will be
released and we are unable to fix any bugs.

We will continue to release conda packages for PyDAS as long as possible.
The current version (as of 5/2/2023) was built with libgfortran-ng 12 (or just libgfortran 5 for Mac) and
Python 3.7 - it is likely in the future that this will no longer work properly
and need to be fixed.

To build PyDAS, clone this repository, install the dependencies (find them
with conda search -c rmg PyDAS), upgrade whichever are causing problems,
then navigate to the .conda directory and run "conda build ."

Good Luck,
Jackson (@JacksonBurns)

*************************************************************************
PyDAS - A Python wrapper to several differential algebraic system solvers
*************************************************************************
Expand Down
6 changes: 4 additions & 2 deletions daskr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
################################################################################


CFLAGS=-fPIC -fallow-argument-mismatch -O3
CFLAGS=-fPIC -O3

FFLAGS=-fallow-argument-mismatch

DOBJ=solver/daux.o solver/ddaskr.o solver/dlinpk.o preconds/dbanpre.o preconds/dilupre.o preconds/drbdpre.o preconds/drbgpre.o preconds/dsparsk.o

Expand All @@ -24,7 +26,7 @@ $(SLIB): $(SOBJ)
ar rcs $(SLIB) $(SOBJ)

%.o: %.f
$(F77) $(CFLAGS) -c $< -o $@
$(F77) $(CFLAGS) $(FFLAGS) -c $< -o $@

clean:
rm -f $(DLIB) $(DOBJ) $(SLIB) $(SOBJ)
12 changes: 7 additions & 5 deletions daspk31/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
################################################################################


CFLAGS=-fPIC -fallow-argument-mismatch -O3
CFLAGS=-fPIC -O3

FFLAGS=-fallow-argument-mismatch

DOBJ=solver/adf_dummy.o solver/daux.o solver/ddaskr.o solver/ddaspk.o solver/dlinpk.o solver/dsensd.o solver/mpi_dummy.o

Expand All @@ -19,12 +21,12 @@ $(DLIB): $(DOBJ)
ar rcs $(DLIB) $(DOBJ)

%.o: %.f
$(F77) $(CFLAGS) -c $< -o $@
$(F77) $(CFLAGS) $(FFLAGS) -c $< -o $@

solver/%.f: | daspk31.tgz
tar zxvf daspk31.tgz -C ../
solver/%.f: | daspk31.tar
tar zxvf daspk31.tar -C ../

daspk31.tgz:
daspk31.tar:
./download_daspk31.sh

clean:
Expand Down
12 changes: 2 additions & 10 deletions daspk31/download_daspk31.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#!/bin/bash
echo "skipping"
#read -p "Do you agree to DASPK3.1 copyright restrictions at http://www.cs.ucsb.edu/~cse?" -n 1 -r
#echo
#if [[ $REPLY =~ ^[Yy]$ ]]
#then
# echo 'Downloading and unpacking DASPK 3.1 fortran source files...'
# wget https://cse.cs.ucsb.edu/sites/cse.cs.ucsb.edu/files/assets/daspk31.tar
# tar zxvf daspk31.tgz -C ../
#fi

echo 'Downloading and unpacking DASPK 3.1 fortran source files...'
wget https://cse.cs.ucsb.edu/sites/cse.cs.ucsb.edu/files/assets/daspk31.tar
6 changes: 4 additions & 2 deletions dassl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
################################################################################


CFLAGS=-fPIC -fallow-argument-mismatch -O3
CFLAGS=-fPIC -O3

FFLAGS=-fallow-argument-mismatch

DOBJ=daux.o ddassl.o dlinpk.o

Expand All @@ -17,7 +19,7 @@ $(DLIB): $(DOBJ)
ar rcs $(DLIB) $(DOBJ)

%.o: %.f
$(F77) $(CFLAGS) -c $< -o $@
$(F77) $(CFLAGS) $(FFLAGS) -c $< -o $@

clean:
rm -f $(DLIB) $(DOBJ)
Loading