Skip to main content

Library to handle elections with trichotomous preferences

Project description

trivoting

Python library for trichotomous voting.

Documentation

The complete documentation is available here. It includes

Development

We are more than happy to receive help with the development of the package. If you want to contribute, here are some elements to take into account.

First, install the development dependencies by running the following command:

pip install -e ".[dev]"

You can run the unit tests with the following:

python -m unittest

The doc is generated using sphinx. We use the numpy style guide. The napoleon extension for Sphinx is used and the HTML style is defined by the Book Sphinx Theme.

To generate the doc, first move inside the docs-source folder and run the following:

make clean 
make html

This will generate the documentation locally (in the folder docs-source/build). If you want the documentation to also be updated when pushing, run:

make githubclean
make github

After having pushed, the documentation will be automatically deployed to the GitHub page.

Note that a large part of the documentation is done by hand (to ensure proper display and correct ordering). This means that if you create new class of functions that should appear in the documentation, you may have to add they yourself using to autodoc directives (take inspiration from the files in docs-source/source).

GitHub Workflow

Publishing on PyPI

The pipeline between GitHub and PyPI is automatised. To push a new version do the following:

  • Update the pyproject.toml with the new version number.
  • Update the trivoting/__init__.py with the new version number.
  • On GitHub, create a new release tagged with the new version number (only admins can do that), on this page.
  • You're done, the new version of the package is automatically pushed to PyPI after the creation of a GitHub release.

Building the Docs

If the docs-source has been updated but the docs/ folder has not, you can build the docs via a GitHub action here: https://github.com/COMSOC-Community/trivoting/actions/workflows/docs.yml. Simply click "Run workflow" and the docs will be built and the built files will be pushed back to the server.

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

trivoting-0.0.4.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

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

trivoting-0.0.4-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file trivoting-0.0.4.tar.gz.

File metadata

  • Download URL: trivoting-0.0.4.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trivoting-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e8dc77dd07d20e6c6122b0696ba494a7b7ecf1781271b924936f9dec343a0df2
MD5 6e4d3e7c324017bcccbb5e6b8a0f6945
BLAKE2b-256 b5e123e924cb3d61512b5949c33aa44d6b55483c55c59b1b77c2b5a53a8e35f0

See more details on using hashes here.

File details

Details for the file trivoting-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: trivoting-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trivoting-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0f3adaa573dbf3ad41217dea76491fc907c0f7800b9abc7cffe9978fbef5c2f6
MD5 7a58e99bcf06727ba762a253aa2ace29
BLAKE2b-256 7aa56d5e7574de9b309ea8eacbef76bc3a2260b9ea9e180616543e7d64106e86

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