Skip to main content

Development facilities for the bolt environment

Project description

Integrity

GitHub Actions PyPI PyPI - Python Version Code style: black Discord

Development facilities for the bolt environment

from integrity import Component

from ./settings import settings
from ./blocks import blocks
from ./player import player

main = Component()

function main.on("main"):
    if score settings.data.activated obj matches 1:
        main.run("active")

function main.on("active"):
    as @a at @s:
        player.run("main")

function blocks.on("placed_by_player"):
    if block ~ ~ ~ stone expand:
        say Placed stone!
        player.run("placed_stone")

Installation

The package can be installed with pip. Note, you must have both beet and mecha installed to use this package.

$ pip install integrity

Getting Started

To use this package, we must add the plugin to the require section in the beet project file alongside with mecha and bolt.

require:
    - bolt
    - integrity
pipeline:
    - mecha

Now that we've enabled integrity, we can import the module directly inside a bolt script

from integrity import Component

foo = Component("foo")

Features

  • Components

Contributing

Contributions are welcome. Make sure to first open an issue discussing the problem or the new feature before creating a pull request. The project uses poetry.

$ poetry install

You can run the tests with poetry run pytest.

$ poetry run pytest

The project must type-check with pyright. If you're using VSCode the pylance extension should report diagnostics automatically. You can also install the type-checker locally with npm install and run it from the command-line.

$ npm run watch
$ npm run check

The code follows the black code style. Import statements are sorted with isort.

$ poetry run isort bolt_expressions examples tests
$ poetry run black bolt_expressions examples tests
$ poetry run black --check bolt_expressions examples tests

License - MIT

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

integrity-0.9.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

integrity-0.9.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file integrity-0.9.0.tar.gz.

File metadata

  • Download URL: integrity-0.9.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.5

File hashes

Hashes for integrity-0.9.0.tar.gz
Algorithm Hash digest
SHA256 25cd7be964de1d2f13e4772f9744bf7a0c136f06713986601639856da2daf238
MD5 ceb29927f3a3b2823ca9c62c0fec952f
BLAKE2b-256 38c96cecc3f5a0463517f30b744cd32d0849682a73306f4d3a195a25ab175bbd

See more details on using hashes here.

File details

Details for the file integrity-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: integrity-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.5

File hashes

Hashes for integrity-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b2b04fa5ba8a4a1c9dfa5094f2898f3653e07d9d27601ac28323e8f106bbf2c
MD5 206f797e78fc91a77678f56e2bd66495
BLAKE2b-256 fcb373c3fe947d541c7c8e2f192f0a72289e07c64cc532d9fed8176befd0157a

See more details on using hashes here.

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