Skip to content

Commit 7bd0e97

Browse files
authored
Initial commit
0 parents  commit 7bd0e97

File tree

15 files changed

+513
-0
lines changed

15 files changed

+513
-0
lines changed

.github/workflows/prcheck.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: PR Checks
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
branches:
10+
- main
11+
paths:
12+
- 'my_package/**'
13+
14+
jobs:
15+
changelog:
16+
name: CHANGELOG
17+
runs-on: ubuntu-latest
18+
if: github.event_name == 'pull_request'
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Check that CHANGELOG has been updated
26+
run: |
27+
# If this step fails, this means you haven't updated the CHANGELOG.md
28+
# file with notes on your contribution.
29+
git diff --name-only $(git merge-base origin/main HEAD) | grep '^CHANGELOG.md$' && echo "Thanks for helping keep our CHANGELOG up-to-date!"

.github/workflows/pre-commit.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Prek checks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
prek:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.13"
17+
18+
- uses: j178/prek-action@v1

.github/workflows/tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
tests:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.13"
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
23+
with:
24+
enable-cache: false
25+
version: "latest"
26+
27+
- name: Cache uv
28+
uses: actions/cache@v4
29+
with:
30+
path: ~/.cache/uv
31+
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
32+
restore-keys: |
33+
uv-${{ runner.os }}-
34+
35+
- name: Install just
36+
uses: extractions/setup-just@v3
37+
38+
- name: Install dependencies (dev)
39+
run: just install
40+
41+
- name: Run tests
42+
run: just test

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Python-generated files
2+
__pycache__/
3+
*.py[oc]
4+
build/
5+
dist/
6+
wheels/
7+
*.egg-info
8+
9+
# Virtual environments
10+
.venv

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/uv-pre-commit
3+
rev: 0.9.18
4+
hooks:
5+
- id: uv-lock
6+
7+
- repo: https://github.com/astral-sh/ruff-pre-commit
8+
rev: v0.14.10
9+
hooks:
10+
- id: ruff
11+
args: [ --fix ]
12+
types_or: [ python, pyi ]
13+
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v6.0.0
16+
hooks:
17+
- id: check-merge-conflict
18+
- id: mixed-line-ending
19+
20+
exclude: |
21+
unsloth_compiled_cache/.*
22+
|llms-finetune/gemma3/unsloth_compiled_cache/.*
23+
|.*\.ipynb$

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
9+
## Unreleased

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Contributing
2+
============
3+
4+
Unless you explicitly state otherwise, any contribution intentionally submitted
5+
for inclusion in the work by you shall be licensed as in [LICENSE](LICENSE),
6+
without any additional terms or conditions.
7+
8+
See [the readme](README.md#contributing) for contribution workflow suggestions.

LICENSE

Whitespace-only changes.

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Python Package Template
2+
3+
This repository serves as a template for creating Python packages. It includes a standard project structure, setup configurations, and best practices to help you get started quickly with your own Python package development.
4+
5+
## Features
6+
7+
- Linting with ruff
8+
- Formatting with ruff
9+
- Testing with pytest
10+
- Continuous integration with GitHub Actions
11+
12+
## Usage
13+
14+
1. [Create a new repository](https://github.com/new?template_name=python-package-template&template_owner=BurkimbIA) using this template.
15+
2. Clone your new repository to your local machine.
16+
3. Install [uv](https://github.com/astral-sh/uv) if you haven't already
17+
4. Install [just](https://github.com/casey/just)
18+
5. Install [prek](https://github.com/j178/prek) if you haven't already
19+
6. You can then customize the package by modifying the files and structure as needed.
20+
7. Commit and push your changes to your repository and check the CI/CD pipeline for any issues.
21+
22+
## Contributing
23+
24+
We welcome contributions from the community! Please follow the [Contributing Guidelines](https://github.com/BurkimbIA/python-package-template/blob/main/CONTRIBUTING.md) to contribute to this project.

0 commit comments

Comments
 (0)