@@ -60,11 +60,8 @@ source .venv/bin/activate # On macOS/Linux
6060# OR
6161.venv\S cripts\a ctivate # On Windows
6262
63- # Install dependencies
63+ # Install dependencies and the package (dev group is included by default; see tool.uv in pyproject.toml)
6464uv sync
65-
66- # Install package in editable mode
67- uv pip install -e .
6865```
6966
7067** Alternative (if uv is not available):**
@@ -83,13 +80,28 @@ pip install -e .
8380### 3. Install Development Dependencies
8481
8582``` bash
86- # Using uv (recommended)
83+ # Using uv (recommended): `uv sync` installs the dev group by default
84+ uv sync
85+
86+ # If you disabled default-groups, install dev explicitly:
8787uv sync --group dev
8888
89- # Using pip
90- pip install -e " .[dev]"
89+ # Using pip: there is no `[project.optional-dependencies]` dev extra; use uv, or install
90+ # tools from the dev list in pyproject.toml manually after `pip install -e .`
91+ ```
92+
93+ ### Git hooks (prek)
94+
95+ After ` uv sync ` , install hooks so the same checks as CI run on each commit:
96+
97+ ``` bash
98+ uv run prek install
99+ # If you previously used pre-commit and need to replace its hook script:
100+ uv run prek install -f
91101```
92102
103+ Configuration lives in ` .pre-commit-config.yaml ` (prek is compatible with this format).
104+
93105### 4. Verify Installation
94106
95107``` bash
@@ -100,7 +112,7 @@ python -m scheduler.main --help
100112python -m scheduler.server --help
101113
102114# Run tests
103- pytest
115+ uv run pytest
104116```
105117
106118## Project Structure
@@ -125,10 +137,22 @@ src/scheduler/
125137│ └── csv_writer.py # CSV output writer
126138└── time_slot_generator.py # Time slot generation utilities
127139
128- docs/ # Documentation
129- ├── configuration.md # Configuration file format
130- ├── python_api.md # Python API
131- └── rest_api.md # REST API
140+ fern/ # Fern documentation site (published to Fern Cloud)
141+ ├── docs.yml # Site config, navigation, branding
142+ ├── generators.yml # OpenAPI spec registration
143+ ├── openapi.json # Generated from FastAPI (do not edit by hand)
144+ ├── fern.config.json # Fern org + CLI version
145+ └── docs/
146+ ├── pages/ # MDX guides (configuration, Python, dev, …)
147+ └── assets/ # Logos, favicon, combined-config.schema.json
148+
149+ docs/
150+ └── configuration.md # Redirect pointer to published docs
151+
152+ scripts/
153+ ├── export_openapi.py # Refresh fern/openapi.json
154+ ├── export_config_schema.py # Refresh JSON Schema asset
155+ └── gen_python_api_mdx.py # Refresh Python API reference from docstrings
132156```
133157
134158## Development Workflow
@@ -153,11 +177,17 @@ git checkout -b feature/your-feature-name
153177### 3. Test Your Changes
154178
155179``` bash
180+ # Run tests
181+ uv run pytest
182+
156183# Run linting
157- ruff check
184+ uv run ruff check .
158185
159186# Run type checking
160- ty check
187+ uv run ty check . --ignore unresolved-import
188+
189+ # Or run the full hook suite (matches CI)
190+ uv run prek run --all-files
161191```
162192
163193### 4. Commit Your Changes
@@ -223,17 +253,17 @@ from .config import SchedulerConfig
223253``` python
224254def generate_schedule (config : SchedulerConfig) -> List[CourseInstance]:
225255 """ Generate a course schedule based on configuration.
226-
256+
227257 **Args:**
228258 - config: The scheduler configuration containing courses, faculty, and constraints.
229-
259+
230260 **Returns:**
231261 A list of course instances representing the generated schedule.
232-
262+
233263 **Raises:**
234264 - ValueError: If the configuration is invalid.
235265 - RuntimeError: If no valid schedule can be generated.
236-
266+
237267 **Example:**
238268 >>> config = load_config_from_file("config.json")
239269 >>> schedule = generate_schedule(config, limit=5)
@@ -283,23 +313,25 @@ if not faculty_available:
283313- Update REST API documentation for new endpoints
284314- Include request/response examples
285315- Document error codes and messages
286- - Update OpenAPI schema if applicable
316+ - Regenerate ** ` fern/openapi.json ` ** with ` uv run python scripts/export_openapi.py ` when ` server.py ` or shared models change
317+ - Regenerate ** ` fern/docs/pages/python/reference.mdx ` ** with ` uv run python scripts/gen_python_api_mdx.py ` when public docstrings change
287318
288319### User Documentation
289320
321+ - Update ** Fern** pages under ** ` fern/docs/pages/ ` ** (configuration, welcome, development)
290322- Update README.md for new features
291- - Add configuration examples
292- - Update troubleshooting guides
293- - Include performance considerations
323+ - Regenerate ** ` fern/docs/assets/combined-config.schema.json ` ** with ` uv run python scripts/export_config_schema.py ` when ` CombinedConfig ` changes
324+ - Preview locally: ` npm install -g fern-api ` then ` fern docs dev ` (after the generate scripts above)
294325
295326## Submitting Changes
296327
297328### Pull Request Checklist
298329
299330Before submitting a pull request, ensure:
300331
301- - [ ] Code passes linting (` ruff check ` )
302- - [ ] Type checking passes (` ty check ` )
332+ - [ ] Code passes linting (` uv run ruff check . ` )
333+ - [ ] Type checking passes (` uv run ty check . --ignore unresolved-import ` )
334+ - [ ] Tests pass (` uv run pytest ` )
303335- [ ] Documentation is updated
304336- [ ] Breaking changes are documented
305337- [ ] Commit messages follow conventional format
0 commit comments