-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 chore: prepare repository for PyPI release (#332)
- Loading branch information
Showing
1,007 changed files
with
2,032 additions
and
1,795 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: ❓ Question | ||
url: https://github.com/mcbookshelf/Bookshelf/discussions | ||
url: https://github.com/mcbookshelf/bookshelf/discussions | ||
about: Please ask questions here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 🚀 Publish Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pdm-project/setup-pdm@v4 | ||
- name: Publish package distributions to PyPI | ||
run: pdm publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ __pycache__/ | |
*~ | ||
*$py.class | ||
build/ | ||
dist/ | ||
docs/_build/ | ||
env.bak/ | ||
env/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""Bookshelf is a modular library for building Minecraft datapacks. | ||
It provides a wide range of modules that can be used individually, | ||
giving developers the flexibility to pick only the features they need. | ||
""" | ||
|
||
from bookshelf.definitions import MC_VERSIONS, VERSION | ||
|
||
|
||
def version() -> str: | ||
"""Get the current version of Bookshelf.""" | ||
return VERSION | ||
|
||
def mc_versions() -> list[str]: | ||
"""Get Minecraft versions compatible with the current Bookshelf version.""" | ||
return MC_VERSIONS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import sys | ||
|
||
from . import mc_versions, version | ||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) > 1: | ||
command = sys.argv[1] | ||
if command == "version": | ||
print(str(version())) # noqa: T201 | ||
elif command == "mc_versions": | ||
print(str(mc_versions())) # noqa: T201 | ||
else: | ||
print(f"Unknown command: {command}") # noqa: T201 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from collections.abc import Callable | ||
from functools import cache | ||
|
||
from beet import Context, subproject | ||
|
||
from bookshelf.definitions import MODULES_DIR | ||
|
||
__path__ = "" | ||
|
||
@cache | ||
def __getattr__(name: str) -> Callable[[Context], None]: | ||
def plugin(ctx: Context) -> None: | ||
"""Require a bundle of modules.""" | ||
config = {"directory": f"{MODULES_DIR}/@{name}", "extend": "module.json"} | ||
ctx.require(subproject(config)) | ||
return plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Commands for the Bookshelf Library.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.