Skip to main content

Graph representation and tools for programming with pentagame

Project description

Python Version Code Style Version GitHub Workflow Status

pentagraph

Graph representation and tools for programming with pentagame. This is in active development an will be fully functional with the 0.0.1 release

Setup

Pip

You will need a working instance of pip.

python3 -m pip install pentagraph

Development

Clone from github (requires git): git clone https://github.com/Penta-Game/pentagraph

To install the dependencies you can use poetry: poetry install

All files are required to have full typing support and need to pass mypy (This is checked in the Python package workflow on push/ pull request).

License

The source code of pentagraph is distributed according to the MIT License by Cobalt

Libraries as listed in pyproject.toml please consider their respective Licenses before e.g. making commercial use of pentagraph.

The same applies for materialize and svg.js.

Development Notes

Contributing and CI

There are 2 github actions workflows. The Python Packge workflow is called on each push & merged pull request. This workflow runs test against the new version (pytest tests/) and checks if files in pentagraph/ could be formatted with black. If either files could be formatted, the tests fail or the requirements are broken, the run fails. For black errors format.py can recursively execute black against all files in pentagraph/ (you need to install black before using this). As an alternative python -m black . --target-version py38 would be an appropriate direct call.

The other workflow releases a new pip package on each github release. This release oriented workflow takes advantage of twine and github repository specific secrets. When this workflow crashes with authentication related errors contact Cobalt.

Dependency managing is handled by poetry. Poetry is also used fo the packaging runs though you should update requirements.txt at least before creating a release with poetry export -f requirements.txt > requirements.txt.

pentagraph.lib.graphic

An easy-to-use way of displaying the Board taking advantage of Flask in combination with materialize, svg.js. The final board svg is created with a variation of resources from boardgame.

pentagraph.lib.figures

Collection of Objects used for figure representation. These Objects also specifiy their respective drawing methods and types.

pentagraph.lib.graph

Graph representation as Board Object.

pentagraph.lib.math

Math usable for graphic representation of pentagame board. Python version of math used in pentagraph.lib.graphic.

Docs

Coming soon :cat:

The docs will be produced with pelican and github pages.

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

pentagraph-0.0.1b5.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

pentagraph-0.0.1b5-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

Supported by

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