Repository: lanl/fiducia (language: python)

Issue:
Code coverage
Generate pytest and hypothesis testing code coverage reports. Publish as badges under the README file.


Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index 200deca..d0edb9a 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,13 @@
 # fiducia
 
 [![Documentation Status](https://readthedocs.org/projects/fiducia/badge/?version=latest)](https://fiducia.readthedocs.io/en/latest/?badge=latest)
-[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](./LICENSE.md)
+[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://fiducia.readthedocs.io/en/latest/license.html)
+[![GitHub Actions — CI](https://github.com/lanl/fiducia/workflows/CI/badge.svg)](https://github.com/lanl/fiducia/actions?query=workflow%3ACI+branch%3Amain)
 
 FIDUCIA (C20073): Filtered Diode Unfolder (using) Cubic-spline Algorithm
 
-This is a DANTE signal deconvolver based on the [cubic splines method](https://doi.org/10.1063/5.0002856). 
-Given time-resolved DANTE data, this code can produce time-resolve x-ray 
+This is a diode array signal deconvolver based on the [cubic splines method](https://doi.org/10.1063/5.0002856). 
+Given time-resolved diode data (e.g. Dante), this code can produce time-resolve x-ray 
 spectra, and radiation temperatures. Functionality is described in [Fiducia's online documentation](https://fiducia.readthedocs.io/).
 
 
diff --git a/setup.py b/setup.py
index 5fe69d0..4dcda36 100644
--- a/setup.py
+++ b/setup.py
@@ -20,8 +20,8 @@
     long_description = f.read()
 
 setup(name='fiducia',
-      version='0.2.2',
-      description='DANTE data unfolder using cubic-spline algorithm',
+      version='0.2.3',
+      description='Filtered Diode Unfolder (using) Cubic-spline Algorithm',
       long_description=long_description,
       long_description_content_type='text/markdown',
       url='https://github.com/lanl/fiducia',


Test patch:
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
new file mode 100644
index 0000000..e581cdd
--- /dev/null
+++ b/.github/workflows/testing.yml
@@ -0,0 +1,45 @@
+name: CI
+
+on:
+  push:
+    branches:
+      - main
+      - v0.*.x
+    tags:
+      - "v*"
+  pull_request:
+
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version: [3.7, 3.8]
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip setuptools wheel
+        pip install -r requirements.txt
+    - name: Test with pytest
+      run: |
+        pip install pytest hypothesis
+        pip install pytest-cov
+        pytest --cov=./ --cov-report=xml
+    - name: Upload pytest results to codecov
+      uses: codecov/codecov-action@v1
+      if: always()
+      with:
+        token: ${{ secrets.CODECOV_TOKEN }}
+        file: ./coverage.xml
+    - name: Lint with flake8
+      run: |
+        pip install flake8
+        flake8 .