Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion .github/workflows/ci.yml → .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: CI
name: CI/CD

on:
push:
branches:
- main
- develop
tags:
- 'v*.*.*'
pull_request:
branches:
- main
Expand Down Expand Up @@ -60,3 +62,35 @@ jobs:

- name: Run tests
run: poetry run pytest

- name: Upload coverage to Codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
fail_ci_if_error: true
verbose: true

release:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- name: Set up Python
uses: actions/setup-python@cfd55ca82492758d853442341ad4d8010466803a
with:
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@ff8a7d7de27005376176819789742a2280cc35e2
- name: Build package
run: poetry build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# my_python_project

[![PyPI Version](https://img.shields.io/pypi/v/my_python_project)](https://pypi.org/project/my_python_project/)
[![Build Status](https://img.shields.io/github/actions/workflow/status/[USERNAME]/[REPO_NAME]/ci-cd.yml?branch=main)](https://github.com/[USERNAME]/[REPO_NAME]/actions/workflows/ci-cd.yml)
[![Codecov](https://img.shields.io/codecov/c/github/[USERNAME]/[REPO_NAME])](https://codecov.io/gh/[USERNAME]/[REPO_NAME])
[![License](https://img.shields.io/badge/License-Prosperity%203.0.0-blue.svg)](LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Python Versions](https://img.shields.io/pypi/pyversions/my_python_project)](https://pypi.org/project/my_python_project)

This is a best-in-class Python package template.

## Getting Started
Expand Down
131 changes: 129 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
[tool.poetry]
name = "my_python_project"
version = "0.1.0"
description = ""
description = "A best-in-class Python package template."
authors = ["CoReason, Inc. <gowtham.rao@coreason.ai>"]
readme = "README.md"
license = "Prosperity-3.0.0"
homepage = "https://github.com/[USERNAME]/[REPO_NAME]"
repository = "https://github.com/[USERNAME]/[REPO_NAME]"
documentation = "https://github.com/[USERNAME]/[REPO_NAME]"
keywords = ["template", "poetry", "python"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: Other/Proprietary License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

[tool.poetry.dependencies]
python = "^3.10"
Expand All @@ -13,7 +28,11 @@ pytest = "^8.4.2"
ruff = "^0.14.2"
mypy = "^1.18.2"
pre-commit = "^4.3.0"
pytest-cov = "^5.0.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
addopts = "--cov=src --cov-report=xml"