Skip to content

Commit af41148

Browse files
authored
Merge pull request #407 from davidhozic/develop
v2.10 changes
2 parents 6aafc1d + b8d0860 commit af41148

File tree

130 files changed

+3899
-2909
lines changed

Some content is hidden

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

130 files changed

+3899
-2909
lines changed

.github/workflows/create_release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
on:
22
workflow_dispatch:
33
inputs:
4+
version-major:
5+
type: string
6+
description: Major version (eg. x.0.0)
47
version-minor:
58
type: string
6-
description: Minor version to create tag on (eg. x.x)
9+
description: Minor version (eg. 0.x.0)
710

811
version-bugfix:
912
type: string
10-
description: Minor version to create tag on (eg. 2.x)
11-
default: ""
13+
description: Bug fix version (eg. 0.0.x)
14+
default: "0"
1215

1316
name: Create Release
1417

@@ -24,7 +27,7 @@ jobs:
2427
uses: mathieudutour/[email protected]
2528
with:
2629
github_token: ${{ secrets.TOKEN_GH }}
27-
custom_tag : ${{github.event.inputs.version-minor}}.${{github.event.inputs.version-bugfix}}
30+
custom_tag : ${{github.event.inputs.version-major}}.${{github.event.inputs.version-minor}}.${{github.event.inputs.version-bugfix}}
2831
- name: Create Release
2932
id: create_release
3033
uses: actions/create-release@latest
@@ -33,6 +36,6 @@ jobs:
3336
with:
3437
tag_name: ${{ steps.tag_version.outputs.new_tag }}
3538
release_name: ${{ steps.tag_version.outputs.new_tag }}
36-
body: "Changelog: https://daf.davidhozic.com/en/v${{github.event.inputs.version-minor}}.x/changelog.html"
39+
body: "Changelog: https://daf.davidhozic.com/en/v${{github.event.inputs.version-major}}.${{github.event.inputs.version-minor}}.x/changelog.html"
3740
draft: false
3841
prerelease: false
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
name: Publish to PyPi
1+
name: (todo) Nuitka build and publish to PyPi
22

33
on:
4-
release:
5-
types: [published]
6-
74
workflow_dispatch:
85

96
jobs:
@@ -12,12 +9,13 @@ jobs:
129
runs-on: ubuntu-latest
1310
steps:
1411
- name: Checkout code
15-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1613

1714
- name: Set up Python
18-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1916
with:
2017
python-version: "3.x"
18+
cache: 'pip'
2119

2220
- name: Install dependencies
2321
run: |
@@ -29,7 +27,7 @@ jobs:
2927
python -m build
3028
3129
- name: Publish package
32-
uses: pypa/gh-action-pypi-publish@f5622bde02b04381239da3573277701ceca8f6a0
30+
uses: pypa/gh-action-pypi-publish@f8c70e705ffc13c3b4d1221169b84f12a75d6ca8
3331
with:
3432
user: __token__
3533
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/python-tests.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
branches: [ "master" , "develop"]
88
workflow_dispatch:
99

