Caution
This is experimental and work-in-progress, so if you are just starting out consider doing the steps yourself/manually to get to know them once.
This allows setting up pre-defined project structures for IESopt projects.
Important
This requires that git
and uv
are installed on your system. Consult the installation instructions for uv or git if you don't have them installed yet.
Caution
If you are using Windows, make sure to carefully read the specific instructions below before executing anything!
- You need to execute the command in your
Git Bash
. Do so by right-clicking inside yourdev
folder (the one where you keep all your projects) and selectingOpen Git Bash here
. - You most likely cannot copy-paste there; you can either right click into the shell and paste via the context menu, or try
Shift+Ins
. - If a popup opens during the setup process asking you which program to use to open some file, please select
Git Bash
and confirm your choice. - If it "randomly" launches VSCode and opens a
.sh
file, please follow the instructions below (in the "Explanations & Problems" section) to fix this issue (which occurs if you've set VSCode as default choice for.sh
files).
Now you should be ready to follow the actual instructions below.
Execute the following command in a terminal to create a new project (inside the current working directory) using this template
uvx cookiecutter gh:ait-energy/iesopt-project-template
and answer the questions in the terminal. For example, if you execute the command in C:\Users\username\dev
, the new project will automatically be created in C:\Users\username\dev\your_project_name
.
This is used to set the author of the project. It is usually your name, but it can be anything you want. This is a part of the standardized
pyproject.toml
file, which controls your environment.
This is a short abbreviation of the project name, that is used in a few places where spaces, etc., are not allowed. It is usually the same as the project name, but with spaces replaced by underscores and all letters in lowercase.
Every question ends in a
(something written here)
, which is the default value. If you want to accept the default value, just pressEnter
without typing anything.
Open the file location of the
.sh
file that VSCode opened, then right-click it, selectOpen with...
, thenChoose another app
, and then selectGit Bash
. Make sure to check the box that saysAlways use this app to open .sh files
and then clickOK
. This will make sure that.sh
files are opened withGit Bash
in the future. After that, remove the folder and start from scratch. This time, it should work without any issues.
If you want to connect your local project to a remote repository, you can do so by executing the following command in the terminal:
git remote add origin <your-repo-url>
git push -u origin main
This can be used to push your local contents, e.g., to an internal/private GitLab repository. <your-repo-url>
should be replaced with the URL of your remote repository (= "the one that you would normally use to clone from").
The template contains various .gitkeep
files, which are used to keep empty directories in the repository. These files are not necessary for the project and can be removed if desired.