Skip to content

Commit

Permalink
Update README.md (#131)
Browse files Browse the repository at this point in the history
* Update README.md

add badge for publish pipeline

* replace custom coverage badge job with codecov provided solution

* change format to xml
  • Loading branch information
pmayd authored Jul 1, 2024
1 parent 82c30b0 commit ec04c87
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,15 @@ jobs:
run: poetry run mypy src

sphinx-documentation-and-coverage:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
name: Sphinx Documentation and Test Coverage
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["${{ vars.PYTHON_VERSION}}"]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ vars.PYTHON_VERSION}}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ vars.PYTHON_VERSION}}
- name: Run poetry image
uses: abatilo/actions-poetry@v3.0.0
with:
Expand All @@ -117,15 +112,10 @@ jobs:
retention-days: 5
- name: Generate and filter test coverage report
run: |
poetry run coverage run -m pytest --vcr-record=none tests
poetry run coverage json -o assets/coverage.json
cov=$(jq -r '.totals.percent_covered_display' assets/coverage.json)
echo "{\"label\":\"Test Coverage\",\"message\":\"${cov}%\",\"schemaVersion\":1,\"color\":\"hsl(120, 100%, 40%)\"}" > assets/coverage_badge.json
# compromise: Due to versioning issues, only display
# coverage (report) for main (on/push/branches/main)
- name: Prepare files
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
set -e
mkdir -p output/publish
cp assets/coverage_badge.json output/publish/
poetry run pytest --cov=src/pystatis --cov-report=xml --vcr-record=none tests
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4.2.0
with:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
![Code Coverage](https://img.shields.io/endpoint?url=https%3A%2F%2Fcorrelaid.github.io%2Fpystatis%2Fpublish%2Fcoverage_badge.json
)
![GitHub Pages Documentation](https://github.com/CorrelAid/pystatis/actions/workflows/deploy-docs.yaml/badge.svg?event=push)
[![Release to PyPI](https://github.com/CorrelAid/pystatis/actions/workflows/release-to-pypi.yaml/badge.svg)](https://github.com/CorrelAid/pystatis/actions/workflows/release-to-pypi.yaml)

```pystatis``` is a Python wrapper for the different GENESIS web service interfaces (API). Currently we are supporting the following databases:
``pystatis`` is a Python wrapper for the different GENESIS web service interfaces (API). Currently we are supporting the following databases:

- [GENESIS-Online](https://www-genesis.destatis.de/genesis/online)
- [Regionaldatenbank](https://www.regionalstatistik.de/genesis/online)
Expand Down

0 comments on commit ec04c87

Please sign in to comment.