Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Customising the template for your needs

Once you’ve created a new repository from the template, you can begin customising it to meet your specific needs.

Renaming the project

Open the entire directory in VS Code.

  1. Search for template_project in the entire codebase and replace it with new_project_name, i.e., a concise version of your project’s name (often called a “slug”).

  2. Rename the folder src/template_project to src/new_project_name.

Running the project

Prior to modifying anything but the slug, confirm that the template can be executed on your system. This step is essential to ensure that any subsequent issues can be attributed to changes you make rather than the original template.

  1. Open a terminal and navigate to the project root

    $ cd /to/root/of/template_project
  2. Install the pre-commit hooks

    $ pixi run prek install
  3. Install the node.js dependencies for the slides

    $ pixi run npm install
  4. Run the project

    $ pixi run pytask

    All programs used within this project template need to be found on your path, see above (Preparing your system and getting the template and the FAQ).

If all went well, you are now ready to adapt the template to your project.

Customising the template

Removing auxiliary files

Before proceeding, delete the following items as they correspond to the meta project and not the template itself.

Find and replace placeholders

Now, search for and replace the following placeholders in the entire codebase.

PlaceholderReplacement
JANE DOEYour full name
EXAMPLE PROJECTYour project’s name
EXAMPLE UNIVERSITYYour university’s name
DOE2024Your project’s citation identifier
https://github.com/OpenSourceEconomics/econ-project-templatesThe GitHub repo URL corresponding to your project

Review and update project details

Once you are done with the replacement of placeholders, you can update the contents of the following files.

FileWhat to do
README.mdRemove the entire content and replace it with a README for your project
pyproject.tomlUpdate the project description and add any dependencies you will need
LICENSEUpdate the year and name with the current year and your name
.gitignore1. Remove the part that is not relevant to your project, that includes all lines that start with docs_template
2. Add any files you need to be ignored by git.

Changing tool options

Finally, you can update options of the included tools. The hooks (specified in .pre-commit-config.yaml) may require adjustments to align with your project’s needs. Refer to the Pre-Commit Hooks section for more details.

Next steps

Depending on what your needs are, move on with the section on Starting a new project from scratch or on Porting an existing project.