-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor code and improve documentation in EzTaskManager
Reduced the complexity of command execution in the TaskQueueService for better code maintainability. Streamlined logging and error handling across various files for a more consistent user experience. Additionally, removed unnecessary lines and refined documentations, including docstrings, for better mass readability. Updated the GitHub workflows to boost the efficiency of the code development process.
- Loading branch information
Showing
18 changed files
with
242 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: on release creation test and upload to PyPI | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
|
||
jobs: | ||
|
||
lint-check: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9, 3.10] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Lint with flake8 | ||
run: | | ||
pip install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --ignore=C901 --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --ignore=C901 --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
test-dj4: | ||
needs: lint-check | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9, 3.10] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install "django" "file-read-backwards>=2.0.0" "uwsgidecorators-fallback>=0.0.3" "uwsgidecorators>=1.1.0" "pytz" | ||
- name: Test with pytest | ||
run: | | ||
export PYTHONPATH='.':$PYTHONPATH | ||
make test | ||
test-dj3: | ||
needs: lint-check | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9, 3.10] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install "django<4" "file-read-backwards>=2.0.0" "uwsgidecorators-fallback>=0.0.3" "uwsgidecorators>=1.1.0" "pytz" | ||
- name: Test with pytest | ||
run: | | ||
export PYTHONPATH='.':$PYTHONPATH | ||
make test | ||
test-dj2: | ||
needs: lint-check | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9, 3.10] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install "django<3" "file-read-backwards>=2.0.0" "uwsgidecorators-fallback>=0.0.3" "uwsgidecorators>=1.1.0" | ||
- name: Test with pytest | ||
run: | | ||
export PYTHONPATH='.':$PYTHONPATH | ||
make test | ||
deploy: | ||
needs: [test-dj2, test-dj3] | ||
name: Build and publish distributions to PyPI | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build distribution | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
/docs/_build/ | ||
/demoproject/htmlcov/ | ||
/demoproject/staticfiles/ | ||
__pycache__/ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,3 @@ | |
# Do not connect labels signals during tests | ||
LABELS_CONNECT_SIGNALS = False | ||
TOPICS_CONNECT_SIGNALS = False | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.