Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[run]
source = cosmicfishpie
omit =
venv/*

[report]
exclude_lines =
pragma: no cover
def __repr__
raise NotImplementedError
if __name__ == .__main__.:
32 changes: 31 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,34 @@ jobs:
pip install .[dev]
- name: Run tests
run: |
pytest
pytest
- name: coverage.py badge
uses: tj-actions/coverage-badge-py@v2.0.3
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files
with:
files: coverage.svg
- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add coverage.svg
git commit -m "Updated coverage.svg"
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.github_token }}
branch: ${{ github.ref }}
- name: Re-pull on failure
if: ${{ failure() }}
run: git pull origin ${{ github.ref }} --autostash --rebase -X ours
- name: Re-push on failure
if: ${{ failure() }}
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1.0.8 : Overview documentation and initial tests
1.1.0 : Implemented symbolic as a new boltzmann solver class. Fixes of feedback prints. More docstrings.
1.1.1 : Resolved gcsp bias bug, new test suite.
1.1.2 : Coverage badge
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# cosmicfishpie

[![Documentation Status](https://readthedocs.org/projects/cosmicfishpie/badge/?version=latest)](https://cosmicfishpie.readthedocs.io/en/latest/?badge=latest)

[![Coverage Status](./coverage-badge.svg?dummy=8484744)](./coverage_reports/index.html)
![Coverage](./coverage.svg)

<div align="center">
<img src="https://github.com/santiagocasas/cosmicfishpie/assets/6987716/1816b3b7-0920-4a2c-aafd-9c4ba1dc3e2b" width="280">
Expand Down
21 changes: 21 additions & 0 deletions coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ dev = [
"sphinx-autodoc-typehints==1.23.3",
"sphinx_rtd_theme>=1.0",
"packaging",
"camb"
"camb",
"colossus",
"symbolic-pofk@git+https://github.com/DeaglanBartlett/symbolic_pofk.git"
]

[project.scripts]
Expand Down
10 changes: 10 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[pytest]
testpaths =
tests
addopts =
--cov=cosmicfishpie
--cov-report=xml
--log-cli-level=ERROR
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from cosmicfishpie.fishermatrix import cosmicfish as cff

code_to_use = "camb"
code_to_use = "symbolic"


@pytest.fixture(scope="module")
Expand Down
Loading