| | | |
| ## 1. Setting Up the Development Environment | | ## 1. Setting Up the Development Environment |
| | | |
| To set up the development environment for the Optics Framework, follow these steps: | | To set up the development environment for the Optics Framework, follow these steps: |
| n | | n | |
| | | **Prefer not to set this up by hand?** The repository ships a dev container that does all of it for you, locally in VS Code or in a GitHub Codespace — see [Dev Container and Codespaces](dev_container.md). |
| | | |
| ### Clone the Repository | | ### Clone the Repository |
| | | |
| Clone the Optics Framework repository to your local machine using the following command: | | Clone the Optics Framework repository to your local machine using the following command: |
| ``` | | ``` |
| | | |
| This will start a local server (typically at `http://127.0.0.1:8000`) that automatically reloads when you make changes to the documentation files. | | This will start a local server (typically at `http://127.0.0.1:8000`) that automatically reloads when you make changes to the documentation files. |
| | | |
| n | To build the documentation for production: | n | To build the documentation the way CI does: |
| | | |
| ```bash | | ```bash |
| n | poetry run mkdocs build | n | poetry run mkdocs build --strict |
| ``` | | ``` |
| t | | t | |
| | | `--strict` turns MkDocs warnings into failures, so a link to a page that does not exist fails the build instead of shipping. The `Build-mkdocs-docs` workflow uses it for both the pull-request build and the deploy to GitHub Pages — run it locally before pushing a docs change. |
| | | |
| | | A link to a file outside `docs/` (a Dockerfile, `docker-compose.yml`, `.devcontainer/devcontainer.json`) cannot be relative: `docs/` is the site root, so anything above it is unreachable. Link to those with their full `https://github.com/mozarkai/optics-framework/blob/main/...` URL. |
| | | |
| ### Run Tests | | ### Run Tests |
| | | |
| Run the tests to ensure that your changes do not break existing functionality: | | Run the tests to ensure that your changes do not break existing functionality: |