Skip to content

Commit da7e041

Browse files
peterusCopilot
andauthored
docs: fix checklist rendering, merge dev pages (#15)
- Add pymdownx.tasklist extension so [ ] checklists render as proper checkboxes instead of raw square brackets - Merge building.md + contributing.md into a single 'Development Guide' (they had ~80% duplicate content) - Update nav and cross-references Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e53d647 commit da7e041

4 files changed

Lines changed: 97 additions & 176 deletions

File tree

docs/development/architecture.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,5 +253,4 @@ GitHub Actions runs on every push to `main` and on pull requests:
253253

254254
## Next Steps
255255

256-
- [Building from source](building.md)
257-
- [Contributing guide](contributing.md)
256+
- [Development Guide](contributing.md)

docs/development/building.md

Lines changed: 0 additions & 158 deletions
This file was deleted.

docs/development/contributing.md

Lines changed: 93 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
# Contributing
1+
# Development Guide
22

3-
Contributions to LayerNexus are welcome! This guide covers the development setup, code style, and contribution workflow.
3+
This guide covers everything you need to contribute to LayerNexus — from setting up your development environment to submitting a pull request.
44

5-
## Development Setup
5+
If you just want to **run** LayerNexus, see the [Quick Start](../quick-start.md).
66

7-
### Prerequisites
7+
---
8+
9+
## Prerequisites
810

911
- [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/)
10-
- Python 3.10+ (for running linters locally)
11-
- Git
12+
- [Git](https://git-scm.com/)
13+
- Python 3.10+ (optional, for running linters locally)
14+
15+
---
1216

13-
### Getting Started
17+
## Getting Started
1418

1519
```bash
1620
# Clone the repository
@@ -23,7 +27,86 @@ docker compose up -d
2327
# The app is now running at http://localhost:8000
2428
```
2529

26-
The development `docker-compose.yml` mounts the project directory as a volume, so code changes are immediately reflected. Gunicorn runs with `--reload` for automatic reloading.
30+
The `docker-compose.yml` mounts the project directory as a volume, so code changes are immediately reflected. Gunicorn runs with `--reload` for automatic reloading.
31+
32+
| Service | Description | Port |
33+
|---|---|---|
34+
| **web** | LayerNexus (built from local source, auto-reloads on code changes) | `8000` |
35+
| **orcaslicer** | OrcaSlicer API | `3000` |
36+
37+
---
38+
39+
## Building Docker Images
40+
41+
### Release Build
42+
43+
```bash
44+
docker build --target release -t layernexus .
45+
```
46+
47+
This builds a production-ready image with static files baked in.
48+
49+
### Debug Build
50+
51+
```bash
52+
docker build --target debug -t layernexus:debug .
53+
```
54+
55+
The debug image includes:
56+
57+
- `debugpy` for remote debugging on port `5678`
58+
- `django-debug-toolbar`
59+
- Django's development server with auto-reload
60+
- `DEBUG=1` by default
61+
62+
### Build Arguments
63+
64+
| Argument | Description | Default |
65+
|---|---|---|
66+
| `APP_VERSION` | Version string baked into the image | `dev` |
67+
68+
---
69+
70+
## Debug Docker Compose
71+
72+
For development with remote debugging support, build with the `debug` target:
73+
74+
```yaml
75+
services:
76+
web:
77+
build:
78+
context: .
79+
target: debug
80+
ports:
81+
- "8000:8000"
82+
- "5678:5678"
83+
volumes:
84+
- .:/app
85+
- media_data:/app/media
86+
- db_data:/app/data
87+
environment:
88+
- DJANGO_SECRET_KEY=dev-secret-key
89+
- DEBUG=1
90+
- ORCASLICER_API_URL=http://orcaslicer:3000
91+
restart: unless-stopped
92+
depends_on:
93+
- orcaslicer
94+
95+
orcaslicer:
96+
image: ghcr.io/afkfelix/orca-slicer-api:latest-orca2.3.1
97+
ports:
98+
- "3000:3000"
99+
volumes:
100+
- orcaslicer_data:/app/data
101+
restart: unless-stopped
102+
103+
volumes:
104+
media_data:
105+
db_data:
106+
orcaslicer_data:
107+
```
108+
109+
Attach your IDE debugger (VS Code or PyCharm) to port `5678` for step-through debugging.
27110

28111
---
29112

@@ -61,14 +144,11 @@ ruff check --fix .
61144
ruff format .
62145
```
63146

64-
### Ruff Configuration
65-
66-
The Ruff configuration is in `pyproject.toml`:
147+
Ruff is configured in `pyproject.toml`:
67148

68149
- **Line length:** 120 characters
69150
- **Target version:** Python 3.10
70151
- **Excluded:** `core/migrations/`
71-
- **Enabled rules:** pycodestyle, pyflakes, isort, flake8-bugbear, flake8-comprehensions, pyupgrade, flake8-simplify, flake8-django, flake8-bandit (security), flake8-print
72152

73153
---
74154

@@ -186,7 +266,7 @@ All checks must pass before a PR can be merged.
186266

187267
---
188268

189-
## Anti-Patterns to Avoid
269+
## Anti-Patterns
190270

191271
| ❌ Avoid | ✅ Use Instead |
192272
|---|---|
@@ -204,5 +284,4 @@ All checks must pass before a PR can be merged.
204284

205285
## Next Steps
206286

207-
- [Contributing guide](contributing.md)
208287
- [Architecture overview](architecture.md)

mkdocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ markdown_extensions:
5151
- pymdownx.emoji:
5252
emoji_index: !!python/name:material.extensions.emoji.twemoji
5353
emoji_generator: !!python/name:material.extensions.emoji.to_svg
54+
- pymdownx.tasklist:
55+
custom_checkbox: true
5456

5557
nav:
5658
- Home: index.md
@@ -70,6 +72,5 @@ nav:
7072
- Backup & Restore: advanced/backup.md
7173
- Docker Details: advanced/docker.md
7274
- Development:
73-
- Building from Source: development/building.md
74-
- Contributing: development/contributing.md
75+
- Development Guide: development/contributing.md
7576
- Architecture: development/architecture.md

0 commit comments

Comments
 (0)