-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix meson options fixes #17 also add pyproject.toml so that numpy can be a build dependency also add run_commnad check=True to squash warnings fix GitHub actions
- Loading branch information
Showing
11 changed files
with
92 additions
and
83 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 |
---|---|---|
@@ -1,80 +1,78 @@ | ||
name: Tests | ||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
Tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
build: ["meson", "setuptools"] | ||
build: [meson, setuptools] | ||
include: | ||
- os: ubuntu-latest | ||
python-version: "3.10" | ||
- os: macos-latest | ||
python-version: "3.11" | ||
steps: | ||
- name: Checkout nuflux | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: pip | ||
- name: Apt-Get Install Dependencies | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build gcovr libcfitsio-dev python-is-python3 libboost-python-dev python3-numpy doxygen | ||
sudo python3 -m pip install meson sphinx breathe sphinx_rtd_theme | ||
sudo apt-get install ninja-build gcovr libcfitsio-dev python-is-python3 libboost-python-dev doxygen | ||
python3 -m pip install sphinx breathe sphinx_rtd_theme meson numpy | ||
curl -L https://github.com/icecube/photospline/archive/refs/tags/v2.1.0.tar.gz | tar xz | ||
cmake -S photospline-2.1.0 -B photospline -DCMAKE_BUILD_TYPE=Release | ||
sudo make install -C photospline | ||
- name: HomeBrew Install Dependencies | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: | | ||
brew install boost-python3 numpy ninja doxygen cfitsio gcovr | ||
sudo python3 -m pip install meson sphinx breathe sphinx_rtd_theme | ||
- name: Checkout Photospline | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: icecube/photospline | ||
ref: v2.0.7 | ||
path: photospline | ||
- name: Build Photospline | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
cmake . | ||
make | ||
sudo make install | ||
working-directory: photospline | ||
- name: Checkout nuflux | ||
uses: actions/checkout@v2 | ||
brew tap icecube/icecube | ||
brew install boost-python3 ninja doxygen cfitsio gcovr icecube/icecube/photospline | ||
python3 -m pip install sphinx breathe sphinx_rtd_theme meson numpy | ||
- name: Build nuflux with Meson | ||
if: ${{ matrix.build == 'meson' }} | ||
if: matrix.build == 'meson' | ||
run: | | ||
mkdir build | ||
meson build . -D b_coverage=true | ||
meson setup build . -D b_coverage=true --libdir=lib | ||
ninja -C build | ||
sudo ninja -C build install | ||
- name: Build nuflux with setuptools | ||
if: ${{ matrix.build == 'setuptools' }} | ||
run: sudo python3 -m pip install . | ||
if: matrix.build == 'setuptools' | ||
run: python3 -m pip install --user . | ||
- name: Run Python Tests | ||
working-directory: tests | ||
env: | ||
LD_LIBRARY_PATH: /usr/local/lib/:/usr/local/lib/x86_64-linux-gnu | ||
PYTHONPATH: /usr/local/lib/python3/dist-packages | ||
LD_LIBRARY_PATH: /usr/local/lib/ | ||
PYTHONPATH: /usr/local/lib/python${{matrix.python-version}}/site-packages | ||
run: | | ||
./test_fluxes.py | ||
python3 -m doctest -v ../README.md | ||
- name: Generate Coverage Report | ||
if: ${{ matrix.build == 'meson' && matrix.os == 'ubuntu-latest' }} | ||
if: matrix.build == 'meson' && startsWith( matrix.os, 'ubuntu') | ||
run: ninja -C build coverage | ||
- name: Upload Coverage to Codecov | ||
if: ${{ matrix.build == 'meson' && matrix.os == 'ubuntu-latest' }} | ||
if: matrix.build == 'meson' && startsWith( matrix.os, 'ubuntu') | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
fail_ci_if_error: false | ||
verbose: true | ||
- name: Build Documentation | ||
if: ${{ matrix.build == 'meson' }} | ||
run: ninja -C build docs/html | ||
if: matrix.build == 'meson' | ||
env: | ||
LD_LIBRARY_PATH: /usr/local/lib/:/usr/local/lib/x86_64-linux-gnu | ||
PYTHONPATH: /usr/local/lib/python3/dist-packages | ||
LD_LIBRARY_PATH: /usr/local/lib/ | ||
PYTHONPATH: /usr/local/lib/python${{matrix.python-version}}/site-packages | ||
run: ninja -C build docs/html | ||
- name: Upload Documentation | ||
if: ${{ matrix.build == 'meson' && matrix.os == 'ubuntu-latest' }} | ||
if: matrix.build == 'meson' && matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' | ||
run: docs/docs-upload.sh | ||
env: | ||
ICECUBE_PASSWORD: ${{ secrets.ICECUBE_PASSWORD }} | ||
- name: Check Documentation Links | ||
if: ${{ matrix.build == 'meson' }} | ||
run: sphinx-build -c build/docs/ docs/ . -b linkcheck | ||
env: | ||
LD_LIBRARY_PATH: /usr/local/lib/:/usr/local/lib/x86_64-linux-gnu | ||
PYTHONPATH: /usr/local/lib/python3/dist-packages | ||
ICECUBE_PASSWORD: ${{ secrets.ICECUBE_PASSWORD }} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
C++ API Reference | ||
================= | ||
|
||
.. doxygenindex:: | ||
.. .. doxygenindex:: |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
option('python', type : 'string', value : 'python3', description : 'python path to compile against') | ||
option('data_path', type: 'string', value : '', description: 'absolute path to where to install data files, will overrede --datadir Default will be PREFIX/share/nuflux') | ||
option('install_data', type: 'boolean', value : 'True', description: 'can be set to false if installing on a readonly filesystem') | ||
option('install_data', type: 'boolean', value : 'true', description: 'can be set to false if installing on a readonly filesystem') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[build-system] | ||
requires = ["setuptools", "oldest-supported-numpy"] | ||
build_backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "nuflux" | ||
version = "2.0.3" | ||
description = "A library for calculating atmospheric neutrino fluxes" | ||
readme = "README.md" | ||
#requires_python = "~=3.8" | ||
dependencies = ['numpy'] | ||
license = {file = "LICENCE"} | ||
keywords = ["python", "science", "astronomy", "astrophysics", "IceCube", "atmospheric", "neutrino"] | ||
classifiers = [ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)', | ||
'Operating System :: MacOS :: MacOS X', | ||
'Operating System :: POSIX :: Linux', | ||
'Programming Language :: C++', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Topic :: Scientific/Engineering :: Astronomy', | ||
'Topic :: Scientific/Engineering :: Physics', | ||
] |
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