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

Removing glib version restriction #155

Merged
merged 19 commits into from
May 15, 2024
17 changes: 7 additions & 10 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,19 @@ jobs:
FC: gfortran-11
F77: gfortran-11
F90: gfortran-11
LIBRARY_PATH: /usr/local/lib
LD_LIBRARY_PATH: /usr/local/lib
DYLD_LIBRARY_PATH: /usr/local/lib
LIBRARY_PATH: /usr/local/lib:/opt/homebrew/Cellar/gmp/6.3.0/lib
LD_LIBRARY_PATH: /usr/local/lib:/opt/homebrew/Cellar/gmp/6.3.0/lib
DYLD_LIBRARY_PATH: /usr/local/lib:/opt/homebrew/Cellar/gmp/6.3.0/lib
CPATH: /usr/local/include

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
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
brew install python3 gobject-introspection pygobject3 numpy meson ninja gsl gmp mpfr fftw cfitsio libfyaml nlopt gfortran gtk-doc glib openblas
- name: Pip install pre-requisites
run: |
pip3 install meson ninja pytest pytest-tap numpy pygobject
python3 -m pip install pytest pytest-tap --break-system-packages
- name: Ensure clear Jupyter Notebooks
uses: ResearchSoftwareActions/EnsureCleanNotebooksAction@1.1
- name: Configure NumCosmo
Expand All @@ -94,8 +91,8 @@ jobs:
run: |
source build/numcosmo_export.sh
cd examples
python example_simple.py
python example_cbe.py
python3 example_simple.py
python3 example_cbe.py
- name: Check NumCosmo
run: meson test -C build || (cat build/meson-logs/testlog.txt && exit 1)

