Skip to content

Template for open-source and personal project related to data using python. This will work best if you are working with teams!

License

Notifications You must be signed in to change notification settings

scaredmeow/template-py-data-project

Repository files navigation

Title of the Project

Description of the project, this serve as a guide for the user to understand what the project is about.

Objective

Objective of the project, this serve as a guide for the user to understand what the project is trying to achieve.

Project Structure

├── 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

Tech Stack Used

Jupyter Notebook Python

Prerequisites

Getting Started

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

Configuring your workspace

  1. Open a terminal (CMD/Bash/Powershell/ZSH/etc)

  2. Check if both python and pip is installed by typing python --version and pip version. Alternatively if this doesn't work type python3 --version and pip3 --version.

  3. 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).

  4. 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
  5. 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
  6. 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
  7. Run main.ipynb using the created virtual environment (venv) as ipykernel.

Coding Standards

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 .

Testing

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 .

Contributing Guidelines

To contribute to the repository through Issues or Pull Requests, see CONTRIBUTING.md.

Contact

github linkedin gmail Calendly

About

Template for open-source and personal project related to data using python. This will work best if you are working with teams!

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages