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
197 changes: 197 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
# Created by .ignore support plugin (hsz.mobi)
# Check out: https://github.com/long2ice/fastapi-cache/blob/main/.dockerignore

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
notebook/
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

.idea

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Docker-related files
Dockerfile
docker-compose*.yml
.dockerignore

# Git-related files
.git/
.github/
.gitignore

# DVC specific
.dvc/
.dvcignore

# Azure deployment state
# .azure/
# infra/
# azure.yaml

# Project artifacts and documentation
docs/
Makefile
media/
postman/
README.md

# Obsolete requirements file
requirements.txt

# Local data that gets mounted (don't bake it into the image)
data/


# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~

# OS generated files
.DS_Store

# Package manager files that might contain dev dependencies
node_modules/
.npm
27 changes: 27 additions & 0 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env sh

# Example commit-msg hook using commitlint
# 1) Ensure commitlint is installed (npm i -D @commitlint/config-conventional @commitlint/cli).
# 2) Make sure this file is executable (chmod +x .githooks/commit-msg).
# 3) Configure Git to use .githooks as the hook path (see next step).

# "$1" is the path to the file containing the commit message.
npx commitlint --edit "$1"
exit_code=$?

if [ $exit_code -ne 0 ]; then
echo "❌ Error: Commit message does not follow Conventional Commits."
echo "Please use one of the following patterns:"
echo " - feat: ..."
echo " - fix: ..."
echo " - docs: ..."
echo " - styles: ..."
echo " - refactor: ..."
echo " - test: ..."
echo " - chore: ..."
echo " - chore(release): vX.Y.Z"
exit 1
fi

echo "✅ Commit message follows Conventional Commits!"
exit 0
24 changes: 24 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

# Retrieve the current branch name
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)

# Define the regex pattern for valid branch names
VALID_BRANCH_REGEX="^(main|staging|release\/[0-9]{4}-[0-9]{2}-[0-9]{2}|feature\/.+|fix\/.+|bugfix\/.+|hotfix\/.+)$"

# Check if the branch name matches the valid pattern
if [[ ! $BRANCH_NAME =~ $VALID_BRANCH_REGEX ]]; then
echo "❌ Error: Branch name '$BRANCH_NAME' does not follow the naming convention."
echo "Please use one of the following patterns:"
echo " - main"
echo " - staging"
echo " - release/yyyy-mm-dd"
echo " - feature/xxx"
echo " - fix/xxx"
echo " - bugfix/xxx"
echo " - hotfix/xxx"
exit 1
fi

echo "✅ Branch name is valid. Proceeding with push!"
exit 0
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: "bug"
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: "enhancement"
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Pull Request

## Description

Please describe the changes made in this PR, and ensure the title summarises this PR. If it is related to an issue, reference it as well ("Fixes #123").

## Type of Change

- [ ] Feature (a new feature implemented)
- [ ] Refactor (code refactorisation)
- [ ] Chore (config, no production code changes)
- [ ] Bug Fix (fixes a bug/issue)
- [ ] Documentation Update

## Checklist

Please ensure the following have been completed:

- [ ] The PR has a meaningful title.
- [ ] I have summarized the changes of my PR.
- [ ] The PR is ready to be merged and **NOT WORK IN PROGRESS**.

## Additional Notes

You may include any additional notes or screenshot if applicable.
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
target-branch: "staging"
groups:
github-actions:
patterns:
- "*"

# Maintain dependencies for pip
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
target-branch: "staging"
groups:
python-requirements:
patterns:
- "*"
Loading