commit
a9c0759d0c
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Desktop (please complete the following information):**
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Python Version [e.g. 22]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
@ -0,0 +1,38 @@
|
|||||||
|
name: Pre-commit
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: "lint" # Concurrency group named "lint"
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pre-commit:
|
||||||
|
name: Pre-Commit
|
||||||
|
runs-on: ubuntu-latest # Run the job on the latest version of Ubuntu
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4 # Checkout the repository code
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11" # Set up Python version 3.11 for the job
|
||||||
|
|
||||||
|
# Install Portaudio on Ubuntu
|
||||||
|
- name: Installing Portaudio in Ubuntu
|
||||||
|
run: sudo apt-get install portaudio19-dev python-all-dev
|
||||||
|
|
||||||
|
- name: Install Poetry Package
|
||||||
|
working-directory: 01OS # Set the working directory to "01OS"
|
||||||
|
run: |
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install poetry==1.3.2
|
||||||
|
poetry config virtualenvs.create false
|
||||||
|
poetry install --no-interaction --with dev
|
||||||
|
|
||||||
|
- name: Run Pre-commit
|
||||||
|
run: pre-commit run --all-files
|
@ -0,0 +1,61 @@
|
|||||||
|
name: Run Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
# push: # Trigger the workflow on push events
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: "test"
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pytest:
|
||||||
|
name: Run Test
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
python-version: ["3.11"]
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: 01OS
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install poetry
|
||||||
|
run: pipx install poetry
|
||||||
|
|
||||||
|
- name: Setup Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
cache: "poetry"
|
||||||
|
|
||||||
|
# Install Portaudio on Ubuntu
|
||||||
|
- name: Installing Portaudio in Ubuntu
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
run: sudo apt-get install portaudio19-dev python-all-dev
|
||||||
|
|
||||||
|
# Install Portaudio on macOS using Homebrew
|
||||||
|
- name: Installing Portaudio in Mac
|
||||||
|
if: matrix.os == 'macos-latest'
|
||||||
|
run: brew install portaudio
|
||||||
|
|
||||||
|
# Install Poetry and project dependencies
|
||||||
|
- name: Install Poetry Package
|
||||||
|
run: |
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install poetry==1.3.2
|
||||||
|
poetry config virtualenvs.create false
|
||||||
|
poetry install --no-interaction --with dev
|
||||||
|
|
||||||
|
# Run pytest
|
||||||
|
- name: Run Pytest
|
||||||
|
run: poetry run pytest tests
|
@ -0,0 +1,26 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
|
rev: "v0.2.2"
|
||||||
|
hooks:
|
||||||
|
- id: ruff
|
||||||
|
args: ["--fix"]
|
||||||
|
- id: ruff-format
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.5.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: fix-encoding-pragma
|
||||||
|
args: [--remove]
|
||||||
|
- id: check-yaml
|
||||||
|
- id: debug-statements
|
||||||
|
language_version: python3
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: pytest
|
||||||
|
name: pytest
|
||||||
|
entry: pytest 01OS/tests
|
||||||
|
language: system
|
||||||
|
types: [python]
|
||||||
|
pass_filenames: false
|
||||||
|
always_run: true
|
@ -0,0 +1,7 @@
|
|||||||
|
def hello_world():
|
||||||
|
return "Hello, World!"
|
||||||
|
|
||||||
|
|
||||||
|
# A test function to assert that hello_world() returns the expected string
|
||||||
|
def test_hello_world():
|
||||||
|
assert hello_world() == "Hello, World!"
|
Loading…
Reference in new issue