Skip to content

Commit

Permalink
75 organizing python modules (#76)
Browse files Browse the repository at this point in the history
* First reorganization and cleaning.
* New directory structure.
* Refactoring scripts to satisfy linters.
* Organizing notebooks.
* Reorganizing notebooks, new MCMC tests with gaussian mixture models.
* Organizing python scripts and support in NumCosmoPy.
* Refactored mcat_calibrate_apes.py.
* New interpolation object.
* Improving getdist (added asinh filter).
* Added check for unclean notebooks.
* Cleaning notebooks.
* Checking notebooks first in GHA.
* Normalizing filenames and organizing Makefile.am.
* Using lower-case names for notebooks.
* Updated Makefile.am.
  • Loading branch information
vitenti committed Feb 16, 2023
1 parent 774bd43 commit 49b0100
Show file tree
Hide file tree
Showing 108 changed files with 13,949 additions and 86,353 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- uses: actions/checkout@v2
- name: Install prereq
run: sudo apt-get install gobject-introspection gir1.2-glib-2.0 libgirepository1.0-dev gcc gfortran pkg-config libglib2.0-dev libgmp3-dev libmpfr-dev libgsl0-dev libfftw3-dev libopenblas-dev libflint-arb-dev libcfitsio-dev libnlopt-dev libhdf5-dev gtk-doc-tools texlive texlive-bibtex-extra texlive-science texlive-publishers tex4ht perl libxml-libxml-perl
- name: Ensure clear Jupyter Notebooks
uses: ResearchSoftwareActions/EnsureCleanNotebooksAction@1.1
- name: Autogen
run: NOCONFIGURE=yes ./autogen.sh
- name: configure
Expand Down Expand Up @@ -86,6 +88,8 @@ jobs:
brew install autoconf automake libtool gobject-introspection gsl gmp mpfr fftw cfitsio nlopt gfortran gtk-doc glib-utils glib
brew ls glib
brew ls glib-utils
- name: Ensure clear Jupyter Notebooks
uses: ResearchSoftwareActions/EnsureCleanNotebooksAction@1.1
- name: Autogen
run: NOCONFIGURE=yes ./autogen.sh
- name: configure
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,6 @@ examples/Makefile
examples/model_mcmc/Makefile
examples/pydata_simple/Makefile
notebooks/Makefile
notebooks/tutorials/Makefile
data/Makefile
numcosmo/build_cfg.h
])
Expand Down
1 change: 1 addition & 0 deletions docs/numcosmo-docs.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
<xi:include href="xml/ncm_data_gauss_cov_mvnd.xml"/>
<xi:include href="xml/ncm_model_rosenbrock.xml"/>
<xi:include href="xml/ncm_data_rosenbrock.xml"/>
<xi:include href="xml/ncm_data_gaussmix2d.xml"/>
<xi:include href="xml/ncm_model_funnel.xml"/>
<xi:include href="xml/ncm_data_funnel.xml"/>
</section>
Expand Down
42 changes: 42 additions & 0 deletions examples/example_apes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env python
#
# example_apes.py
#
# Wed Feb 8 10:00:00 2023
# Copyright 2023 Sandro Dias Pinto Vitenti
# <vitenti@uel.br>
#
# example_apes.py
# Copyright (C) 2023 Sandro Dias Pinto Vitenti <vitenti@uel.br>
#
# numcosmo is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# numcosmo is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.

"""Example of using the APES MCMC sampler on test posteriors."""

import typer
from numcosmo_py import Ncm
from numcosmo_py.experiments.rosenbrock import run_rosenbrock_mcmc
from numcosmo_py.experiments.gaussmix2d import run_gaussmix2d_mcmc
from numcosmo_py.experiments.funnel import run_funnel_mcmc


Ncm.cfg_init()
app = typer.Typer()

app.command()(run_rosenbrock_mcmc)
app.command()(run_gaussmix2d_mcmc)
app.command()(run_funnel_mcmc)

if __name__ == "__main__":
app()
154 changes: 0 additions & 154 deletions examples/example_rosenbrock.py

This file was deleted.

0 comments on commit 49b0100

Please sign in to comment.