Initial commit

This commit is contained in:
2025-10-24 08:24:46 +00:00
commit 9b3e8ef8f4
13 changed files with 138 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
name: Code Quality
on:
push:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Run lint
run: |
pylint --errors-only $(git ls-files '*.py')

View File

@@ -0,0 +1,26 @@
name: Run tests
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
pip install pytest
pytest

24
.github/workflows/code-quality.yaml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Code Quality
on:
push:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Run lint
run: |
pylint --errors-only $(git ls-files '*.py')

26
.github/workflows/run-tests.yaml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Run tests
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
pip install pytest
pytest

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
src/__pycache__
tests/__pycache__

6
CHANGELOG.md Normal file
View File

@@ -0,0 +1,6 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

12
README.md Normal file
View File

@@ -0,0 +1,12 @@
# Python Project
A little template for Python projects.
## Testing
This project uses [`pytest`](https://docs.pytest.org/en/stable/), once installed the tests can be runned with:
```sh
pytest
```

0
docs/.gitkeep Normal file
View File

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
# List of dependencies

0
src/__init__.py Normal file
View File

7
src/main.py Normal file
View File

@@ -0,0 +1,7 @@
#! /usr/bin/env python
def main():
pass
if __name__ == "__main__":
main()

0
tests/__init__.py Normal file
View File

10
tests/test_main.py Normal file
View File

@@ -0,0 +1,10 @@
from src.main import main
import unittest
class TestMain(unittest.TestCase):
def test_main(self):
self.assertEqual(True, True)
if __name__ == '__main__':
unittest.main()