Skip to content

Commit 2c5263c

Browse files
authored
Merge pull request #29 from bybatkhuu/dev
BREAKING CHANGES!: refactor setup.py to pyproject.toml and many more …
2 parents 135f611 + e169771 commit 2c5263c

File tree

121 files changed

+2463
-507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2463
-507
lines changed

.env.example

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
ENV=development
2-
DEBUG=true
1+
# ENV=LOCAL
2+
# DEBUG=false
3+
# TZ=UTC
34

4-
BEANS_LOGGING_DISABLE_DEFAULT=false
5-
BEANS_LOGGING_CONFIG_PATH="./configs/logger.yml"
6-
BEANS_LOGGING_LOGS_DIR="./logs"
5+
# BEANS_LOGGING_DISABLE_DEFAULT=false
6+
# BEANS_LOGGING_CONFIG_PATH="./configs/logger.yml"
7+
# BEANS_LOGGING_LOGS_DIR="./logs"

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @bybatkhuu

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
labels:
6+
- "dependency"
7+
open-pull-requests-limit: 10
8+
schedule:
9+
interval: "daily"

.github/workflows/1.bump-version.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ on:
1212
jobs:
1313
bump_version:
1414
name: Bump Version
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
permissions:
1717
contents: write
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
21-
with:
22-
fetch-depth: 0
20+
uses: actions/checkout@v5
2321
- name: Bump version
2422
env:
2523
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/2.build-publish.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,50 +12,54 @@ on:
1212
jobs:
1313
test:
1414
name: 2.1. Test
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
permissions:
1717
contents: read
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v5
2121
- name: Set up Python
22-
uses: actions/setup-python@v3
22+
uses: actions/setup-python@v5
2323
with:
24-
python-version: "3.9"
24+
python-version: "3.10"
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install -U pip
28-
python -m pip install -r ./requirements.test.txt
28+
python -m pip install .[test]
2929
- name: Test with pytest
3030
run: ./scripts/test.sh -l
3131

3232
build_publish:
3333
needs: test
3434
name: 2.2. Build and Publish
35-
runs-on: ubuntu-22.04
35+
runs-on: ubuntu-24.04
3636
permissions:
3737
contents: write
3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@v5
41+
- name: Get latest version
42+
run: |
43+
git pull origin main
44+
echo "Current version: v$(./scripts/get-version.sh)"
4145
- name: Set up Python
42-
uses: actions/setup-python@v3
46+
uses: actions/setup-python@v5
4347
with:
44-
python-version: "3.9"
48+
python-version: "3.10"
4549
- name: Install dependencies
4650
run: |
4751
python -m pip install -U pip
48-
python -m pip install -r ./requirements.build.txt
52+
python -m pip install -r ./requirements/requirements.build.txt
4953
- name: Build and publish package
50-
# run: |
51-
# echo -e "[testpypi]\nusername = __token__\npassword = ${{ secrets.TEST_PYPI_API_TOKEN }}" > ~/.pypirc
52-
# ./scripts/build.sh -c -u
53-
# rm -rfv ~/.pypirc
54+
# run: |
55+
# echo -e "[testpypi]\nusername = __token__\npassword = ${{ secrets.TEST_PYPI_API_TOKEN }}" > ~/.pypirc
56+
# ./scripts/build.sh -c -u
57+
# rm -rfv ~/.pypirc
5458
run: |
5559
echo -e "[pypi]\nusername = __token__\npassword = ${{ secrets.PYPI_API_TOKEN }}" > ~/.pypirc
5660
./scripts/build.sh -c -u -p
5761
rm -rfv ~/.pypirc
5862
- name: Create release
5963
env:
6064
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61-
run: gh release create v$(./scripts/get-version.sh) ./dist/* --generate-notes
65+
run: ./scripts/release.sh
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 3. Update Changelog
2+
3+
on:
4+
workflow_run:
5+
workflows: ["2. Build and Publish"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
build_publish:
11+
name: Update Changelog
12+
runs-on: ubuntu-24.04
13+
permissions:
14+
contents: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v5
18+
- name: Update changelog
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
run: |
22+
git config user.name "github-actions"
23+
git config user.email "github-actions@github.com"
24+
./scripts/changelog.sh -c -p

.github/workflows/publish-docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish Docs
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- "docs/**"
10+
- "mkdocs.yml"
11+
12+
jobs:
13+
deploy:
14+
name: Publish Docs
15+
runs-on: ubuntu-24.04
16+
permissions:
17+
contents: write
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.10"
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install -U pip
30+
python -m pip install -r ./requirements/requirements.docs.txt
31+
- name: Publish mkdocs
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
run: |
35+
git config user.name "github-actions"
36+
git config user.email "github-actions@github.com"
37+
./scripts/docs.sh -p

.gitignore

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
2-
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,jetbrains,jupyternotebooks,linux,python,sublimetext,vim,windows,zsh
3-
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,jetbrains,jupyternotebooks,linux,python,sublimetext,vim,windows,zsh
2+
# Created by https://www.toptal.com/developers/gitignore/api/zsh,xcode,windows,visualstudiocode,vim,sublimetext,python,powershell,macos,linux,jupyternotebooks,jetbrains+all,obsidian
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=zsh,xcode,windows,visualstudiocode,vim,sublimetext,python,powershell,macos,linux,jupyternotebooks,jetbrains+all,obsidian
44

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

@@ -81,39 +81,14 @@ fabric.properties
8181
# Android studio 3.1+ serialized cache file
8282
.idea/caches/build_file_checksums.ser
8383

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

87-
# *.iml
88-
# modules.xml
89-
# .idea/misc.xml
90-
# *.ipr
91-
92-
# Sonarlint plugin
93-
# https://plugins.jetbrains.com/plugin/7973-sonarlint
94-
.idea/**/sonarlint/
95-
96-
# SonarQube Plugin
97-
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
98-
.idea/**/sonarIssues.xml
99-
100-
# Markdown Navigator plugin
101-
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
102-
.idea/**/markdown-navigator.xml
103-
.idea/**/markdown-navigator-enh.xml
104-
.idea/**/markdown-navigator/
88+
.idea/*
10589

106-
# Cache file creation bug
107-
# See https://youtrack.jetbrains.com/issue/JBR-2257
108-
.idea/$CACHE_FILE$
109-
110-
# CodeStream plugin
111-
# https://plugins.jetbrains.com/plugin/12206-codestream
112-
.idea/codestream.xml
113-
114-
# Azure Toolkit for IntelliJ plugin
115-
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
116-
.idea/**/azureSettings.xml
90+
!.idea/codeStyles
91+
!.idea/runConfigurations
11792

