Skip to content

Commit

Permalink
Merge pull request #18 from dylanljones/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dylanljones authored Feb 2, 2022
2 parents 8c8c6a0 + a212339 commit d4969b6
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 8 deletions.
37 changes: 37 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# .coveragerc to control coverage.py
[run]
branch = False
source = dqmc

[report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about debug-only code and print statements:
def __repr__
def __str__

# Don't complain about abstract methods
@abstract
@njit

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

ignore_errors = True

# Skip source files:
omit =
dqmc/tests/*
dqmc/__init__.py
dqmc/__main__.py
dqmc/mfuncs.py
dqmc/data.py
dqmc/logging.py
dqmc/_version.py
15 changes: 11 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,18 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest pytest-cov codecov
pip install -r requirements.txt
- name: Build Fortran source code
run: |
make
- name: Run all tests
- name: Run tests
run: |
pytest dqmc/
pytest dqmc/ --cov=dqmc --cov-report=xml -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: OS,PYTHON
verbose: True
- name: Coverage
run: codecov
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/dylanljones/dqmc)
![GitHub license](https://img.shields.io/github/license/dylanljones/dqmc)

| | | |
|:-------|:-------------------------------------|:--------------------------------------|
| Master | [![Build][build-master]][build-link] | [![Tests][tests-master]][test-link] |
| Dev | [![Build][build-dev]][build-link] | [![Tests][tests-dev]][test-link] |
| | | | |
|:-------|:-------------------------------------|:--------------------------------------|:--------------------------------------------------|
| Master | [![Build][build-master]][build-link] | [![Tests][tests-master]][test-link] | [![Codecov][codecov-master]][codecov-master-link] |
| Dev | [![Build][build-dev]][build-link] | [![Tests][tests-dev]][test-link] | [![Codecov][codecov-dev]][codecov-dev-link] |

[build-master]: https://img.shields.io/github/workflow/status/dylanljones/dqmc/Build/master?label=build&logo=github&style=flat-square
[build-dev]: https://img.shields.io/github/workflow/status/dylanljones/dqmc/Build/dev?label=build&logo=github&style=flat-square
Expand All @@ -16,6 +16,11 @@
[tests-dev]: https://img.shields.io/github/workflow/status/dylanljones/dqmc/Tests/dev?label=tests&logo=github&style=flat-square
[test-link]: https://github.com/dylanljones/dqmc/actions/workflows/test.yml

[codecov-master]: https://img.shields.io/codecov/c/github/dylanljones/dqmc/master?logo=codecov&style=flat-square
[codecov-master-link]: https://app.codecov.io/gh/dylanljones/dqmc/branch/master
[codecov-dev]: https://img.shields.io/codecov/c/github/dylanljones/dqmc/dev?logo=codecov&style=flat-square
[codecov-dev-link]: https://app.codecov.io/gh/dylanljones/dqmc/branch/dev

Efficient and stable Determinant Quantum Monte Carlo (DQMC) simulations of the Hubbard model in Python.

| :warning: **WARNING**: This project is still in development and might contain errors or change significantly in the future! |
Expand Down

0 comments on commit d4969b6

Please sign in to comment.