10+
concurrency:
11+
group: "selftest-cg"
12+
cancel-in-progress: true
13+
1014
jobs:
1115
pytest:
1216
runs-on: ubuntu-latest
@@ -21,16 +25,17 @@ jobs:
2125
uses: actions/setup-python@v4
2226
with:
2327
python-version: ${{ matrix.python-version }}
24-
- name: Disable initramfs update
25-
run: sudo sed -i 's/yes/no/g' /etc/initramfs-tools/update-initramfs.conf
26-
- name: Disable man-db update
27-
run: sudo rm -f /var/lib/man-db/auto-update
28-
- name: Install dependencies
28+
cache: 'pip'
29+
- name: Patch pyproject.toml (remove nuitka build)
30+
run: python setup-universal.py
31+
- name: Install APT dependencies
32+
run: |
33+
sudo apt-get update
34+
sudo apt install ffmpeg
35+
- name: Install Python dependencies
2936
run: |
30-
sudo apt update
31-
sudo apt install -y ffmpeg
3237
python -m pip install --upgrade pip
33-
pip install -r requirements/mandatory.txt -r requirements/sql.txt -r requirements/web.txt -r requirements/voice.txt -r requirements/testing.txt
38+
pip install .[all] .[testing]
3439
- name: Test version compatibility
3540
env:
3641
DISCORD_TOKEN: ${{secrets.DATT}}
@@ -42,5 +47,6 @@ jobs:
4247
DISCORD_TOKEN: ${{secrets.DATT}}
4348
if: ${{ matrix.python-version == 3.8 }}
4449
run: |
45-
pytest -v
50+
pytest -v -m "not group_remote"
51+
pytest -v -m "group_remote"
4652

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
**/__pycache__/**
22
dist/**
3-
build**
3+
build/**
44
**egg-info**
55

66
.vscode
@@ -19,4 +19,7 @@ daf_web_data
1919
test.py
2020

2121
venv*
22-
.venv*
22+
.venv*
23+
24+
*.bkp
25+
*.dtmp

.readthedocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ build:
1515
python: "3.8"
1616
jobs:
1717
pre_build:
18+
- python ./setup-universal.py
1819
- pip install .[all] .[docs]
1920
- python3 ./docs/setup.py --start-dir source
-31.5 KB
Binary file not shown.

docs/Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ export LANGUAGE=$(USE_LANGUAGE)
1313

1414
_BUILD_DIR = $(BUILDDIR)/$(SOURCEDIR)
1515

16+
# OS specific commands
17+
ifeq ($(OS), Windows_NT)
18+
LATEX_CMD := \
19+
cp $(CURDIR)/build-latex-win.sh $(CURDIR)/$(_BUILD_DIR)/latex/ &&\
20+
wsl --cd $(CURDIR)/$(_BUILD_DIR)/latex sh build-latex-win.sh
21+
22+
else
23+
LATEX_CMD := cd $(CURDIR)/$(_BUILD_DIR)/latex && make all-pdf
24+
endif
25+
1626

1727
# Put it first so that "make" without argument is like "make help".
1828
help:
@@ -25,14 +35,13 @@ help:
2535

2636
clean:
2737
python3 ./setup.py --clean --start-dir $(SOURCEDIR)
28-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
38+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(_BUILD_DIR)" $(SPHINXOPTS) $(O)
2939

3040
pdf: latex
31-
docker run --rm -v $(CURDIR)/$(_BUILD_DIR)/latex:/home/ -w /home/ texlive/texlive make all-pdf
3241
mkdir -p $(CURDIR)/$(_BUILD_DIR)/pdf/
42+
$(LATEX_CMD)
3343
cp $(CURDIR)/$(_BUILD_DIR)/latex/*.pdf $(CURDIR)/$(_BUILD_DIR)/pdf/
3444

35-
3645
%: Makefile
3746
python3 ./setup.py --start-dir $(SOURCEDIR)
3847
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(_BUILD_DIR)" $(SPHINXOPTS) $(O)

docs/build-latex-win.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Script is created to speed up the latex compilation on the windows system though wsl.
2+
# It copis all latex files to a wsl directory, runs the latex compiler and then copies them back
3+
# to the orignal path.
4+
5+
ORIGIN_DIR=$(pwd)
6+
LATEX_BUILD_PATH=~/latex-build/
7+
8+
# Copy the current folder (latex build folder) contents to our home folder
9+
echo Creating dir $LATEX_BUILD_PATH
10+
mkdir -p $LATEX_BUILD_PATH
11+
12+
echo Copying files to $LATEX_BUILD_PATH
13+
cp -r $ORIGIN_DIR/** $LATEX_BUILD_PATH
14+
15+
echo Building latex
16+
cd $LATEX_BUILD_PATH
17+
make all-pdf
18+
cp -r $LATEX_BUILD_PATH/** $ORIGIN_DIR
19+
20+
echo Cleaning up $LATEX_BUILD_PATH
21+
rm -rf $LATEX_BUILD_PATH

docs/images/.$sql_er.drawio.svg.bkp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/images/daf-gui-front.png

-4.88 KB
Loading

0 commit comments

Comments
 (0)