Hi! Welcome to this Python Template, this README_dev.md
contains instructions on the intended usage of this python template.
- Copy the template into a new repository, and edit the name to your project name
- On your pc (locally) create a folder for your code project
- Open this folder with your favorite editor (e.g. VSCode) and within it create a new python venv
- Clone the just created repository into this folder, i.e. run
git clone ???
- Make some changes, and create your first commit see: ...
- Update
- Work with a main, develop and feature branches
- Write user settings in a
.yaml
file - Don't use any hardcode inside your source folder
- Write scripts that should be run inside notebooks
- The other folders should only contain functions or data
- Create an issue on GitHub
- Create a branch from this issue and change the branch source to
develop
- Use provided cmds to checkout this branch locally
- --- Implement your new feature---
- Verify nothing broke using pytest
pytest
- git add, git commit (with # to current Issue number), git push
git add .
git commit -m "#<number> <message>"
git push
- Create a pull-request, with
base:develop
, to merge this feature branch and close this issue - Update branch information locally using
git fetch --prune
, pull in new infogit pull origin develop
and delete branch locally usinggit branch -d <enter branch name>
git fetch --prune
git pull --all
git checkout develop
git pull
- Once merged on the remote and locally, delete this feature branch on the remote (see pull-request) and locally using
git branch -d <branch name>
- Close issue
.gitkeep
is placed such that the empty folder show on GitHub, without this file would be automatically ignored and the project structure would not be clear. Once other files are present inside this folder, this file can be deleted.- The folders
data/
,processed_data/
, andresults/
have been added to the.gitignore
file, as they are expected to contain- large files that should not be uploaded to GitHub
- confidential data that should not be uploaded to GitHub
- generated data that can be recreated
- generated results that can be recreated