Skip to content

Commit

Permalink
fix: F401 [*] imported but unused
Browse files Browse the repository at this point in the history
Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>

WIP

Project refactor for beta release

Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>

WIP

WIP

WIP

WIP

WIP

WIP

WIP

Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>

WIP

Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>

WIP

Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>

WIP

Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>

WIP

WIP

WIP

WIP

Signed-off-by: William José Moreno Reyes <williamjmorenor@gmail.com>
  • Loading branch information
williamjmorenor committed Feb 6, 2024
1 parent d621969 commit d6ad12f
Show file tree
Hide file tree
Showing 63 changed files with 6,850 additions and 3,672 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
ports:
- 6379:6379
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:8
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD: mysqldatabase
MYSQL_DATABASE: mysqldatabase
MYSQL_USER: mysqldatabase
MYSQL_PASSWORD: mysqldatabase
ports:
- 3306:3306
postgres:
image: postgres:15
env:
POSTGRES_DB: postgresdb
POSTGRES_USER: postgresdb
POSTGRES_PASSWORD: postgresdb
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
Expand All @@ -66,8 +30,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -r test.txt
python -m pip install git+https://github.com/maxcountryman/flask-login.git
python -m pip install git+https://github.com/alanhamlett/flask-caching.git
- name: Run lint file
run: |
rm -rf build
Expand All @@ -77,14 +39,5 @@ jobs:
- name: Test with SQLite
run: |
CI=True pytest -v --exitfirst --cov=now_lms
- name: Test with SQLite/Redis Cache
run: |
CI=True DATABASE_URL=sqlite:// CACHE_REDIS_HOST=localhost CACHE_REDIS_PORT=6379 pytest -v --exitfirst --cov=now_lms
- name: Test with pytest/Postgres
run: |
# DATABASE_URL=postgresql://postgresdb:postgresdb@localhost:5432/postgresdb pytest -v --exitfirst --cov=now_lms
- name: Test with pytest/MySQL
run: |
# DATABASE_URL=mysql://mysqldatabase:mysqldatabase@localhost:3306/mysqldatabase pytest -v --exitfirst --cov=now_lms
- name: Codecov
uses: codecov/codecov-action@v1
41 changes: 41 additions & 0 deletions .github/workflows/refactor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Refactor

on:
push:
branches: [project_refactor]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# 3.8 Shared hosting
# 3.9 Ubi minimal
# 3.12 Last release
python-version: [3.8]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r test.txt
- name: Run lint file
run: |
rm -rf build
python -m build
python -m twine check dist/*
bash .lint.sh
- name: Test with SQLite
run: |
CI=True pytest -v --exitfirst --cov=now_lms
- name: Codecov
uses: codecov/codecov-action@v1
Loading

0 comments on commit d6ad12f

Please sign in to comment.