Skip to content

Commit 9053480

Browse files
authored
Merge branch 'main' into main
2 parents 912427c + bcfe229 commit 9053480

File tree

12 files changed

+1068
-181
lines changed

12 files changed

+1068
-181
lines changed

.github/workflows/docker-image.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v4
2020
with:
21-
ref: ${{ github.ref_name }}
21+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
2222
fetch-depth: 0
2323

2424
- name: Docker meta

.github/workflows/todo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fetch-depth: 0
2323

2424
- name: "TODO to Issue"
25-
uses: "alstr/[email protected].10"
25+
uses: "alstr/[email protected].12"
2626
with:
2727
CLOSE_ISSUES: true
2828
INSERT_ISSUE_URLS: true

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ config/settings*
160160
# MacOS
161161
.DS_Store
162162

163+
build/
163164
docs-build/
164165
docs/site/
166+
site/
165167

166168
# extensions
167169
tux/extensions/*

.vscode/settings.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
},
2727
"search.exclude": {
2828
".archive/**": true,
29-
"docs-build/**": true
29+
"build/**": true
3030
},
3131
"python.analysis.exclude": [
3232
".archive/**",
33-
"docs-build/**"
33+
"build/**"
3434
],
3535
"python.analysis.diagnosticSeverityOverrides": {
3636
"reportIncompatibleMethodOverride": "none",
@@ -44,6 +44,14 @@
4444
"yaml.schemas": {
4545
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
4646
},
47+
"yaml.customTags": [
48+
"!ENV scalar",
49+
"!ENV sequence",
50+
"!relative scalar",
51+
"tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
52+
"tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
53+
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
54+
],
4755
"[markdown]": {
4856
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
4957
},

DEVELOPER.md

+19-12
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,36 @@ Before you begin, ensure you have the following installed:
2323

2424
Use Poetry to set up a virtual environment and install all project dependencies, including development tools.
2525

26-
Assuming you have Poetry installed and python 3.13.2 installed, activate or create a new virtualenv for the current project:
26+
First, ensure you have Poetry installed. You can install it using the official installer:
2727

2828
```bash
29-
poetry env use 3.13.2
29+
curl -sSL https://install.python-poetry.org | python3 -
3030
```
3131

32-
If you don't have python 3.13.2 installed, you can install it using the following command:
32+
This will install Poetry at `~/.local/bin/poetry`. Add this to your PATH if it's not already there.
33+
34+
```bash
35+
export PATH="$HOME/.local/bin:$PATH"
36+
```
37+
38+
Refer to the [official Poetry documentation](https://python-poetry.org/docs/#installation) for other installation methods.
39+
40+
Next, use Poetry to install the required Python version (e.g., 3.13.2) and configure the virtual environment:
3341
3442
```bash
3543
poetry python install 3.13.2
44+
poetry env use 3.13.2
3645
```
3746
38-
* Note that this is an experimental feature and may not be as reliable as other methods.
39-
* We recommend using something like [mise](https://mise.jdx.dev/) to install python and manage your environment.
40-
* Other options include using `pyenv` or `asdf`. Last but not least, you can search your package manager.
47+
* **Note:** While `poetry python install` is convenient, you can also manage Python versions using external tools like [mise](https://mise.jdx.dev/), `pyenv`, or `asdf`, and then run `poetry env use <python_version>` if you prefer.
4148
42-
Install all project dependencies:
49+
Now, install all project dependencies (this will also install required Poetry plugins if needed):
4350
4451
```bash
4552
poetry install
4653
```
4754
48-
Install the `pre-commit` hooks:
55+
Finally, install the `pre-commit` hooks:
4956
5057
```bash
5158
poetry run pre-commit install
@@ -60,7 +67,7 @@ Before you begin, ensure you have the following installed:
6067
6168
Edit the `.env` file and fill out the required variables. The `.env` file is used for both local and Docker development.
6269
63-
At a minimum, you will need to fill in the `DEV_BOT_TOKEN` and `DEV_DATABASE_URL` variables for local development when using the CLI to start the bot with `poetry run tux --dev bot start`.
70+
At a minimum, you will need to fill in the `DEV_BOT_TOKEN` and `DEV_DATABASE_URL` variables for local development when using the CLI to start the bot with `poetry run tux --dev start`.
6471
6572
```bash
6673
DEV_BOT_TOKEN=your_dev_discord_token
@@ -103,7 +110,7 @@ This is the simplest and recommended way to get started and develop Tux.
103110
Start the bot in development mode:
104111

105112
```bash
106-
poetry run tux --dev bot start
113+
poetry run tux --dev start
107114
```
108115

109116
This command will:
@@ -118,7 +125,7 @@ This is the simplest and recommended way to get started and develop Tux.
118125

119126
The project includes a hot-reloading utility (`tux/utils/hot_reload.py`).
120127

121-
When the bot is running locally via `poetry run tux --dev bot start`, this utility watches for changes in the `tux/cogs/` directory and attempts to automatically reload modified or affected cogs without requiring a full bot restart.
128+
When the bot is running locally via `poetry run tux --dev start`, this utility watches for changes in the `tux/cogs/` directory and attempts to automatically reload modified or affected cogs without requiring a full bot restart.
122129

123130
This significantly speeds up development for cog-related changes. Note that changes outside the `tux/cogs/` directory (e.g., utility files, core bot logic) may still require a manual restart (`Ctrl+C` and run the start command again).
124131

@@ -235,7 +242,7 @@ This method provides a containerized environment, useful for ensuring consistenc
235242
poetry run tux --dev docker up --build
236243
```
237244
238-
This uses Docker Compose with the development overrides. The `develop: watch:` feature syncs code changes into the container. The container runs `python -m tux --dev bot start`.
245+
This uses Docker Compose with the development overrides. The `develop: watch:` feature syncs code changes into the container. The container runs `python -m tux --dev start`.
239246
240247
**Stopping the Docker Environment:**
241248

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
<p align="center">
77
<a href="https://github.com/allthingslinux/tux/forks">
88
<img alt="Forks" src="https://img.shields.io/github/commit-activity/m/allthingslinux/tux?style=for-the-badge&logo=git&color=EBA0AC&logoColor=EBA0AC&labelColor=302D41"></a>
9-
<a href="https://github.com/allthingslinux/tux">
10-
<img alt="Repo size" src="https://img.shields.io/github/repo-size/allthingslinux/tux?style=for-the-badge&logo=github&color=FAB387&logoColor=FAB387&labelColor=302D41"/></a>
119
<a href="https://github.com/allthingslinux/tux/issues">
1210
<img alt="Issues" src="https://img.shields.io/github/issues/allthingslinux/tux?style=for-the-badge&logo=githubactions&color=F9E2AF&logoColor=F9E2AF&labelColor=302D41"></a>
11+
<a href="https://github.com/allthingslinux/tux">
12+
<img alt="Repo size" src="https://img.shields.io/github/repo-size/allthingslinux/tux?style=for-the-badge&logo=github&color=FAB387&logoColor=FAB387&labelColor=302D41"/></a>
13+
<a href="https://github.com/allthingslinux/tux/LICENSE">
14+
<img alt="License" src="https://img.shields.io/github/license/allthingslinux/tux?style=for-the-badge&logo=github&color=A6E3A1&logoColor=A6E3A1&labelColor=302D41"></a>
1315
<a href="https://discord.gg/linux">
1416
<img alt="Discord" src="https://img.shields.io/discord/1172245377395728464?style=for-the-badge&logo=discord&color=B4BEFE&logoColor=B4BEFE&labelColor=302D41"></a>
1517
</p>

docs/content/cli.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# CLI Reference
2+
3+
This page provides documentation for our command line tools.
4+
5+
::: mkdocs-click
6+
:module: tux.cli
7+
:command: cli
8+
:prog_name: tux
9+
:depth: 1
10+
:list_subcommands: True

docs/mkdocs.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ edit_uri: edit/main/docs/
1010

1111
docs_dir: ./content
1212

13+
site_dir: ../build/docs
14+
1315
extra:
1416
social:
1517
- icon: fontawesome/brands/github
@@ -174,14 +176,15 @@ plugins:
174176
exclude_private: true
175177

176178
markdown_extensions:
179+
- attr_list
180+
- mkdocs-click:
177181
- pymdownx.highlight:
178182
anchor_linenums: true
179183
- pymdownx.inlinehilite
180184
- pymdownx.snippets
181185
- pymdownx.superfences
182186
- admonition
183187
- pymdownx.details
184-
- attr_list
185188
- md_in_html
186189
- tables
187190
- toc:
@@ -193,3 +196,4 @@ nav:
193196
- Environment: dev/environment.md
194197
- Architecture: dev/architecture.md
195198
- Contributing: dev/contributing.md
199+
- CLI: cli.md

0 commit comments

Comments
 (0)