Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libmei #3935

Merged
merged 7 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions libmei/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
LibMEI
------

LibMEI is a C++ library for reading and writing [MEI](http://music-encoding.org) files
LibMEI is a C++ library for reading and writing [MEI](https://music-encoding.org/) files

It was originally developed by the [Distributed Digital Music Archives and Libraries Lab](http://ddmal.music.mcgill.ca/) at the Schulich School of Music at McGill University, Montréal, Canada
It was originally developed by the [Distributed Digital Music Archives and Libraries Lab](https://ddmal.music.mcgill.ca/) at the Schulich School of Music at McGill University, Montréal, Canada

This is a modified version that is used for generating C++ code for Verovio.

Expand All @@ -22,17 +22,29 @@ Compilation & Usage
To install you can use Python `poetry` which will create a virtual environment and automatically
install the necessary dependencies. The first time you get things set up, from the `libmei` directory run:

$> poetry install
```shell
poetry install
```

This will set up a virtual environment for you. When you want to activate the environment, run

$> poetry shell
```shell
poetry env activate
```

This allows you to run Python with all the necessary dependencies for running the libmei scripts.
This will show you the command to activate the virtual environment.

To generate the code, activate the poetry environment and, from the `libmei` directory, run:

$> python3 tools/parseschema2.py ./mei/mei-verovio_compiled.odd
```shell
python3 tools/parseschema2.py ./mei/mei-verovio_compiled.odd
```

If you don't want to activate the virtual environment manually, use:

```shell
poetry run python3 tools/parseschema2.py ./mei/mei-verovio_compiled.odd
```

Where the positional argument points to an ODD file for which you wish to generate code.

Expand Down
10 changes: 6 additions & 4 deletions libmei/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 17 additions & 9 deletions libmei/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
[tool.poetry]
[project]
name = "libmei"
version = "0.1.0"
description = ""
authors = ["Andrew Hankinson <andrew.hankinson@gmail.com>"]
dependencies = [
"pyyaml (>=6.0)",
"lxml (>=5.3.0)",
]
requires-python = ">=3.9"
description = "LibMEI is a C++ library for reading and writing MEI files"
authors = [
{name = "Andrew Hankinson", email="andrew.hankinson@gmail.com"},
]
readme = "README.md"
license = "MIT"

[tool.poetry.dependencies]
python = "^3.9"
pyyaml = "^6.0"
lxml = "^5.3.0"

[tool.poetry]
package-mode = false

[build-system]
requires = ["poetry-core"]
requires = ["poetry-core>=2.0"]
build-backend = "poetry.core.masonry.api"

[tool.ruff]
line-length = 120
Loading