Skip to content

Commit

Permalink
Merge pull request #6 from pomponchik/develop
Browse files Browse the repository at this point in the history
0.0.5
  • Loading branch information
pomponchik authored Jul 20, 2024
2 parents 91dcfc9 + 9da67b7 commit 0ed181e
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 6 deletions.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

## Description

Replace this text with a short description of the error and the behavior that you expected to see instead.


## Describe the bug

Please add this test in such a way that it reproduces the bug you found and does not pass:

```python
def test_your_bug():
...
```

To write tests, please keep compatibility with the [`pytest`](https://docs.pytest.org/) framework.

If for some reason you cannot describe the error in the test format, describe here the steps to reproduce it.


## Environment
- OS: ...
- Python version (the output result of the `python --version` command): ...
9 changes: 6 additions & 3 deletions .github/workflows/tests_and_coverage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: New tests

on:
push
Expand All @@ -9,8 +9,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -43,3 +43,6 @@ jobs:
find . -iregex "codecov.*"
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
- name: Run tests and show the branch coverage on the command line
run: coverage run --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m
48 changes: 48 additions & 0 deletions .github/workflows/tests_and_coverage_old.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Old tests

on:
push

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest, windows-latest]
python-version: ['3.7']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install the library
shell: bash
run: pip install .

- name: Install dependencies
shell: bash
run: pip install -r requirements_dev.txt

- name: Print all libs
shell: bash
run: pip list

- name: Run tests and show coverage on the command line
run: coverage run --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m

- name: Upload reports to codecov
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
if: runner.os == 'Linux'
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
find . -iregex "codecov.*"
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
- name: Run tests and show the branch coverage on the command line
run: coverage run --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![logo](https://raw.githubusercontent.com/pomponchik/metronomes/develop/docs/assets/logo_2.svg)
![logo](https://raw.githubusercontent.com/pomponchik/metronomes/main/docs/assets/logo_2.svg)

[![Downloads](https://static.pepy.tech/badge/metronomes/month)](https://pepy.tech/project/metronomes)
[![Downloads](https://static.pepy.tech/badge/metronomes)](https://pepy.tech/project/metronomes)
Expand Down Expand Up @@ -73,7 +73,7 @@ At the same time, it may be important to you that even if in some cases the func

## Basic usage

The metronome object has 2 main methods: `start()` and `stop()`. Calling the `start()` method starts an additional thread, inside which the passed function starts running regularly in the loop. At the same time, the main stream can continue and, when it's necessary, stop the metronome calling the `stop()` method. Often, a metronome can be used for background notifications that are called during the execution of other code:
The metronome object has 2 main methods: `start()` and `stop()`. Calling the `start()` method starts an additional thread, inside which the passed function starts running regularly in the loop. At the same time, the main thread can continue and, when it's necessary, stop the metronome calling the `stop()` method. Often, a metronome can be used for background notifications that are called during the execution of other code:

```python
from metronomes import Metronome
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = 'metronomes'
version = '0.0.4'
version = '0.0.5'
authors = [
{ name='Evgeniy Blinov', email='[email protected]' },
]
Expand Down

0 comments on commit 0ed181e

Please sign in to comment.