Skip to content

Commit

Permalink
YAML based notation (#156)
Browse files Browse the repository at this point in the history
* add rtmidi install option

* replace Makefile with Taskfile

* switch to YAML-based notation

* add lint stage to ci

* support merge_voices

* fix notation tests

* store voice_time info in .time attribute in last_message

* refactor

* fix last bar wrong notes https://gitlab.tandav.me/tandav/notes/-/issues/5930

* support continuing voices from previous bar

https://gitlab.tandav.me/tandav/notes/-/issues/5896

* fix pre-commit

* Fix notation player cli

https://gitlab.tandav.me/tandav/notes/-/issues/5931

* add RootTranspose event

https://gitlab.tandav.me/tandav/notes/-/issues/5929

* gitlab parallel using needs
  • Loading branch information
tandav authored Jan 27, 2024
1 parent 0488533 commit 98d9cac
Show file tree
Hide file tree
Showing 38 changed files with 1,134 additions and 341 deletions.
14 changes: 13 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
stages:
# - build
- test

variables:
Expand All @@ -14,13 +15,13 @@ cache:

test:
stage: test
needs: []
tags:
- u61
- docker
image: python:3.12
script:
- pip install .[dev]
- pre-commit run --all-files
- pytest --cov musiclib --cov-report term --cov-report xml --junitxml report.xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
Expand All @@ -31,3 +32,14 @@ test:
coverage_format: cobertura
path: coverage.xml
junit: report.xml

lint:
stage: test
needs: []
tags:
- u61
- docker
image: python:3.12
script:
- pip install .[dev]
- pre-commit run --all-files
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ repos:
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies: [svg.py, numpy]
additional_dependencies:
- svg.py
- numpy
- types-PyYAML

# - repo: https://github.com/RobertCraigie/pyright-python
# rev: v1.1.327
Expand Down
30 changes: 0 additions & 30 deletions Makefile

This file was deleted.

22 changes: 22 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3'

tasks:
test:
desc: Run tests
cmds:
- pytest

bumpver:
desc: 'Bump version. Pass --<part>. Usage example: task bumpver -- --minor'
cmds:
- bumpver update --no-fetch {{.CLI_ARGS}}

bumpver-dev-start:
desc: 'Bump version to start new dev cycle. Pass --<part>. Usage example: task bumpver-dev-start -- --minor'
cmds:
- bumpver update --no-fetch --tag dev --no-commit --no-tag-commit {{.CLI_ARGS}}

bumpver-dev-stop:
desc: 'Bump version to stop dev cycle. --<part> is not passed. Usage example: task bumpver-dev-stop'
cmds:
- bumpver update --no-fetch --tag final --no-commit --no-tag-commit
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ dependencies = [
"mido>=1.3.0",
"svg.py",
"numpy",
"PyYAML",
"pydantic>=2.5",
]

[project.optional-dependencies]
Expand All @@ -25,6 +27,10 @@ dev = [
"pytest-cov",
]

rtmidi = [
"python-rtmidi",
]

[project.urls]
source = "https://github.com/tandav/musiclib"
# docs = "https://tandav.github.io/musiclib"
Expand Down
Loading

0 comments on commit 98d9cac

Please sign in to comment.