{"id":13817142,"url":"https://github.com/misode/gaia-beet","last_synced_at":"2025-03-18T20:30:47.363Z","repository":{"id":37789439,"uuid":"472117733","full_name":"misode/gaia-beet","owner":"misode","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-16T21:23:19.000Z","size":289,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T12:07:31.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/misode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-20T22:25:54.000Z","updated_at":"2023-09-11T20:11:13.000Z","dependencies_parsed_at":"2022-06-23T21:10:19.249Z","dependency_job_id":null,"html_url":"https://github.com/misode/gaia-beet","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":"mcbeet/plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misode%2Fgaia-beet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misode%2Fgaia-beet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misode%2Fgaia-beet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misode%2Fgaia-beet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misode","download_url":"https://codeload.github.com/misode/gaia-beet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243950792,"owners_count":20373664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T06:00:35.117Z","updated_at":"2025-03-18T20:30:46.995Z","avatar_url":"https://github.com/misode.png","language":"Python","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# gaia-beet\n\n[![GitHub Actions](https://github.com/misode/gaia/workflows/CI/badge.svg)](https://github.com/misode/gaia-beet/actions)\n[![PyPI](https://img.shields.io/pypi/v/gaia-beet.svg)](https://pypi.org/project/gaia-beet/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gaia-beet.svg)](https://pypi.org/project/gaia-beet/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![Discord](https://img.shields.io/discord/900530660677156924?color=7289DA\u0026label=discord\u0026logo=discord\u0026logoColor=fff)](https://discord.gg/98MdSGMm8j)\n\n\u003e Beet plugin to generate Minecraft worldgen files\n\n## Introduction\n\nWriting density functions in JSON by hand can be tiring and confusing. This package allows you to write them as natural looking expressions.\n\n```py\ngaia.df(\"basic:foo\", abs(const(4) ** 3) + ref(\"basic:bar\"))\n```\n\n## Installation\n\nThe package can be installed with `pip`.\n\n```bash\n$ pip install gaia-beet\n```\n\n## Getting started\n\nWhen using with [`beet`](https://github.com/mcbeet/beet), a simple `beet.yml` is enough:\n```yaml\noutput: out\npipeline:\n  - main\n```\n\nThis references a `main.py` plugin file where the density functions will be defined:\n```py\nfrom beet import Context\nfrom gaia_beet import Gaia\nfrom gaia_beet.density_functions import *\n\ndef beet_default(ctx: Context):\n    gaia = ctx.inject(Gaia)\n\n    blah = slide(const(2))\n\n    foo = gaia.df(\"basic:foo\", abs(const(4) ** 3) + blah)\n\n    gaia.df(\"basic:bar\", blah * foo)\n```\n\nThen install beet and run the watch command:\n```bash\n$ pip install beet\n$ beet watch\n```\n\n## Contributing\n\nContributions 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`](https://python-poetry.org).\n\n```bash\n$ poetry install\n```\n\nYou can run the tests with `poetry run pytest`.\n\n```bash\n$ poetry run pytest\n```\n\nThe project must type-check with [`pyright`](https://github.com/microsoft/pyright). If you're using VSCode the [`pylance`](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance) extension should report diagnostics automatically. You can also install the type-checker locally with `npm install` and run it from the command-line.\n\n```bash\n$ npm run watch\n$ npm run check\n```\n\nThe code follows the [`black`](https://github.com/psf/black) code style. Import statements are sorted with [`isort`](https://pycqa.github.io/isort/).\n\n```bash\n$ poetry run isort gaia_beet examples tests\n$ poetry run black gaia_beet examples tests\n$ poetry run black --check gaia_beet examples tests\n```\n\n---\n\nLicense - [MIT](https://github.com/misode/gaia-beet/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisode%2Fgaia-beet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisode%2Fgaia-beet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisode%2Fgaia-beet/lists"}