Skip to content

Commit

Permalink
Merge pull request #65 from zaanposni/release/2.0
Browse files Browse the repository at this point in the history
release/2.0
  • Loading branch information
zaanposni authored May 19, 2024
2 parents d7c7a92 + 818d15c commit 61639a0
Show file tree
Hide file tree
Showing 56 changed files with 33,805 additions and 15,786 deletions.
4 changes: 0 additions & 4 deletions .github/issue_label_bot.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/BasicCheckup.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/BasicCheckup_master.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: lint
on: [pull_request]

jobs:
Flask8Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Upload to PyPI on Release

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check if the release creator is the owner
id: check_owner
run: |
CREATOR=$(jq -r .release.creator.login $GITHUB_EVENT_PATH)
OWNER=$(jq -r .repository.owner.login $GITHUB_EVENT_PATH)
if [ "$CREATOR" != "$OWNER" ]; then
echo "The release creator is not the owner of the repository."
exit 1
fi
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.12

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install -r requirements-dev.txt
python3 -m pip install --upgrade build
- name: Build package
run: python3 -m build

- name: Install twine
run: python3 -m pip install --upgrade twine

- name: Check package
run: twine check dist/*

- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 -m twine upload dist/*
144 changes: 45 additions & 99 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,104 +2,50 @@ name: Unittests
on: [pull_request]

jobs:
Py38_Ubuntu1804:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Unittests
run: |
cd tests
python start.py
Python_3_12:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Unittests
working-directory: tests
run: python start.py

Py38_Ubuntu1604:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Unittests
run: |
cd tests
python start.py
Python_3_8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Unittests
working-directory: tests
run: python start.py

Py37_Ubuntu1804:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Unittests
run: |
cd tests
python start.py
Py37_Ubuntu1604:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Unittests
run: |
cd tests
python start.py
Py36_Ubuntu1804:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Unittests
run: |
cd tests
python start.py
Py36_Ubuntu1604:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Unittests
run: |
cd tests
python start.py
Python_3_7:
runs-on: uubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Unittests
working-directory: tests
run: python start.py
109 changes: 0 additions & 109 deletions .github/workflows/unittests_master.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,5 @@ dmypy.json
# End of https://www.gitignore.io/api/python

.idea/

.env
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python.formatting.provider": "black",
"editor.formatOnSave": true
}
Loading

0 comments on commit 61639a0

Please sign in to comment.