From 377c876df8f16b54f6ee631f868d44dc76ccb578 Mon Sep 17 00:00:00 2001 From: Avinash Anand <36325275+anand-avinash@users.noreply.github.com> Date: Wed, 13 Mar 2024 16:55:03 +0100 Subject: [PATCH] updated the test workflow --- .github/workflows/documentation.yaml | 4 +++- .github/workflows/tests.yaml | 18 +++++++++--------- README.md | 7 ++++++- brahmap/utilities/__init__.py | 10 ++++++---- setup.py | 8 ++++---- tests/test_BlkDiagPrecondLO_tools_cpp.py | 2 +- 6 files changed, 29 insertions(+), 20 deletions(-) diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index efbf514..d49ef67 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -1,6 +1,6 @@ ### Taken from -name: documentation +name: Documentation on: push: branches: @@ -26,5 +26,7 @@ jobs: path: .cache restore-keys: | mkdocs-material- + # The line below is to enable the docstring for the lbsim_interface.py + - run: pip install --no-deps litebird_sim - run: pip install mkdocs-material mkdocstrings[python] - run: mkdocs gh-deploy --force diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 13413db..ea2b441 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -3,7 +3,7 @@ # setting up testing: # setting up compiler: -name: BrahMap testing +name: Tests on: push: branches: @@ -21,19 +21,19 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - name: Install compiler - id: install_cc - uses: rlalik/setup-cpp-compiler@master - with: - compiler: gcc-10 + # - name: Install compiler + # id: install_cc + # uses: rlalik/setup-cpp-compiler@master + # with: + # compiler: gcc-10 # This compiler has been failing with (macos-latest, 3.11/3.12) - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install BrahMap - env: - CC: ${{ steps.install_cc.outputs.cc }} - CXX: ${{ steps.install_cc.outputs.cxx }} + # env: + # CC: ${{ steps.install_cc.outputs.cc }} + # CXX: ${{ steps.install_cc.outputs.cxx }} run: | python -m pip install --upgrade pip python -m pip install . diff --git a/README.md b/README.md index 93ce25f..534394a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,13 @@ # BrahMap + +![BrahMap testsuite](https://github.com/anand-avinash/BrahMap/actions/workflows/tests.yaml/badge.svg) +![BrahMap documentation build status](https://github.com/anand-avinash/BrahMap/actions/workflows/documentation.yaml/badge.svg) + + **This project is currently under active development!!!** - + `BrahMap` is an optimal map-making framework for the future CMB experiments, based on [COSMOMAP2](https://github.com/giuspugl/COSMOMAP2), as described in diff --git a/brahmap/utilities/__init__.py b/brahmap/utilities/__init__.py index 16e64d8..e35f721 100644 --- a/brahmap/utilities/__init__.py +++ b/brahmap/utilities/__init__.py @@ -24,11 +24,14 @@ # suggestion taken from: if find_spec("litebird_sim") is not None: - import_str = "lbs_process_timesamples" + from .lbsim_interface import lbs_process_timesamples + + __all__ = ["lbs_process_timesamples"] + else: - import_str = None + __all__ = [] -__all__ = [ +__all__ = __all__ + [ "is_sorted", "bash_colors", "filter_warnings", @@ -42,5 +45,4 @@ "subscan_resize", "system_setup", "ProcessTimeSamples", - import_str, ] diff --git a/setup.py b/setup.py index 1a3198e..12cf000 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ define_macros=None, extra_compile_args=[ "-O3", - "-march=native", + # "-march=native", "-Wall", "-shared", "-std=c++14", @@ -33,7 +33,7 @@ define_macros=None, extra_compile_args=[ "-O3", - "-march=native", + # "-march=native", "-Wall", "-shared", "-std=c++14", @@ -51,7 +51,7 @@ define_macros=None, extra_compile_args=[ "-O3", - "-march=native", + # "-march=native", "-Wall", "-shared", "-std=c++14", @@ -69,7 +69,7 @@ define_macros=None, extra_compile_args=[ "-O3", - "-march=native", + # "-march=native", "-Wall", "-shared", "-std=c++14", diff --git a/tests/test_BlkDiagPrecondLO_tools_cpp.py b/tests/test_BlkDiagPrecondLO_tools_cpp.py index 3010318..739e098 100644 --- a/tests/test_BlkDiagPrecondLO_tools_cpp.py +++ b/tests/test_BlkDiagPrecondLO_tools_cpp.py @@ -161,7 +161,7 @@ def __init__(self): @pytest.mark.parametrize( - "initfloat, rtol", [(InitFloat32Params(), 5.0e-6), (InitFloat64Params(), 5.0e-6)] + "initfloat, rtol", [(InitFloat32Params(), 5.0e-5), (InitFloat64Params(), 5.0e-5)] ) class TestBlkDiagPrecondLO: def test_BlkDiagPrecondLO_mult_qu(self, initfloat, rtol):