4.3 KiB
Developer Guide
All contributions to RenderCV are welcome!
The source code is thoroughly documented and well-commented, making it an enjoyable read and easy to understand. A detailed documentation of the source code is available in the API reference.
Getting Started
There are two ways of developing RenderCV: locally or with GitHub Codespaces.
Develop Locally
-
Install Hatch. The installation guide for Hatch can be found here.
Hatch is a Python project manager. It mainly allows you to define the virtual environments you need in
pyproject.toml. Then, it takes care of the rest. Also, you don't need to install Python. Hatch will install it when you follow the steps below. -
Clone the repository.
git clone https://github.com/rendercv/rendercv.git -
Go to the
rendercvdirectory.cd rendercv -
Start using one of the virtual environments by activating it in the terminal.
Default development environment with Python 3.13:
hatch shell defaultThe same environment, but with Python 3.10 (or 3.11, 3.12, 3.13):
hatch shell test.py3.10 -
Finally, activate the virtual environment in your integrated development environment (IDE). In Visual Studio Code:
- Press
Ctrl+Shift+P. - Type
Python: Select Interpreter. - Select one of the virtual environments created by Hatch.
- Press
Develop with GitHub Codespaces
- Fork the repository.
- Navigate to the forked repository.
- Click the <> Code button, then click the Codespaces tab, and then click Create codespace on main.
Then, Visual Studio Code for the Web will be opened with a ready-to-use development environment.
This is done with Development containers, and the environment is defined in the .devcontainer/devcontainer.json file. Dev containers can also be run locally using various supporting tools and editors.
Available Commands
These commands are defined in the pyproject.toml file.
- Build the package
hatch run build - Format the code with Black and Ruff
hatch run format - Lint the code with Ruff
hatch run lint - Run pre-commit
hatch run precommit - Check the types with Pyright
hatch run check-types - Run the tests with Python 3.13
hatch run test - Run the tests with Python 3.13 and generate the coverage report
hatch run test-and-report - Update schema.json
hatch run update-schema - Update
examplesfolderhatch run update-examples - Create an executable version of RenderCV with PyInstaller
hatch run create-executables - Preview the documentation as you write it
hatch run docs:serve - Build the documentation
hatch run docs:build - Update figures of the entry types in the "Structure of the YAML Input File"
hatch run docs:update-entry-figures
About pyproject.toml
pyproject.toml contains the metadata, dependencies, and tools required for the project. Please read through the file to understand the project's technical details.