Skip to content

Commit 43e59e7

Browse files
feat: comprehensive package enhancements and infrastructure (#1)
* feat: comprehensive package enhancements and infrastructure * feat: comprehensive package enhancements and infrastructure * feat: comprehensive package enhancements and infrastructure * feat: comprehensive package enhancements and infrastructure * feat: comprehensive package enhancements and infrastructure * feat: comprehensive package enhancements and infrastructure * feat: comprehensive package enhancements and infrastructure * feat: comprehensive package enhancements and infrastructure * feat: comprehensive package enhancements and infrastructure
1 parent 5339626 commit 43e59e7

25 files changed

+2262
-154
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the bug** A clear and concise description of what the bug is.
10+
11+
**To Reproduce** Steps to reproduce the behavior:
12+
13+
1. Install package '...'
14+
2. Run code '...'
15+
3. See error
16+
17+
**Expected behavior** A clear and concise description of what you expected to happen.
18+
19+
**Environment:**
20+
21+
- OS: [e.g. Ubuntu 22.04, Windows 11]
22+
- Python version: [e.g. 3.10.8]
23+
- Package version: [e.g. 0.1.1]
24+
25+
**Additional context** Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Description
2+
3+
<!-- Describe the changes in this PR -->
4+
5+
# Type of change
6+
7+
- [ ] Bug fix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
12+
# Checklist
13+
14+
- [ ] My code follows the style guidelines of this project
15+
- [ ] I have performed a self-review of my own code
16+
- [ ] I have commented my code, particularly in hard-to-understand areas
17+
- [ ] I have made corresponding changes to the documentation
18+
- [ ] My changes generate no new warnings
19+
- [ ] I have added tests that prove my fix is effective or that my feature works
20+
- [ ] New and existing unit tests pass locally with my changes
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Dependency Scanning
2+
3+
on:
4+
schedule:
5+
- cron: '0 9 * * 5' # Run at 9:00 UTC every Friday
6+
push:
7+
paths:
8+
- 'pyproject.toml'
9+
pull_request:
10+
paths:
11+
- 'pyproject.toml'
12+
workflow_dispatch: # Allow manual triggering
13+
14+
jobs:
15+
scan:
16+
name: Security Scan
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.12'
27+
28+
- name: Install Poetry
29+
run: |
30+
curl -sSL https://install.python-poetry.org | python3 -
31+
echo "$HOME/.local/bin" >> $GITHUB_PATH
32+
33+
- name: Install poetry export plugin
34+
run: |
35+
poetry self add poetry-plugin-export
36+
37+
- name: Install dependencies and export requirements
38+
run: |
39+
poetry install
40+
poetry export -f requirements.txt --without-hashes -o requirements.txt
41+
42+
- name: Run safety check
43+
run: |
44+
pip install safety
45+
safety check -r requirements.txt --full-report || true
46+
47+
- name: Check for outdated dependencies
48+
run: |
49+
pip install pip-audit
50+
pip-audit -r requirements.txt || true # Don't fail workflow on findings
51+
52+
- name: Cache results
53+
uses: actions/cache@v4
54+
with:
55+
path: |
56+
~/.cache/pip
57+
.audit-results
58+
key: ${{ runner.os }}-dependency-scan-${{ hashFiles('pyproject.toml') }}
59+
restore-keys: |
60+
${{ runner.os }}-dependency-scan-

.github/workflows/import-check.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Import check
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
paths:
7+
- "**/*.py"
8+
- "pyproject.toml"
9+
- "scripts/check_imports_vs_pyproject.py"
10+
pull_request:
11+
paths:
12+
- "**/*.py"
13+
- "pyproject.toml"
14+
- "scripts/check_imports_vs_pyproject.py"
15+
16+
jobs:
17+
check:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.12"
24+
- name: Install deps
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install tomlkit packaging
28+
- name: Check imports vs pyproject
29+
run: |
30+
python scripts/check_imports_vs_pyproject.py --fail-on missing --format text

.github/workflows/test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: ["3.10", "3.11", "3.12"]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install Poetry
27+
run: |
28+
curl -sSL https://install.python-poetry.org | python3 -
29+
echo "$HOME/.local/bin" >> $GITHUB_PATH
30+
31+
- name: Install dependencies
32+
run: |
33+
poetry install
34+
35+
- name: Run tests with coverage
36+
run: |
37+
poetry run pytest --cov=my_python_package --cov-report=xml
38+
39+
- name: Upload coverage to Codecov
40+
uses: codecov/codecov-action@v4
41+
with:
42+
file: ./coverage.xml
43+
fail_ci_if_error: false
44+
token: ${{ secrets.CODECOV_TOKEN }}
45+
verbose: true

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-toml
9+
- id: check-added-large-files
10+
11+
- repo: https://github.com/astral-sh/ruff-pre-commit
12+
rev: v0.3.0
13+
hooks:
14+
- id: ruff
15+
args: [--fix]
16+
- id: ruff-format
17+
18+
- repo: https://github.com/pre-commit/mirrors-mypy
19+
rev: v1.9.0
20+
hooks:
21+
- id: mypy
22+
additional_dependencies: [types-all]

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
### Added
10+
11+
- Command-line interface with multiple commands
12+
- Enhanced greeting functions with various options
13+
- Documentation generation script
14+
- Docker and docker-compose setup
15+
- Makefile for common development tasks
16+
- GitHub workflows for testing and CI
17+
- Pre-commit hooks configuration
18+
19+
### Changed
20+
21+
- Improved project structure and documentation
22+
- Updated dependency management to use Poetry groups
23+
24+
## [0.1.1] - 2025-08-14
25+
26+
### Added
27+
28+
- Initial package structure
29+
- Basic hello function
30+
- Testing setup with pytest
31+
- Automated dependency management scripts
32+
33+
### Changed
34+
35+
- Updated pyproject.toml to use modern Poetry configuration
36+
37+
## [0.1.0] - 2025-08-01
38+
39+
### Added
40+
41+
- Initial release
42+
- Basic project structure
43+
- MIT License
44+
45+
[0.1.0]: https://github.com/DiogoRibeiro7/my_python_package/releases/tag/v0.1.0
46+
[0.1.1]: https://github.com/DiogoRibeiro7/my_python_package/compare/v0.1.0...v0.1.1
47+
[unreleased]: https://github.com/DiogoRibeiro7/my_python_package/compare/v0.1.1...HEAD

0 commit comments

Comments
 (0)