Skip to content

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 reference.

Getting Started

There are two ways of developing RenderCV: locally or with GitHub Codespaces.

Develop Locally

  1. Ensure that you have Python version 3.10 or higher.
  2. Install Hatch, as it is the project manager for RenderCV. The installation guide for Hatch can be found here.
  3. Clone the repository recursively (because TinyTeX is being used as a submodule) with the following command.
    git clone --recursive https://github.com/rendercv/rendercv.git
    
  4. Go to the rendercv directory.
    cd rendercv
    
  5. RenderCV uses three virtual environments:

    • default: For the development and testing. It contains packages like Ruff, Black, pytest etc.
    • test: It's the same as the default environment, but it's created with Python 3.10, 3.11, 3.12, and 3.13 for testing.
    • docs: For building the documentation.

    Create the virtual environments with the following commands.

    hatch env create default
    hatch env create test
    hatch env create docs
    
  6. To use the virtual environments, either

    • Activate one of the virtual environments with one of the following commands.

      hatch shell default
      

      hatch shell docs
      
      hatch shell test.py3.13
      
    • Select one of the virtual environments in your Integrated Development Environment (IDE).

      • Press Ctrl+Shift+P.
      • Type Python: Select Interpreter.
      • Select one of the virtual environments created by Hatch.

      To be added.

Develop with GitHub Codespaces

  1. Fork the repository.
  2. Navigate to the forked repository.
  3. 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.

  • 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.10, 3.11, 3.12, and 3.13
    hatch run test:test
    
  • Run the tests with Python 3.13 and generate a coverage report
    hatch run test-and-report
    
  • Start the development server for the documentation
    hatch run docs:serve
    
  • Build the documentation
    hatch run docs:build
    
  • Update schema.json
    hatch run docs:update-schema
    
  • Update examples folder
    hatch run docs:update-examples
    
  • 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.