Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge l1v4 changes into l1v5 #176

Open
wants to merge 14 commits into
base: level1-version5
Choose a base branch
from
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
10 changes: 10 additions & 0 deletions .ci/checkout-submodules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

git submodule update --init --remote

pushd submodules/libSBML-dependencies

# only checkout the expat submodule
git submodule update --init --remote expat

popd
6 changes: 6 additions & 0 deletions .ci/create-sdist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# Create a source distribution
cp src/bindings/python/setup.py .
cp src/bindings/python/MANIFEST.in .
python3 setup.py sdist
48 changes: 26 additions & 22 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@ jobs:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Optional, use if you use setuptools_scm
submodules: recursive # Optional, use if you have submodules

- name: checkout needed submodules
run: |
./.ci/checkout-submodules.sh

- name: Build SDist
run: |
cp src/bindings/python/setup.py .
cp src/bindings/python/MANIFEST.in .
pipx run build --sdist

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
name: libSEDML-sdist
Expand All @@ -33,53 +36,54 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
python_version: ['cp37-*', 'cp38-*', 'cp39-*', 'cp310-*', 'cp311-*']
os: [ubuntu-latest, windows-latest, macos-latest]
python_version: ['cp39-*', 'cp310-*', 'cp311-*', 'cp312-*', 'cp313-*']

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Optional, use if you use setuptools_scm
submodules: recursive # Optional, use if you have submodules

- name: checkout needed submodules
shell: bash
run: |
./.ci/checkout-submodules.sh

- name: install swig on macos
if: matrix.os == 'macos-latest'
run: |
brew install swig

- name: Copy setup.py
run: |
cp src/bindings/python/setup.py .

- uses: pypa/cibuildwheel@v2.11.2
- uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_BUILD: ${{ matrix.python_version }}
CIBW_ARCHS_MACOS: x86_64 arm64

- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
name: libSEDML-${{ matrix.os }}
name: libSEDML-wheels

