Skip to content

Commit

Permalink
Merge branch 'master' into cmb_parametrization
Browse files Browse the repository at this point in the history
  • Loading branch information
vitenti committed Apr 23, 2024
2 parents 4dfaf0d + fc63c39 commit ab7445c
Show file tree
Hide file tree
Showing 104 changed files with 17,869 additions and 4,738 deletions.
2 changes: 0 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[flake8]
max-line-length = 88
select = C,E,F,W,B,B950
extend-ignore = E203, E501

30 changes: 18 additions & 12 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ jobs:
- name: Check NumCosmo
run: meson test -C build || (cat build/meson-logs/testlog.txt && exit 1)
- name: Create a NumCosmo tarball
run: meson dist -C build --no-tests
run: meson dist -C build --no-tests
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: release
path: build/meson-dist/numcosmo-*.tar.xz
- name: Test example compilation using installed library
run: |
sudo meson install -C build
sudo meson install -C build
cd examples
gcc -D_GNU_SOURCE -Wall example_simple.c -o example_simple $(pkg-config numcosmo --libs --cflags)
gcc -D_GNU_SOURCE -Wall example_ca.c -o example_ca $(pkg-config numcosmo --libs --cflags)
Expand All @@ -73,9 +73,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: '3.x'
- name: Brew install pre-requisites
run: |
brew install gobject-introspection gsl gmp mpfr fftw cfitsio libfyaml nlopt gfortran gtk-doc glib openblas
Expand All @@ -85,8 +85,8 @@ jobs:
- name: Ensure clear Jupyter Notebooks
uses: ResearchSoftwareActions/EnsureCleanNotebooksAction@1.1
- name: Configure NumCosmo
run: |
meson setup build -Dbuildtype=release -Dnumcosmo_py=true --prefix=/usr || (cat build/meson-logs/meson-log.txt && exit 1)
run: |
meson setup build -Dbuildtype=release -Dnumcosmo_py=true -Dmpi=disabled --prefix=/usr || (cat build/meson-logs/meson-log.txt && exit 1)
- name: Building NumCosmo
run: |
meson compile -C build
Expand All @@ -98,15 +98,18 @@ jobs:
python example_cbe.py
- name: Check NumCosmo
run: meson test -C build || (cat build/meson-logs/testlog.txt && exit 1)

build-miniforge:
name: (${{ matrix.os }}, py${{ matrix.python-version }}, ${{ matrix.mpi }}, Miniforge)
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: ["ubuntu", "macos"]
python-version: ["3.9"]
python-version: ["3.10"]
mpi: ["openmpi", "mpich"]
exclude:
- os: "macos"
mpi: "openmpi"
defaults:
run:
shell: bash -el {0}
Expand Down Expand Up @@ -175,7 +178,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu"]
python-version: ["3.9"]
python-version: ["3.10"]
defaults:
run:
shell: bash -el {0}
Expand Down Expand Up @@ -224,12 +227,15 @@ jobs:
meson test -C build --timeout-multiplier 0 || (cat build/meson-logs/testlog.txt && exit 1)
lcov --config-file .lcovrc --no-external --capture --directory build --directory numcosmo --directory tests --base-directory $(pwd)/build --output-file numcosmo-coverage-tests.info
lcov --config-file .lcovrc --add-tracefile numcosmo-coverage-base.info --add-tracefile numcosmo-coverage-tests.info --output-file numcosmo-coverage-full.info
lcov --config-file .lcovrc --remove numcosmo-coverage-full.info '*/class/*' '*/levmar/*' '*/libcuba/*' '*/plc/*' '*/sundials/*' '*/toeplitz/*' '*/tools/*' --output-file numcosmo-coverage.info
lcov --config-file .lcovrc --remove numcosmo-coverage-full.info '*/class/*' '*/levmar/*' '*/libcuba/*' '*/plc/*' '*/sundials/*' '*/toeplitz/*' '*/tools/*' --output-file numcosmo-coverage.info
- name: CodeCov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
fail_ci_if_error: true
files: ./numcosmo-coverage.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
#- name: Generate coverage
# # For some reason, gcovr is ignoring the configured gcovr.cfg file
# # ninja coverage -C build -v -d stats -d explain
Expand Down
13 changes: 7 additions & 6 deletions devel_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ channels:
- conda-forge
dependencies:
- astropy
- black<24
- black
- c-compiler
- cfitsio
- fftw
- flake8
- fortran-compiler
- gcovr
- getdist
- glib
- glib-tools
- glib <=2.78.4
- glib-tools <=2.78.4
- gmp
- gobject-introspection
- gobject-introspection <=1.78
- gsl
- hdf5
- healpy
- lcov
- libflint
- libfyaml
Expand All @@ -26,7 +27,7 @@ dependencies:
- mypy
- ninja
- nlopt
- numpy >= 1.21.0
- numpy >= 1.23.0
- openblas=*=*openmp*
- openmpi
- pip
Expand All @@ -37,7 +38,7 @@ dependencies:
- pygobject
- pylint
- pytest
- python >= 3.9
- python >= 3.10
- rich
- scipy
- tqdm
Expand Down
19 changes: 11 additions & 8 deletions docs/numcosmo-docs.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@
<section>
<title>Power spectrum functions</title>
<xi:include href="xml/ncm_powspec.xml"/>
<xi:include href="xml/ncm_powspec_corr3d.xml"/>
<xi:include href="xml/ncm_powspec_filter.xml"/>
<xi:include href="xml/ncm_powspec_sphere_proj.xml"/>
<xi:include href="xml/ncm_powspec_corr3d.xml"/>
<xi:include href="xml/ncm_powspec_spline2d.xml"/>
</section>
<section>
<title>Harmonic Oscillator</title>
Expand Down Expand Up @@ -271,14 +272,15 @@
<chapter>
<title>Perturbations</title>
<xi:include href="xml/nc_hipert.xml"/>
<xi:include href="xml/nc_hipert_bg_var.xml"/>
<xi:include href="xml/nc_hipert_wkb.xml"/>
<xi:include href="xml/nc_hipert_adiab.xml"/>
<xi:include href="xml/nc_hipert_gw.xml"/>
<xi:include href="xml/nc_hipert_two_fluids.xml"/>
<xi:include href="xml/nc_hipert_boltzmann.xml"/>
<xi:include href="xml/nc_hipert_bg_var.xml"/>
<xi:include href="xml/nc_hipert_boltzmann_std.xml"/>
<xi:include href="xml/nc_hipert_boltzmann.xml"/>
<xi:include href="xml/nc_hipert_em.xml"/>
<xi:include href="xml/nc_hipert_first_order.xml"/>
<xi:include href="xml/nc_hipert_gw.xml"/>
<xi:include href="xml/nc_hipert_two_fluids.xml"/>
<xi:include href="xml/nc_hipert_wkb.xml"/>
<section>
<title>Gravitational theories</title>
<xi:include href="xml/nc_hipert_grav.xml"/>
Expand Down Expand Up @@ -320,9 +322,9 @@
<section>
<title>Matter Power Spectrum</title>
<xi:include href="xml/nc_powspec_ml.xml"/>
<xi:include href="xml/nc_powspec_ml_fix_spline.xml"/>
<xi:include href="xml/nc_powspec_ml_transfer.xml"/>
<xi:include href="xml/nc_powspec_ml_cbe.xml"/>
<xi:include href="xml/nc_powspec_ml_spline.xml"/>
<xi:include href="xml/nc_powspec_ml_transfer.xml"/>
<xi:include href="xml/nc_powspec_mnl.xml"/>
<xi:include href="xml/nc_powspec_mnl_halofit.xml"/>
</section>
Expand Down Expand Up @@ -434,6 +436,7 @@
<xi:include href="xml/nc_data_dist_mu.xml"/>
<xi:include href="xml/nc_data_snia_cov.xml"/>
<xi:include href="xml/nc_data_cluster_ncount.xml"/>
<xi:include href="xml/nc_data_cluster_ncounts_gauss.xml"/>
<xi:include href="xml/nc_data_cluster_pseudo_counts.xml"/>
<xi:include href="xml/nc_data_cluster_wl.xml"/>
<xi:include href="xml/nc_data_reduced_shear_cluster_mass.xml"/>
Expand Down
188 changes: 0 additions & 188 deletions examples/example_exp_potential.py

This file was deleted.

0 comments on commit ab7445c

Please sign in to comment.