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
17 changes: 0 additions & 17 deletions .coveragerc

This file was deleted.

14 changes: 7 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ indent_size = 4 # Default indentation size
insert_final_newline = true # Make sure files end with a newline
trim_trailing_whitespace = true # Remove trailing whitespace

# Python specific settings, complying with PEP 8 style guide, except for the line length
# Python files
[*.py]
max_line_length = 100

# Markdown files
[*.md]
trim_trailing_whitespace = false # Don't remove trailing whitespace in Markdown files
max_line_length = 120
trim_trailing_whitespace = false

# Bash scripts
[*.sh]
indent_size = 4
indent_size = 2

# SQL files
[*.sql]
indent_size = 4
indent_size = 2

# YAML files
[*.yml]
indent_size = 4
[*.{yml,yaml}]
indent_size = 2

# JSON files
[*.json]
indent_size = 4
indent_size = 2
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEBUG_MODE=True
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Deploy Docs

on:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Only allow one deployment at a time running
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install Dependencies
run: |
make setup
make install

- name: Build Documentation
run: make docs

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload Documentation as Artifact
uses: actions/upload-pages-artifact@v3
with:
path: './site'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
37 changes: 37 additions & 0 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Run Linter Checks

on:
workflow_dispatch:
push:
tags:
- 'v*'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
# Define the Python versions check against
python-version: [ "3.10", "3.11", "3.12", "3.13" ]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
make setup
make install

- name: Run Tests with Coverage
run: |
make lint
84 changes: 42 additions & 42 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
name: Tests
name: Run Tests

on:
workflow_dispatch: # Only enable manual runs for now
workflow_dispatch:
workflow_call:
pull_request:
branches:
- main
- develop

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
# Define the Python versions to test against
python-version: [ "3.10", "3.11", "3.12", "3.13" ]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# Install dependencies
- name: Install Poetry and Dependencies
run: |
sudo apt-get update
sudo apt-get install make
make setup
make install

# Run unit tests with coverage
- name: Run Tests with Coverage
run: |
make test
make coverage
continue-on-error: true

- name: Upload Test Results and Coverage Reports
uses: actions/upload-artifact@v4
with:
name: test-results-and-coverage
overwrite: true # Overwrite the existing artifact(s) with the same name
path: |
junit/test-results-${{ matrix.python-version }}.xml
htmlcov-${{ matrix.python-version }}/
build:
runs-on: ubuntu-latest

strategy:
matrix:
# Define the Python versions to test against
python-version: [ "3.10", "3.11", "3.12", "3.13" ]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
make setup
make install

- name: Run Tests with Coverage
run: |
make test
continue-on-error: true

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
continue-on-error: true
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
test-reports/
test-report.xml
test-results.xml
.benchmarks/

# IDE specific files and directories
.idea/
Expand All @@ -60,7 +58,9 @@ test-results.xml
*.tmp
temp/
tmp/
tmp2/
out/
out2/

# Database files (SQLite, DuckDB, etc.)
*.duckdb
Expand All @@ -71,5 +71,9 @@ out/
# Dependency lock files (uncomment to ignore)
poetry.lock

# Documentation files
site/

# Miscellaneous files and directories to ignore
# Add any additional file patterns a directory names that should be ignored down here
.env
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
- id: check-merge-conflict
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code of Conduct

We adhere to the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) version 2.1.
62 changes: 62 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Contribution Guidelines

Thank you for considering contributing to this project!
Contributions are always welcome and appreciated.

## How to Contribute

Please check the [issue tracker](https://github.com/habedi/template-python-project/issues) to see if there is an issue
you
would like to work on or if it has already been resolved.

### Reporting Bugs

1. Open an issue on the [issue tracker](https://github.com/habedi/template-python-project/issues).
2. Include information such as steps to reproduce the observed behavior and relevant logs or screenshots.

### Suggesting Features

1. Open an issue on the [issue tracker](https://github.com/habedi/template-python-project/issues).
2. Provide details about the feature, its purpose, and potential implementation ideas.

## Submitting Pull Requests

- Make sure all tests pass before submitting a pull request.
- Write a clear description of the changes you made and the reasons behind them.

> [!IMPORTANT]
> It's assumed that by submitting a pull request, you agree to license your contributions under the project's license.

## Development Workflow

### Prerequisites

Install GNU Make if it's not already installed on your system.

```shell
# For Debian-based systems like Debian, Ubuntu, etc.
sudo apt-get install make
```

- Use the `make setup` command to install the development dependencies.
- Use the `make install` command to install the Python dependencies.

### Code Style

- Use the `make format` command to format the code.

### Running Tests

- Use the `make test` command to run the tests.

### Running Linter Checks

- Use the `make lint` command to run the linter checks.

### See Available Commands

- Run `make help` to see all available commands for managing different tasks.

## Code of Conduct

We adhere to the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) version 2.1.
Loading
Loading