This is a repository template for python projects in scientific computing. It includes all the necessary files to get started and assure the portability of the project once it is developed. The main idea is to develop a new python package 'package-name' that holds all the source code in core
. The directory utils
holds all the utility functions, while data
contains the data necessary for running the projects. However, any large data sets should be stored separately from the repository.
The main scripts of the projects, where experiments are run or plots are generated, should be put in scripts
. The directory tests
should contain the modules to test the core code.
To use this repository as a template for your Python project, follow these steps:
- Click on the "Use this template" button at the top of the repository page.
- Fill in the necessary details for your new repository, in particular your project name
your-project-name
. - Clone your new repository to your local machine:
git clone https://github.com/your-username/your-project-name.git
To develop a functioning project starting from this template, do the follwing:
- Develop the core code (obviously).
- Change the dummy values in
setup.py
to the actual values for your project. - Add the required packages with version information to
requirements.txt
. - If you actually care, write some test modules. The tests can be run by running
in the project directory.
pytest
To install the project on a new machine, follow these steps:
-
Clone the project and navigate to the project directory.
-
Create a new python environment, cf. docs, and activate it.
-
Install the package using
pip install .
or using
pip install . --editable
if you want to edit the project.
-
Install the required packages using
pip install -r requirements. txt
This project is licensed under the MIT License.