Description of the project, this serve as a guide for the user to understand what the project is about.
Objective of the project, this serve as a guide for the user to understand what the project is trying to achieve.
├── docs/ <- Directory for Task documentations, Meeting Presentations and task Workflow Documents, References, and Diagrams.
├── data/ <- Directory for Datasets used and collected for this project
├── notebooks/ <- Directory for all notebookused in this project.
├── scripts/ <- Directory for all scriptused in this project.
├── models/ <- Directory for all modellinand analysis code.
├── reports/ <- Directory containing the final reports/results of this project
│
├── .gitignore <- Files and folders to be ignored by git.
├── CODE_OF_CONDUCT.md <- Code of Conduct for this project.
├── CONTRIBUTING.md <- Details on how to contribute to this project.
├── LICENSE <- License for this project.
├── .pre-commit-config.yaml <- Contains the configuration for pre-commit hooks. See https://pre-commit.com for more details.
├── README.md <- The top-level README for developers/collaborators using this project.
├── requirements-dev.txt <- The top-level packages used in this project.
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g. generated with `pip freeze > requirements.txt`
└── setup.py <- makes project pip installable (pip install -e .) so scripts can be imported
- Python 3
- GIT
- Packages in
requirements-dev.txt
- Dependencies in
requirements.txt
Download first GIT in order to use git commands in your local machine.
To get a local copy up and running follow these simple example steps.
# cd folder/to/clone-into/
# git clone https://github.com/scaredmeow/projec-name.git
cd desktop/
git clone https://github.com/scaredmeow/template-py-data-project.git
This will download the project to a folder named after the Git repository ("template-py-data-project" in this case). If you want a different folder name, simply specify it as the last parameter:
# git clone https://github.com/scaredmeow/projec-name.git <other-name>
git clone https://github.com/scaredmeow/template-py-data-project.git template-data-project
-
Open a terminal (CMD/Bash/Powershell/ZSH/etc)
-
Check if both python and pip is installed by typing
python --version
andpip version
. Alternatively if this doesn't work typepython3 --version
andpip3 --version
. -
Go to the directory/folder where you clone the project, and open it with your favorite code editor (preferably VS Code, but Jupyter Notebook will work as well).
-
Open a terminal on the same directory of your project and create a virtual environment by typing the following:
# python -m venv <env_name> python -m venv venv
-
Activate your environment by using the following:
-
Powershell:
# .\<env_name>\Scripts\activate.ps1 .\venv\Scripts\activate.ps1
-
Bash/ZSH/Fish:
# source ./<env_name>/bin/activate source ./venv/bin/activate
-
-
Install the requirements by typing the following:
pip install -r requirements-dev.txt
alternatively, if this doesn't work type
pip3 install -r requirements-dev.txt
-
Run
main.ipynb
using the created virtual environment (venv) as ipykernel.
We follow the PEP 8 style guide for Python code formatting and naming conventions. We also use black as our code formatter and flake8 as our code linter.
Please make sure your code is formatted and linted before submitting a pull request. You can use the following commands to do so:
# Install first pre-commit
pre-commit install
# Check the files using pre-commit
pre-cmmit run --all
We also use docstrings to document our code and functions. We follow the Google style for docstrings.
Please make sure your code is documented before submitting a pull request. You can use the following command to check your docstrings:
# Check docstrings with pydocstyle
pydocstyle .
We use pytest as our testing framework for Python code. We write unit tests for our functions and classes, as well as integration tests for our scripts and notebooks.
Please make sure your code is tested before submitting a pull request. You can use the following command to run the tests:
# Run tests with pytest
pytest .
To contribute to the repository through Issues or Pull Requests, see CONTRIBUTING.md
.