KY64/python-starter-template

Template for creating new Python project with Codecov, CodeQL, and DeepSource included

★ 0Forks 0PythonGitHub ↗Compare

README

Python Starter Template

with Codecov, CodeQL, and DeepSource included


repository logo

Start developing Python app right away without any hassle to install Github Apps or configure Github Action. Every pull request to the main branch will be analyzed by Codecov for checking test coverage, CodeQL for scanning vulnerabilities, and reviewed by DeepSource.

How To Use

Follow the steps below to use this template

1. Install Github Apps

Install the required Github Apps from Marketplace (skip this part if it's already installed):

No need to install CodeQL as it's already integrated with Github

2. Use The Template

Click Use This Template on repository page

3. Configure Apps

Permission

These steps are applied for configuring both Codecov and DeepSource

Since the apps may not work properly when you use this template, it may be because the apps don't have permission to access it. Here's how to configure it:

  1. Go to applications settings
  2. Click Configure button on the required app

click the configure button on the required app

  1. On "Repository Access" section, there are two options you can choose, if you check All repositories then skip this step. Otherwise, see the figure below:

Select "Only selected repositories" option then click save button

DeepSource

If DeepSource is not triggered whenever you make a pull request, follow the steps below:

  1. Login to DeepSource dashboard
  2. Activate your repository by clicking + button like the figure below:

Activate new repository through DeepSource dashboard

  1. Then, a list of repository will appear. Choose the one you want to use. The figure below is just an example

select repository

  1. Click I've added deepsource.toml, activate repo button since the .deepsource.toml file already exists in the repository

Click "I've added deepsource.toml, activate repo" since the .deepsource.toml file already exists in the repository

4. Create A Pull Request

We're all set, create a pull request to test whether the apps working. The result should look like the figure below:

Pull request status check

Project Structure

├── .deepsource.toml
├── .github
│   ├── codecov.yml
│   └── workflows
│       └── workflow.yml
├── LICENSE
├── README.md
├── logo.svg
├── requirements.txt
├── src
│   └── main.py
└── test
    ├── __init__.py
    └── test_main.py
  • .deepsource.toml: required file for DeepSource configuration
  • .github: directory for github workflow configuration
  • codecov.yml: Codecov file configuration
  • workflow.yml: Github Workflow configuration
  • LICENSE: repository license
  • README.md: description about this repository
  • logo.svg: logo used by this repository
  • requirements.txt: list of required python package
  • src: directory for project source code
  • main.py: a simple python program
  • test: directory for storing test files
  • __init__.py: required file to treat this directory as module
  • test_main.py: test file for main.py

Contributors

KY64

Issues