Expand Down
15 changes: 8 additions & 7 deletions devel_environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: numcosmo_developer
---
channels:
- conda-forge
dependencies:
dependencies:
- astropy
- black
- c-compiler
Expand All @@ -11,10 +11,10 @@ dependencies:
- fortran-compiler
- gcovr
- getdist
- glib <=2.78.4
- glib-tools <=2.78.4
- glib
- glib-tools
- gmp
- gobject-introspection <=1.78
- gobject-introspection
- gsl
- hdf5
- healpy
Expand All @@ -32,8 +32,8 @@ dependencies:
- openmpi
- pip
- pip:
- pygobject-stubs
- pytest-tap
- pygobject-stubs
- pytest-tap
- pyccl >= 3.0.0
- pygobject
- pylint
Expand All @@ -43,3 +43,4 @@ dependencies:
- scipy
- tqdm
- typer
name: numcosmo_developer
153 changes: 153 additions & 0 deletions numcosmo_py/nc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ HIPRIM_SBPL_DEFAULT_N_SA: float = 0.9742
HIPRIM_SBPL_DEFAULT_N_T: float = 0.0
HIPRIM_SBPL_DEFAULT_RA: float = 0.8
HIPRIM_SBPL_DEFAULT_T_SA_RATIO: float = 0.2
HIPRIM_TWO_FLUIDS_DEFAULT_LN10E10ASA: float = 3.179
HIPRIM_TWO_FLUIDS_DEFAULT_LNK0: float = 0.0
HIPRIM_TWO_FLUIDS_DEFAULT_LNW: int = 0
HIPRIM_TWO_FLUIDS_DEFAULT_N_T: float = 0.0
HIPRIM_TWO_FLUIDS_DEFAULT_T_SA_RATIO: float = 0.2
HIREION_CAMB_DEFAULT_HEIII_REION_DELTA: float = 0.5
HIREION_CAMB_DEFAULT_HEIII_Z: float = 3.5
HIREION_CAMB_DEFAULT_HII_HEII_REION_DELTA: float = 0.5
Expand Down Expand Up @@ -11532,8 +11537,19 @@ class HIPertTwoFluids(HIPert):
): ...
@staticmethod
def clear(ptf: HIPertTwoFluids) -> None: ...
def compute_zeta_spectrum(
self,
cosmo: HICosmo,
mode: int,
alpha_i: float,
alpha: float,
ki: float,
kf: float,
nnodes: int,
) -> NumCosmoMath.Spline: ...
def eom(self, cosmo: HICosmo, alpha: float) -> HIPertITwoFluidsEOM: ...
def evolve(self, cosmo: HICosmo, alphaf: float) -> None: ...
def evolve_array(self, cosmo: HICosmo, alphaf: float) -> NumCosmoMath.Matrix: ...
def evolve_mode1sub(self, cosmo: HICosmo, alphaf: float) -> None: ...
def free(self) -> None: ...
def get_cross_time(
Expand Down Expand Up @@ -12479,6 +12495,136 @@ class HIPrimSBPLClass(GObject.GPointer):

parent_class: HIPrimClass = ...

class HIPrimTwoFluids(HIPrim):
r"""
:Constructors:

::

HIPrimTwoFluids(**properties)
new() -> NumCosmo.HIPrimTwoFluids

Object NcHIPrimTwoFluids

Properties from NcHIPrimTwoFluids:
lnk-lnw-spline -> NcmSpline2d: lnk-lnw-spline
Spline for the primordial adiabatic scalar power spectrum as a function of ln(k) and ln(w)
use-default-calib -> gboolean: use-default-calib
Use default calibration
ln10e10ASA -> gdouble: ln10e10ASA
\log(10^{10}A_{\mathrm{SA}})
T-SA-ratio -> gdouble: T-SA-ratio
A_T/A_{\mathrm{SA}}
lnk0 -> gdouble: lnk0
\ln(k_0)
lnw -> gdouble: lnw
\ln(w)
n-T -> gdouble: n-T
n_{\mathrm{T}}
ln10e10ASA-fit -> gboolean: ln10e10ASA-fit
\log(10^{10}A_{\mathrm{SA}}):fit
T-SA-ratio-fit -> gboolean: T-SA-ratio-fit
A_T/A_{\mathrm{SA}}:fit
lnk0-fit -> gboolean: lnk0-fit
\ln(k_0):fit
lnw-fit -> gboolean: lnw-fit
\ln(w):fit
n-T-fit -> gboolean: n-T-fit
n_{\mathrm{T}}:fit

Properties from NcHIPrim:
k-pivot -> gdouble: k-pivot
Pivotal value of k

Properties from NcmModel:
name -> gchararray: name
Model's name
nick -> gchararray: nick
Model's nick
scalar-params-len -> guint: scalar-params-len
Number of scalar parameters
vector-params-len -> guint: vector-params-len
Number of vector parameters
implementation -> guint64: implementation
Bitwise specification of functions implementation
sparam-array -> NcmObjDictInt: sparam-array
NcmModel array of NcmSParam
params-types -> GArray: params-types
Parameters' types
reparam -> NcmReparam: reparam
Model reparametrization
submodel-array -> NcmObjArray: submodel-array
NcmModel array of submodels

Signals from GObject:
notify (GParam)
"""

class Props:
T_SA_ratio: float
T_SA_ratio_fit: bool
ln10e10ASA: float
ln10e10ASA_fit: bool
lnk_lnw_spline: NumCosmoMath.Spline2d
lnk0: float
lnk0_fit: bool
lnw: float
lnw_fit: bool
n_T: float
n_T_fit: bool
use_default_calib: bool
k_pivot: float
implementation: int
name: str
nick: str
params_types: list[None]
reparam: NumCosmoMath.Reparam
scalar_params_len: int
sparam_array: NumCosmoMath.ObjDictInt
submodel_array: NumCosmoMath.ObjArray
vector_params_len: int

props: Props = ...
parent_instance: HIPrim = ...
def __init__(
self,
T_SA_ratio: float = ...,
T_SA_ratio_fit: bool = ...,
ln10e10ASA: float = ...,
ln10e10ASA_fit: bool = ...,
lnk_lnw_spline: NumCosmoMath.Spline2d = ...,
lnk0: float = ...,
lnk0_fit: bool = ...,
lnw: float = ...,
lnw_fit: bool = ...,
n_T: float = ...,
n_T_fit: bool = ...,
use_default_calib: bool = ...,
k_pivot: float = ...,
reparam: NumCosmoMath.Reparam = ...,
sparam_array: NumCosmoMath.ObjDictInt = ...,
submodel_array: NumCosmoMath.ObjArray = ...,
): ...
def get_use_default_calib(self) -> bool: ...
@classmethod
def new(cls) -> HIPrimTwoFluids: ...
def peek_lnk_lnw_spline(self) -> NumCosmoMath.Spline2d: ...
def set_lnk_lnw_spline(
self, lnSA_powspec_lnk_lnw: NumCosmoMath.Spline2d
) -> None: ...
def set_use_default_calib(self, use_default_calib: bool) -> None: ...

class HIPrimTwoFluidsClass(GObject.GPointer):
r"""
:Constructors:

::

HIPrimTwoFluidsClass()
"""

parent_class: HIPrimClass = ...

class HIQG1D(GObject.Object):
r"""
:Constructors:
Expand Down Expand Up @@ -18903,6 +19049,13 @@ class HIPrimSBPLSParams(GObject.GEnum):
RA: HIPrimSBPLSParams = ...
T_SA_RATIO: HIPrimSBPLSParams = ...

class HIPrimTwoFluidsSParams(GObject.GEnum):
LN10E10ASA: HIPrimTwoFluidsSParams = ...
LNK0: HIPrimTwoFluidsSParams = ...
LNW: HIPrimTwoFluidsSParams = ...
N_T: HIPrimTwoFluidsSParams = ...
T_SA_RATIO: HIPrimTwoFluidsSParams = ...

class HIReionCambSParams(GObject.GEnum):
HEIII_Z: HIReionCambSParams = ...
HII_HEII_Z: HIReionCambSParams = ...
Expand Down
6 changes: 6 additions & 0 deletions numcosmo_py/ncm.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3265,6 +3265,8 @@ class FitESMCMC(GObject.Object):
Minumum number of runs
max-runs-time -> gdouble: max-runs-time
Maximum time between runs
skip-check -> gboolean: skip-check
Skip check
log-time-interval -> gdouble: log-time-interval
Time interval between log
intermediary-log -> guint: intermediary-log
Expand Down Expand Up @@ -3299,6 +3301,7 @@ class FitESMCMC(GObject.Object):
nthreads: int
nwalkers: int
sampler: MSetTransKern
skip_check: bool
trim_type: MSetCatalogTrimType
use_mpi: bool
walker: FitESMCMCWalker
Expand All @@ -3320,6 +3323,7 @@ class FitESMCMC(GObject.Object):
nthreads: int = ...,
nwalkers: int = ...,
sampler: MSetTransKern = ...,
skip_check: bool = ...,
trim_type: MSetCatalogTrimType = ...,
use_mpi: bool = ...,
walker: FitESMCMCWalker = ...,
Expand All @@ -3333,6 +3337,7 @@ class FitESMCMC(GObject.Object):
def get_catalog(self) -> MSetCatalog: ...
def get_offboard_ratio(self) -> float: ...
def get_offboard_ratio_last_update(self) -> float: ...
def get_skip_check(self) -> bool: ...
def has_rng(self) -> bool: ...
def mean_covar(self) -> None: ...
@classmethod
Expand Down Expand Up @@ -3373,6 +3378,7 @@ class FitESMCMC(GObject.Object):
def set_nthreads(self, nthreads: int) -> None: ...
def set_rng(self, rng: RNG) -> None: ...
def set_sampler(self, sampler: MSetTransKern) -> None: ...
def set_skip_check(self, skip_check: bool) -> None: ...
def start_run(self) -> None: ...
def use_mpi(self, use_mpi: bool) -> None: ...
def validate(self, pi: int, pf: int) -> bool: ...
Expand Down
Loading