-
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.
Merge pull request #7 from NikhilRaikar17/FTR-1-refactor-old-code
Refactored old_code and bought it to sync with python 3.10
- Loading branch information
Showing
27 changed files
with
761 additions
and
1,390 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,39 @@ | ||
name: Flask App Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8.x' | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
working-directory: e_invoice | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run Flask app | ||
working-directory: e_invoice | ||
run: | | ||
nohup python manage.py > server.log 2>&1 & | ||
echo $! > flask_server.pid | ||
- name: Test /login route | ||
run: | | ||
sleep 10 # Wait for the server to start | ||
curl -s --head http://127.0.0.1:5000/login | head -n 10 | ||
- name: Stop Flask app | ||
run: | | ||
kill $(cat flask_server.pid) | ||
continue-on-error: true |
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
*.pyc | ||
.idea | ||
/.vscode | ||
__pycache__ | ||
__pycache__ |
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,61 @@ | ||
exclude: | | ||
(?x)^( | ||
.*\.xml$| # Exclude all XML files | ||
venv/.*| # Exclude everything in the venv directory | ||
.*\.pyc$| # Exclude all Python compiled files | ||
\.idea/.*| # Exclude everything in the .idea directory | ||
\.vscode/.*| # Exclude everything in the .vscode directory | ||
__pycache__/.* # Exclude everything in the __pycache__ directory | ||
application/static/.* # Exclude everything in the application/static directory | ||
)$ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: double-quote-string-fixer | ||
- id: name-tests-test | ||
- id: requirements-txt-fixer | ||
- repo: https://github.com/asottile/setup-cfg-fmt | ||
rev: v2.5.0 | ||
hooks: | ||
- id: setup-cfg-fmt | ||
|
||
- repo: https://github.com/asottile/reorder-python-imports | ||
rev: v3.13.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/) | ||
args: [--py39-plus, --add-import, 'from __future__ import annotations'] | ||
|
||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v3.1.0 | ||
hooks: | ||
- id: add-trailing-comma | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.16.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py39-plus] | ||
|
||
- repo: https://github.com/hhatto/autopep8 | ||
rev: v2.3.1 | ||
hooks: | ||
- id: autopep8 | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 7.1.0 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.10.1 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [types-all] | ||
exclude: ^testing/resources/ |
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 |
---|---|---|
@@ -1 +1 @@ | ||
web: gunicorn manage:gunicorn_app --log-file - | ||
web: gunicorn manage:gunicorn_app --log-file - |
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.