Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.
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
15 changes: 7 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
root = true

[*]
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_style = space
indent_size = 4

[*.{yaml,yml}]
indent_style = space
indent_size = 2

[*.{js,json,sh}]
indent_style = tab
[*.bat]
end_of_line = crlf

[*.md]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false

[*.conf]
indent_style = tab
indent_size = 4
[LICENSE]
insert_final_newline = false
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# ENV=development
# DEBUG=true

ONION_CONFIG_EXTRA_DIR="./extra_configs"
1 change: 1 addition & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ changelog:
- title: 👷 CI/CD
labels:
- ci
- cicd
- ci/cd
- build
- deploy
Expand Down
34 changes: 31 additions & 3 deletions .github/workflows/1.bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,42 @@ on:
options: ["patch", "minor", "major"]

jobs:
test:
name: 1.1. Test
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies (pytest)
run: |
python -m pip install -U pip
python -m pip install -r ./requirements/requirements.test.txt
- name: Install dependencies (pydantic-v1)
run: |
python -m pip install -r ./requirements/requirements.pydantic-v1.txt
- name: Test with pytest (pydantic-v1)
run: ./scripts/test.sh -l
- name: Install dependencies (pydantic-settings)
run: |
python -m pip install -r ./requirements/requirements.pydantic-settings.txt
- name: Test with pytest (pydantic-settings)
run: ./scripts/test.sh -l

bump_version:
name: Bump Version
needs: test
name: 1.2. Bump Version
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version
Expand All @@ -26,4 +54,4 @@ jobs:
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
./scripts/bump-version.sh -b=${{ inputs.bump_type }} -p
./scripts/bump-version.sh -b=${{ inputs.bump_type }} -c -t -p
40 changes: 7 additions & 33 deletions .github/workflows/2.build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,24 @@ on:
push:
tags:
- "v*.*.*"
# pull_request:
# branches:
# - main

jobs:
test:
name: 2.1. Test
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies (Pydantic-v1)
run: |
python -m pip install -U pip
pip install -r ./requirements.txt
python -m pip install -r ./requirements.test.txt
- name: Test with pytest (Pydantic-v1)
run: ./scripts/test.sh -l
- name: Install dependencies (Pydantic-v2)
run: |
pip install -r ./requirements.pydantic-v2.txt
- name: Test with pytest (Pydantic-v2)
run: ./scripts/test.sh -l

build_publish:
needs: test
name: 2.2. Build and Publish
name: Build and Publish
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -r ./requirements.build.txt
python -m pip install -r ./requirements/requirements.build.txt
- name: Build and publish package
# run: |
# echo -e "[testpypi]\nusername = __token__\npassword = ${{ secrets.TEST_PYPI_API_TOKEN }}" > ~/.pypirc
Expand All @@ -64,6 +35,9 @@ jobs:
echo -e "[pypi]\nusername = __token__\npassword = ${{ secrets.PYPI_API_TOKEN }}" > ~/.pypirc
./scripts/build.sh -c -u -p
rm -rfv ~/.pypirc
- name: Build the package
run: |
./scripts/build.sh -c
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/3.update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 3. Update Changelog

on:
workflow_run:
workflows: ["2. Build and Publish"]
types:
- completed

jobs:
build_publish:
name: Update Changelog
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
./scripts/changelog.sh -c -p
36 changes: 36 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Docs

on:
push:
branches:
- main
paths:
- "docs/**"
- "mkdocs.yml"

jobs:
deploy:
name: Publish Docs
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -r requirements/requirements.docs.txt
- name: Publish mkdocs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
mkdocs gh-deploy --force
104 changes: 51 additions & 53 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,jetbrains,jupyternotebooks,linux,python,sublimetext,vim,windows,zsh
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,jetbrains,jupyternotebooks,linux,python,sublimetext,vim,windows,zsh
# Created by https://www.toptal.com/developers/gitignore/api/zsh,windows,visualstudiocode,vim,sublimetext,python,powershell,macos,linux,jupyternotebooks,jetbrains+all,xcode
# Edit at https://www.toptal.com/developers/gitignore?templates=zsh,windows,visualstudiocode,vim,sublimetext,python,powershell,macos,linux,jupyternotebooks,jetbrains+all,xcode

### JetBrains ###
### JetBrains+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

Expand Down Expand Up @@ -81,39 +81,14 @@ fabric.properties
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### JetBrains Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
### JetBrains+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
.idea/*

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml
!.idea/codeStyles
!.idea/runConfigurations

### JupyterNotebooks ###
# gitignore template for Jupyter Notebooks
Expand Down Expand Up @@ -177,6 +152,13 @@ Temporary Items
# iCloud generated files
*.icloud

### PowerShell ###
# Exclude packaged modules
*.zip

# Exclude .NET assemblies from source
*.dll

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -444,6 +426,23 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

### Xcode ###
## User settings
xcuserdata/

## Xcode 8 and earlier
*.xcscmblueprint
*.xccheckout

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

### Zsh ###
# Zsh compiled script + zrecompile backup
*.zwc
Expand Down Expand Up @@ -479,35 +478,34 @@ zsdoc/data
/tests/_output/*
!/tests/_output/.gitkeep

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,jetbrains,jupyternotebooks,linux,python,sublimetext,vim,windows,zsh
# End of https://www.toptal.com/developers/gitignore/api/zsh,windows,visualstudiocode,vim,sublimetext,python,powershell,macos,linux,jupyternotebooks,jetbrains+all,xcode

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)


# Directories:
log/
logs/
backup/
backups/
data/
dataset/
datasets/
.benchmarks/
module.python-config/

# Files:
data
dataset
datasets
log
logs
backup
backups
archive
pythonpath
data
dataset
datasets
.benchmarks
module.python-config
*.bak
*.pyc
version.py
sample.py
example.py
test.py

# Directories:
.benchmarks/
data/
dataset/
datasets/
log/
logs/
backup/
backups/
archive/
pythonpath/
4 changes: 3 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"MD007": { "indent": 4 },
"MD007": {
"indent": 4
},
"MD013": false
}
Empty file added .pre-commit-config.yaml
Empty file.
Loading