upload_all:
needs: [build_wheels, make_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: libSEDML-sdist
path: dist
- uses: actions/download-artifact@v2
with:
name: libSEDML-ubuntu-20.04
path: dist
- uses: actions/download-artifact@v2
with:
name: libSEDML-macos-10.15
path: dist
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: libSEDML-windows-2019
name: libSEDML-wheels
path: dist

- uses: pypa/gh-action-pypi-publish@v1.4.2
- uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,8 @@ libsedml/_*
examples/python/*.xml
dev/temp_deviser_file.xml
setup.py
MANIFEST.in

# documentation
/doc/html/
Doxyfile
12 changes: 8 additions & 4 deletions CMakeModules/FindEXPAT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ find_path(EXPAT_INCLUDE_DIR expat.h
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
CMAKE_FIND_ROOT_PATH_BOTH)
endif ()

if (NOT EXPAT_INCLUDE_DIR)
find_path(EXPAT_INCLUDE_DIR expat.h)
find_path(EXPAT_INCLUDE_DIR expat.h
CMAKE_FIND_ROOT_PATH_BOTH)
endif ()

find_library(EXPAT_LIBRARY
Expand Down Expand Up @@ -81,11 +83,13 @@ find_library(EXPAT_LIBRARY
/opt/csw/lib # Blastwave
/opt/lib
/usr/freeware/lib64
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
CMAKE_FIND_ROOT_PATH_BOTH)
endif()

if (NOT EXPAT_LIBRARY)
find_library(EXPAT_LIBRARY NAMES libexpat expat)
find_library(EXPAT_LIBRARY NAMES libexpat expat
CMAKE_FIND_ROOT_PATH_BOTH )
endif ()

mark_as_advanced(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)
Expand Down
7 changes: 5 additions & 2 deletions CMakeModules/FindLIBNUML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if (NOT ${LIBNUML_LIBRARY_NAME}_FOUND)
${CONAN_LIB_DIRS_LIBNUML}/cmake
${${_PROJECT_DEPENDENCY_DIR}}/lib/cmake
${${_PROJECT_DEPENDENCY_DIR}}/lib64/cmake
CMAKE_FIND_ROOT_PATH_BOTH
)
endif()

Expand Down Expand Up @@ -90,7 +91,8 @@ find_path(LIBNUML_INCLUDE_DIR numl/NMBase.h
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
CMAKE_FIND_ROOT_PATH_BOTH)

if (NOT LIBNUML_INCLUDE_DIR)
find_path(LIBNUML_INCLUDE_DIR numl/NMBase.h)
Expand All @@ -117,7 +119,8 @@ find_library(LIBNUML_LIBRARY
/opt/csw/lib # Blastwave
/opt/lib
/usr/freeware/lib64
NO_DEFAULT_PATH)
NO_DEFAULT_PATH
CMAKE_FIND_ROOT_PATH_BOTH)

if (NOT LIBNUML_LIBRARY)
find_library(LIBNUML_LIBRARY
Expand Down
17 changes: 15 additions & 2 deletions CMakeModules/FindLIBSBML.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
# Copyright (C) 2019 - 2023 by Pedro Mendes, Rector and Visitors of the
# University of Virginia, University of Heidelberg, and University
# of Connecticut School of Medicine.
# All rights reserved.
Expand Down Expand Up @@ -33,11 +33,21 @@ endif()

message (VERBOSE "Looking for ${LIBSBML_LIBRARY_NAME}")

find_package(${LIBSBML_LIBRARY_NAME} CONFIG QUIET)

string(TOUPPER ${PROJECT_NAME} _UPPER_PROJECT_NAME)
set(_PROJECT_DEPENDENCY_DIR ${_UPPER_PROJECT_NAME}_DEPENDENCY_DIR)

find_package(${LIBSBML_LIBRARY_NAME} CONFIG QUIET
PATHS ${${_PROJECT_DEPENDENCY_DIR}}/lib/cmake
${${_PROJECT_DEPENDENCY_DIR}}/lib64/cmake
${CONAN_LIB_DIRS_LIBSBML}/cmake
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)

if (NOT ${LIBSBML_LIBRARY_NAME}_FOUND)
find_package(${LIBSBML_LIBRARY_NAME} CONFIG QUIET)
endif()

if (NOT ${LIBSBML_LIBRARY_NAME}_FOUND)
find_package(${LIBSBML_LIBRARY_NAME} CONFIG QUIET
PATHS /usr/lib/cmake
Expand All @@ -48,6 +58,7 @@ if (NOT ${LIBSBML_LIBRARY_NAME}_FOUND)
${${_PROJECT_DEPENDENCY_DIR}}/lib/cmake
${${_PROJECT_DEPENDENCY_DIR}}/lib64/cmake
${CONAN_LIB_DIRS_LIBSBML}/cmake
CMAKE_FIND_ROOT_PATH_BOTH
)
endif()

Expand Down Expand Up @@ -111,6 +122,7 @@ find_path(LIBSBML_INCLUDE_DIR sbml/SBase.h
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)

if (NOT LIBSBML_INCLUDE_DIR)
Expand Down Expand Up @@ -140,6 +152,7 @@ find_library(LIBSBML_LIBRARY
/opt/csw/lib # Blastwave
/opt/lib
/usr/freeware/lib64
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)

if (NOT LIBSBML_LIBRARY)
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,23 @@ note the semicolon denoting the listing of several libraries. Of course you coul

for linking against `expat` and indicating, that libSBML was compiled without compression.

## Documentation
API documentation is something to be added and pull requests are happily accepted to improve them. For now a basic doxygen file
is provided and documentation can be generated after checkout like so:

```bash
PROJECT_NUMBER=2.0.32 doxygen -x libSEDML.doxyfile > Doxyfile && doxygen
```

This expands the version number in the doxygen file, creates a temporary `Doxyfile` and runs doxygen with it. After that the
generated documentation is available in the `./doc/html` folder.

## License

This project is open source and freely available under the [Simplified BSD](http://opensource.org/licenses/BSD-2-Clause) license. Should that license not meet your needs, please contact me.


Copyright (c) 2013-2021, Frank T. Bergmann
Copyright (c) 2013-2023, Frank T. Bergmann
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
11 changes: 11 additions & 0 deletions dev/create-source-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# this script creates the python source package
cp ./src/bindings/python/setup.py .
cp ./src/bindings/python/MANIFEST.in .

# remove old source packages
rm ./dist/*.tar.gz

# create the source package
python3 setup.py sdist
Loading
Loading