Skip to content

Commit

Permalink
Add code coverage badge through coverage.py (#63)
Browse files Browse the repository at this point in the history
* add code coverage badge thru pre-commit

* update pre-commit config

* linting post pre-commit updates

* add poetry setup for pre-commit runs in ci
  • Loading branch information
d33bs authored Jul 30, 2024
1 parent 5451acb commit 2172952
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 57 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Setup for poetry
run: |
python -m pip install poetry
- name: Install environment
run: poetry install --no-interaction --no-ansi
- uses: pre-commit/[email protected]
run_tests:
strategy:
Expand Down
26 changes: 22 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ repos:
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: |
(?x)^(
.*\.svg
)$
- id: check-yaml
- id: check-added-large-files
- id: detect-private-key
- repo: https://github.com/python-poetry/poetry
rev: "1.5.1"
rev: "1.8.0"
hooks:
- id: poetry-check
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
exclude: |
Expand All @@ -41,11 +45,25 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/rhysd/actionlint
rev: v1.7.0
rev: v1.7.1
hooks:
- id: actionlint
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.4"
rev: "v0.5.5"
hooks:
- id: ruff
- id: ruff-format
- repo: local
hooks:
- id: code-cov-gen
name: Generate code coverage
language: system
entry: poetry run coverage run -m pytest
pass_filenames: false
always_run: true
- repo: https://github.com/Weird-Sheep-Labs/coverage-pre-commit
rev: 0.1.1
hooks:
- id: coverage-xml
- id: coverage-badge
args: ["-o", "media/coverage-badge.svg"]
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<img height="200" src="https://raw.githubusercontent.com/WayScience/coSMicQC/main/logo/with-text-for-light-bg.png?raw=true">
<img height="200" src="https://raw.githubusercontent.com/WayScience/coSMicQC/main/media/logo/with-text-for-light-bg.png?raw=true">

# Single cell Morphology Quality Control

![PyPI - Version](https://img.shields.io/pypi/v/cosmicqc)
[![Build Status](https://github.com/WayScience/coSMicQC/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/WayScience/coSMicQC/actions/workflows/run-tests.yml?query=branch%3Amain)
![Coverage Status](./media/coverage-badge.svg)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
![PyPI - Version](https://img.shields.io/pypi/v/cosmicqc)

> :stars: Navigate the cosmos of single-cell morphology with confidence — coSMicQC keeps your data on course!
Expand Down Expand Up @@ -35,6 +36,7 @@ pip install git+https://github.com/WayScience/coSMicQC.git
## Contributing, Development, and Testing

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more details on contributions, development, and testing.

## References

- [pycytominer](https://github.com/cytomining/pycytominer)
Expand Down
11 changes: 0 additions & 11 deletions logo/source/index.html

This file was deleted.

1 change: 1 addition & 0 deletions media/coverage-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 2172952

Please sign in to comment.