Skip to content

Commit

Permalink
Migrate to ducc (#183)
Browse files Browse the repository at this point in the history
* Ducc migrated
  • Loading branch information
damonge authored Feb 13, 2024
1 parent d9af8b8 commit 2b35f37
Show file tree
Hide file tree
Showing 379 changed files with 5,115 additions and 56,960 deletions.
8 changes: 8 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[flake8]
exclude =
pymaster/nmtlib.py
test/
setup.py
sandbox_validation/
doc/
build/
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
os:
- ubuntu-latest
py:
- 3.8
- 3.11
CC:
- gcc

Expand All @@ -38,6 +38,7 @@ jobs:
pip install -U numpy
pip install -U scipy
pip install -U healpy
pip install -U ducc0
pip install -U flake8
pip install -U pytest
pip install -U pytest-cov
Expand Down
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: doc/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: doc/requirements.txt
15 changes: 5 additions & 10 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
EXTRA_DIST = doc README.md

lib_LTLIBRARIES = libnmt.la
libnmt_la_SOURCES = src/utils.c src/flatsky_utils.c src/healpix_extra.c src/nmt_bins.c src/nmt_bins_flat.c src/nmt_field.c src/nmt_field_flat.c src/nmt_mask.c src/nmt_mask_flat.c src/nmt_master.c src/nmt_covar.c src/nmt_master_flat.c src/nmt_covar_flat.c src/nmt_io.c
libnmt_la_SOURCES = src/utils.c src/flatsky_utils.c src/healpix_extra.c src/nmt_bins.c src/nmt_bins_flat.c src/nmt_field_flat.c src/nmt_mask.c src/nmt_mask_flat.c src/nmt_master.c src/nmt_covar.c src/nmt_master_flat.c src/nmt_covar_flat.c src/nmt_io.c
libnmt_la_CPPFLAGS = $(OPENMP_CFLAGS) -I./src/
libnmt_la_LDFLAGS = $(OPENMP_CFLAGS) @fftw_thread_type@ -lfftw3 -lgsl -lgslcblas -lcfitsio @libsharp_libs@ -lm
libnmt_la_LDFLAGS = $(OPENMP_CFLAGS) @fftw_thread_type@ -lfftw3 -lgsl -lgslcblas -lcfitsio -lm

include_HEADERS = src/namaster.h

bin_PROGRAMS = namaster
namaster_SOURCES = src/nmt_main.c
namaster_LDADD = libnmt.la
namaster_CPPFLAGS = $(OPENMP_CFLAGS) -I./src/
namaster_LDFLAGS = $(OPENMP_CFLAGS) -L./ -lnmt @fftw_thread_type@ -lfftw3 -lgsl -lgslcblas -lcfitsio @libsharp_libs@ -lm

noinst_PROGRAMS = test/check_nmt
TESTS = test/check_nmt
test_check_nmt_SOURCES = test/nmt_test.c test/nmt_test_utils.c test/nmt_test_fsk.c test/nmt_test_hpex.c test/nmt_test_bins.c test/nmt_test_field.c test/nmt_test_master.c test/nmt_test_covar.c test/nmt_test_bins_flat.c test/nmt_test_field_flat.c test/nmt_test_master_flat.c test/nmt_test_covar_flat.c test/nmt_test_mask.c test/nmt_test_field_car.c
test_check_nmt_LDADD = libnmt.la
test_check_nmt_SOURCES = test/nmt_test.c test/nmt_test_utils.c test/nmt_test_fsk.c test/nmt_test_hpex.c test/nmt_test_bins.c test/nmt_test_bins_flat.c test/nmt_test_field_flat.c test/nmt_test_master_flat.c test/nmt_test_covar_flat.c test/nmt_test_mask.c
test_check_nmt_CPPFLAGS = $(OPENMP_CFLAGS) -I./test/ -I./src/
test_check_nmt_LDFLAGS = $(OPENMP_CFLAGS) -L./ -lnmt @fftw_thread_type@ -lfftw3 -lgsl -lgslcblas -lcfitsio @libsharp_libs@ -lm
test_check_nmt_LDFLAGS = $(OPENMP_CFLAGS) -L./ -lnmt @fftw_thread_type@ -lfftw3 -lgsl -lgslcblas -lcfitsio -lm
4 changes: 0 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,13 @@ AS_IF(
[test "x$enable_fftw_pthreads" = "xyes"], [AC_SUBST([fftw_thread_type], "-lfftw3_threads -lpthread")],
[test "x$enable_fftw_pthreads" != "xyes"], [AC_SUBST([fftw_thread_type], "-lfftw3_omp")])

# Set libsharp libraries needed
AC_SUBST([libsharp_libs], "-lsharp2")

# Checks for libraries.
AC_SEARCH_LIBS([pow],[m],[],AC_MSG_ERROR(Couldn't find libm. Required.))
AC_SEARCH_LIBS([cblas_dgemm],[gslcblas],[],AC_MSG_ERROR(Couldn't find libgslcblas.))
AC_SEARCH_LIBS([gsl_spline2d_eval_e],[gsl],[],AC_MSG_ERROR(Couldn't find libgsl. GSL V2+ required.))
AC_SEARCH_LIBS([ffopen],[cfitsio],[],AC_MSG_ERROR(Couldn't find cfitsio))
AC_SEARCH_LIBS([ring2nest],[chealpix],[],AC_MSG_ERROR(Couldn't find libchealpix))
AC_SEARCH_LIBS([fftw_execute],[fftw3],[],AC_MSG_ERROR(Couldn't find libfftw3))
AC_SEARCH_LIBS([sharp_execute],[sharp2],[],AC_MSG_ERROR(Couldn't find libsharp2))

# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h math.h stdarg.h unistd.h time.h omp.h complex.h])
Expand Down
20 changes: 16 additions & 4 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,29 @@

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = pymaster
SOURCEDIR = source
BUILDDIR = build
SPHINXBUILD = python3 -msphinx
SPHINXPROJ = NaMaster
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

generate-api: ./apidoc.sh
bash $<
.PHONY: html
html: generate-api
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

clean-api:
rm -rf api/*.rst
.PHONY: clean
clean: clean-api
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
3 changes: 3 additions & 0 deletions doc/apidoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# bash

sphinx-apidoc -T -f -e -o api/ ../pymaster/ ../pymaster/tests/* ../pymaster/tests ../pymaster/nmtlib.py
Binary file removed doc/build/doctrees/environment.pickle
Binary file not shown.
Binary file removed doc/build/doctrees/index.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/installation.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/pymaster.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_bins.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_covariance.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_fields.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_flat.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_masks.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_pureb.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_rectpix.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_simple.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_toeplitz.doctree
Binary file not shown.
Binary file removed doc/build/doctrees/sample_workspaces.doctree
Binary file not shown.
4 changes: 0 additions & 4 deletions doc/build/html/.buildinfo

This file was deleted.

Binary file removed doc/build/html/_downloads/doc_scientific.pdf
Binary file not shown.
39 changes: 0 additions & 39 deletions doc/build/html/_sources/index.rst.txt

This file was deleted.

114 changes: 0 additions & 114 deletions doc/build/html/_sources/installation.rst.txt

This file was deleted.

20 changes: 0 additions & 20 deletions doc/build/html/_sources/pymaster.rst.txt

This file was deleted.

7 changes: 0 additions & 7 deletions doc/build/html/_sources/sample_bins.rst.txt

This file was deleted.

7 changes: 0 additions & 7 deletions doc/build/html/_sources/sample_covariance.rst.txt

This file was deleted.

7 changes: 0 additions & 7 deletions doc/build/html/_sources/sample_fields.rst.txt

This file was deleted.

7 changes: 0 additions & 7 deletions doc/build/html/_sources/sample_flat.rst.txt

This file was deleted.

7 changes: 0 additions & 7 deletions doc/build/html/_sources/sample_masks.rst.txt

This file was deleted.

10 changes: 0 additions & 10 deletions doc/build/html/_sources/sample_pureb.rst.txt

This file was deleted.

7 changes: 0 additions & 7 deletions doc/build/html/_sources/sample_rectpix.rst.txt

This file was deleted.

7 changes: 0 additions & 7 deletions doc/build/html/_sources/sample_simple.rst.txt

This file was deleted.

Loading

0 comments on commit 2b35f37

Please sign in to comment.