Skip to content

Commit

Permalink
Merge pull request #65 from winter-telescope/coveralls
Browse files Browse the repository at this point in the history
Coveralls: track code coverage
  • Loading branch information
robertdstein authored Aug 2, 2022
2 parents 5a0300c + 434daae commit 64250db
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 21 deletions.
26 changes: 26 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .coveragerc to control coverage.py
[run]
source = winterdrp

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
raise KeyError
except KeyError
raise ValueError
except JSONDecodeError:
raise requests.exceptions.RequestException

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
14 changes: 7 additions & 7 deletions .github/workflows/continous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ jobs:
env:
OUTPUT_DATA_DIR : /home/runner/
run: |
python -m unittest tests/test_wirc_pipeline.py
coverage run -m unittest discover tests/
# - name: Run Coveralls
# if: ${{ success() }}
# run: |
# coveralls --service=github
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Coveralls
if: ${{ success() }}
run: |
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Echo tag name
# run: echo "Tag is ${{ github.ref }}, Deploy is ${{ startsWith(github.ref, 'refs/tags/') && matrix.python-version == 3.9}}"
Expand Down
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# winter_drp
Requirements and installations -
Sextractor -
1. Download the source code from the repo https://github.com/astromatic/sextractor
2. Follow the instructions here https://sextractor.readthedocs.io/en/latest/Installing.html
3. It will ask you to install all sorts of weird libraries that may or may not be compatible with your device. The configure that worked best for me is without the atlas directories but by using the openblas files instead
./configure --enable-openblas --with-atlas-libdir=/usr/local/opt --with-atlas-incdir=/usr/local/opt/openblas/include
# winterdrp

Instructions for running the focusloop:
1. Download all images to a data directory
2. Download the log file (should be in the format of log_20210625.csv)
3. Run python fix_headers.py --d <data_dir_path> --l <logfilename>
4. Run python focusLoop.py --d <data_dir_path> --plot
This will go through all files in the data directory to check for files that are "focus" files and do the analysis on them, and plot the results in a file named "focusloop.pdf'
[![CI](https://github.com/winter-telescope/winterdrp/actions/workflows/continous_integration.yml/badge.svg)](https://github.com/winter-telescope/winterdrp/actions/workflows/continous_integration.yml)
[![Coverage Status](https://coveralls.io/repos/github/winter-telescope/winterdrp/badge.svg?branch=main)](https://coveralls.io/github/winter-telescope/winterdrp?branch=main)

Open-source modular python package for astronomy image reduction.

in addition to python requirements, winterdrp requires:

* Source-extractor/sextractor
* Swarp
* Scamp

Instructions for .env
1. Copy the `.env.example` file to the root of the project and update the environment variables.
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ astropy[recommended]
astroquery
avro-python3~=1.10.1
confluent_kafka
coveralls
docker
ephem
fastavro
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"astropy[recommended]",
"astroquery",
"avro-python3~=1.10.1",
"coveralls",
"confluent_kafka",
"docker",
"ephem",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_summer_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_pipeline(self):

for key, value in expected_zp.items():
if isinstance(value, float):
self.assertAlmostEqual(value, header[key])
self.assertAlmostEqual(value, header[key], places=2)
elif isinstance(value, int):
self.assertEqual(value, header[key])
else:
Expand Down

0 comments on commit 64250db

Please sign in to comment.