-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated files and added automated tests
- Loading branch information
Showing
18 changed files
with
891 additions
and
17 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
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,37 @@ | ||
name: Python Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
python-version: ["3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run build script | ||
run: | | ||
apt-get update && apt-get ffmpeg libsm6 build-essential cmake libxext6 | ||
pip install --upgrade setuptools | ||
pip install dlib --verbose | ||
cd src | ||
pip install -r requirements.txt | ||
shell: bash | ||
- name: Install dependencies | ||
run: | | ||
cd tests | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
- name: Test with pytest | ||
uses: dariocurr/pytest-summary@main | ||
with: | ||
output: test-summary.md | ||
paths: tests/**.py |
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,6 +1,7 @@ | ||
.env | ||
database.db | ||
src/database.db | ||
__pycache__/ | ||
.pytest_cache/ | ||
env/ | ||
instance/ | ||
|
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,29 @@ | ||
# Create virtual environment | ||
venv: | ||
python -m venv env | ||
|
||
# Activate virtual environment | ||
activate: | ||
source env/Scripts/activate | ||
|
||
# Lint files | ||
lint: | ||
black src && isort src | ||
|
||
# Install requirements | ||
install: | ||
cd src && pip install -r requirements.txt | ||
|
||
# Run init script | ||
init: | ||
sh init.sh | ||
|
||
# Start application | ||
start: | ||
python app.py | ||
|
||
tests: | ||
cd tests && pytest . -W ignore::DeprecationWarning --verbose --html=report.html | ||
|
||
# Default target | ||
all: venv activate install init start |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
#!/bin/bash | ||
for i in {1..20}; do python init.py; done | ||
echo "SETTING UP APPLICATION..." | ||
for i in {1..20}; do python init.py; done | ||
echo "APPLICATION SETUP COMPLETE!" |
2 changes: 0 additions & 2 deletions
2
src/templates/static/courses/501/attendance/2023-02-21-attendance.csv
This file was deleted.
Oops, something went wrong.
Empty 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
body { | ||
font-family: Helvetica, Arial, sans-serif; | ||
font-size: 12px; | ||
/* do not increase min-width as some may use split screens */ | ||
min-width: 800px; | ||
color: #999; | ||
} | ||
|
||
h1 { | ||
font-size: 24px; | ||
color: black; | ||
} | ||
|
||
h2 { | ||
font-size: 16px; | ||
color: black; | ||
} | ||
|
||
p { | ||
color: black; | ||
} | ||
|
||
a { | ||
color: #999; | ||
} | ||
|
||
table { | ||
border-collapse: collapse; | ||
} | ||
|
||
/****************************** | ||
* SUMMARY INFORMATION | ||
******************************/ | ||
#environment td { | ||
padding: 5px; | ||
border: 1px solid #E6E6E6; | ||
} | ||
#environment tr:nth-child(odd) { | ||
background-color: #f6f6f6; | ||
} | ||
|
||
/****************************** | ||
* TEST RESULT COLORS | ||
******************************/ | ||
span.passed, | ||
.passed .col-result { | ||
color: green; | ||
} | ||
|
||
span.skipped, | ||
span.xfailed, | ||
span.rerun, | ||
.skipped .col-result, | ||
.xfailed .col-result, | ||
.rerun .col-result { | ||
color: orange; | ||
} | ||
|
||
span.error, | ||
span.failed, | ||
span.xpassed, | ||
.error .col-result, | ||
.failed .col-result, | ||
.xpassed .col-result { | ||
color: red; | ||
} | ||
|
||
/****************************** | ||
* RESULTS TABLE | ||
* | ||
* 1. Table Layout | ||
* 2. Extra | ||
* 3. Sorting items | ||
* | ||
******************************/ | ||
/*------------------ | ||
* 1. Table Layout | ||
*------------------*/ | ||
#results-table { | ||
border: 1px solid #e6e6e6; | ||
color: #999; | ||
font-size: 12px; | ||
width: 100%; | ||
} | ||
#results-table th, | ||
#results-table td { | ||
padding: 5px; | ||
border: 1px solid #E6E6E6; | ||
text-align: left; | ||
} | ||
#results-table th { | ||
font-weight: bold; | ||
} | ||
|
||
/*------------------ | ||
* 2. Extra | ||
*------------------*/ | ||
.log { | ||
background-color: #e6e6e6; | ||
border: 1px solid #e6e6e6; | ||
color: black; | ||
display: block; | ||
font-family: "Courier New", Courier, monospace; | ||
height: 230px; | ||
overflow-y: scroll; | ||
padding: 5px; | ||
white-space: pre-wrap; | ||
} | ||
.log:only-child { | ||
height: inherit; | ||
} | ||
|
||
div.image { | ||
border: 1px solid #e6e6e6; | ||
float: right; | ||
height: 240px; | ||
margin-left: 5px; | ||
overflow: hidden; | ||
width: 320px; | ||
} | ||
div.image img { | ||
width: 320px; | ||
} | ||
|
||
div.video { | ||
border: 1px solid #e6e6e6; | ||
float: right; | ||
height: 240px; | ||
margin-left: 5px; | ||
overflow: hidden; | ||
width: 320px; | ||
} | ||
div.video video { | ||
overflow: hidden; | ||
width: 320px; | ||
height: 240px; | ||
} | ||
|
||
.collapsed { | ||
display: none; | ||
} | ||
|
||
.expander::after { | ||
content: " (show details)"; | ||
color: #BBB; | ||
font-style: italic; | ||
cursor: pointer; | ||
} | ||
|
||
.collapser::after { | ||
content: " (hide details)"; | ||
color: #BBB; | ||
font-style: italic; | ||
cursor: pointer; | ||
} | ||
|
||
/*------------------ | ||
* 3. Sorting items | ||
*------------------*/ | ||
.sortable { | ||
cursor: pointer; | ||
} | ||
|
||
.sort-icon { | ||
font-size: 0px; | ||
float: left; | ||
margin-right: 5px; | ||
margin-top: 5px; | ||
/*triangle*/ | ||
width: 0; | ||
height: 0; | ||
border-left: 8px solid transparent; | ||
border-right: 8px solid transparent; | ||
} | ||
.inactive .sort-icon { | ||
/*finish triangle*/ | ||
border-top: 8px solid #E6E6E6; | ||
} | ||
.asc.active .sort-icon { | ||
/*finish triangle*/ | ||
border-bottom: 8px solid #999; | ||
} | ||
.desc.active .sort-icon { | ||
/*finish triangle*/ | ||
border-top: 8px solid #999; | ||
} |
Binary file not shown.
Oops, something went wrong.