Skip to main content

PyCantus: A Python library designed to enhance accessibility of Gregorian chants for both coders and non-coders.

Project description

PyCantus

PyCantus is envisioned as a Python API to the Cantus family of databases that makes it easy to use this data for computational processing. Primarily we intend this to be used for research in digital chant scholarship, but of course it can be used to build chant-centric apps, new websites, extract data for comparative studies across different repertoires, study liturgy, etc.

The CantusCorpus v1.0 dataset, containing data from the Cantus Index, can be used with the PyCantus library easily.

Finally, Django template of web API providing easier creation of YAML filtration setups called Filter for PyCantus was implemented while also being deployed at https://filterforpycantus.owx.cz.

Data model

At the heart of the library is the Cantus Database and Cantus Index data model. The two elementary objects in this model are a Chant, and a Source.

  • A Chant is one instance of a chant in a source. Typically it has a text, a melody (which is not necessarily transcribed), and a Cantus ID assigned, and it should link to a source in which it is found. In principle it uses fields from the API defined by Cantus Index; the exact data model is documented in the module.
  • A Source is a physical manuscript or print that contains Gregorian chant. Primarily, this will be a liturgical book such as an antiphonary, gradual, or other types of books. Fragments are also sources. Provenance (geographical and institutional) and century of origin metadata are carried by source records.

There are two further important classes in the data model: Melody, and Corpus.

  • A Melody contains the chant's melody at various levels of representation.
  • A Corpus contains a dataset composed of sources and chants (that may have melodies). Filtering is done on Corpus objects.

Here we have full UML schema of the data model:

Full UML PyCantus data model schema..

User documentation

We realize that two types of users come together at a library of this type – a group of programmers who are getting into Gregorian chant, and then (hopefully) a group of chant experts who are getting into its computer processing. Therefore, be warned that, quite inevitably, when examining the user documentation, each group will encounter things that are obvious to them, but that is fine, as these parts are there precisely for "the others."

Introduction for Computer Science people

In the documentation (docs\source folder) we attempted to compile some basic overview information about Gregorian chant (intro_to chant.md), that is a 'nice to have' before getting into work with the material. It should also serve as a cheat sheet for basic terms and concepts.
(Rendered 'easy to read' version can be reached from docs\build\html\index.html entry point when opened in any web browser.)

Tutorials

For an introduction to using PyCantus, run the tutorials\01_intro_to_pycantus.ipynb Jupyter notebook.

For more advanced and specific tasks there are four other tutorials in the tutorials folder, one describing some basics about the data (especially how to work with melodies) for Gregorian chant beginners (02_intro_to_chant_data.ipynb), two working with repertoire (03_repertoire_traditions.ipynb and 04_unseen_species.ipynb) and one showing research on melodies (05_melody_classification.ipynb).
They would show you more possibilities in using PyCantus and hopefully also possibilities in Gregorian chant research in general.

All these tutorials expect basic Python knowledge, if you feel weak about your Python programming skills, please, go through some of the many online tutorials available for Python..

Development documentation

Development documentation can be found in docs\source folder under development_docs.md.

Standard generated docstrings documentation can be found from docs\build\html\index.html entry point when opened in any web browser.

Installing PyCantus library locally

  1. Clone the repository:

    git clone https://github.com/dact-chant/PyCantus

  2. Go to the root directory of the project (the one where pyproject.toml is)

  3. Run the following command:

    pip install .

  4. Import the pycantus library and verify it works:

    from pycantus import hello_pycantus
    hello_pycantus()
    

About project

PyCantus is being developed under the Digital Analysis of Chant Transmission (DACT). This project, funded by the Social Sciences and Humanities Research Council of Canada, aims to advance the study of chant dissemination using computational tools.

Explore more about the project, its goals and contacts on our homepage.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycantus-1.1.0.tar.gz (10.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycantus-1.1.0-py3-none-any.whl (37.6 MB view details)

Uploaded Python 3

File details

Details for the file pycantus-1.1.0.tar.gz.

File metadata

  • Download URL: pycantus-1.1.0.tar.gz
  • Upload date:
  • Size: 10.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for pycantus-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fefd12b317dad25f75de8b9400d1bd55c108f32805e2c4af53f7101e3aabd5fe
MD5 8dcb414434d340b25a1c16665782cc00
BLAKE2b-256 d7139a77e8029587cb1f840dd5cf9e7f9390c67498a2fcad71f6db187fddb0aa

See more details on using hashes here.

File details

Details for the file pycantus-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycantus-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for pycantus-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9802a65198e2821677c9a6516e6bc6523ad945261b5f2d86eb6141d29861ab1a
MD5 53090504f8fb08e6f78e1fd443b487e6
BLAKE2b-256 203eaa651781c103e903919eea52d03b254bfb53dbc89c3dbc46b8945399d706

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page