11893
### JupyterNotebooks ###
11994
# gitignore template for Jupyter Notebooks
@@ -177,6 +152,17 @@ Temporary Items
177152
# iCloud generated files
178153
*.icloud
179154

155+
### Obsidian ###
156+
# config dir
157+
.obsidian/
158+
159+
### PowerShell ###
160+
# Exclude packaged modules
161+
*.zip
162+
163+
# Exclude .NET assemblies from source
164+
*.dll
165+
180166
### Python ###
181167
# Byte-compiled / optimized / DLL files
182168
__pycache__/
@@ -444,6 +430,23 @@ $RECYCLE.BIN/
444430
# Windows shortcuts
445431
*.lnk
446432

433+
### Xcode ###
434+
## User settings
435+
xcuserdata/
436+
437+
## Xcode 8 and earlier
438+
*.xcscmblueprint
439+
*.xccheckout
440+
441+
### Xcode Patch ###
442+
*.xcodeproj/*
443+
!*.xcodeproj/project.pbxproj
444+
!*.xcodeproj/xcshareddata/
445+
!*.xcodeproj/project.xcworkspace/
446+
!*.xcworkspace/contents.xcworkspacedata
447+
/*.gcno
448+
**/xcshareddata/WorkspaceSettings.xcsettings
449+
447450
### Zsh ###
448451
# Zsh compiled script + zrecompile backup
449452
*.zwc
@@ -479,35 +482,31 @@ zsdoc/data
479482
/tests/_output/*
480483
!/tests/_output/.gitkeep
481484

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

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

489+
# Directories:
490+
log/
491+
logs/
492+
backup/
493+
backups/
494+
tmp/
495+
data/
496+
dataset/
497+
datasets/
498+
.benchmarks/
486499

487500
# Files:
488-
data
489-
dataset
490-
datasets
491501
log
492502
logs
493503
backup
494504
backups
495-
archive
496-
pythonpath
505+
tmp
506+
data
507+
dataset
508+
datasets
509+
.benchmarks
497510
*.bak
498-
*.pyc
499-
sample.py
500511
example.py
501512
test.py
502-
503-
# Directories:
504-
.benchmarks/
505-
data/
506-
dataset/
507-
datasets/
508-
log/
509-
logs/
510-
backup/
511-
backups/
512-
archive/
513-
pythonpath/

.markdownlint.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2-
"MD007": { "indent": 4 },
3-
"MD013": false
2+
"MD007": {
3+
"indent": 4
4+
},
5+
"MD013": false,
6+
"MD025": false
47
}

0 commit comments

Comments
 (0)