-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0a2cca
commit d5af9ee
Showing
5 changed files
with
145 additions
and
65 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,39 @@ | ||
# Move to the backend directory | ||
cd back\ | ||
|
||
# Make sure you have python 3.11 installed | ||
if (-not (python --version) -match "3.11") { | ||
Write-Host "Please install python 3.11" | ||
exit 1 | ||
} | ||
|
||
# Make sure the build directory exists | ||
if (-not (Test-Path "build")) { | ||
New-Item -ItemType Directory -Name "build" | ||
} | ||
|
||
if (-not (Test-Path "build\.venv")) { | ||
# Create a virtual environment if it doesn't exist | ||
python -m venv build\.venv | ||
} | ||
|
||
build\.venv\Scripts\pip install -U pip setuptools wheel | ||
|
||
build\.venv\Scripts\pip install pyinstaller | ||
|
||
# Install whombat | ||
build\.venv\Scripts\pip install . | ||
|
||
# Run pyinstaller to bundle whombat into an executable file | ||
build\.venv\Scripts\pyinstaller ` | ||
--hidden-import "app" ` | ||
--hidden-import "aiosqlite" ` | ||
--hidden-import "logging.config" ` | ||
--hidden-import "passlib.handlers.bcrypt" ` | ||
--add-data "src\whombat\migrations;whombat\migrations" ` | ||
--add-data "src\whombat\statics;whombat\statics" ` | ||
--add-data "src\whombat\user_guide;whombat\user_guide" ` | ||
--add-data "alembic.ini;." ` | ||
--name whombat ` | ||
--onefile ` | ||
app.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
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,25 @@ | ||
# This script is used to update the front end of the website | ||
|
||
# Move to the root directory of the backend | ||
cd back | ||
|
||
# Delete the old static files | ||
Remove-Item -Path src/whombat/statics/* -Recurse -Force | ||
|
||
# Go to the root directory of the frontend | ||
cd ../front | ||
|
||
# Install the dependencies | ||
npm install | ||
|
||
# Run the build script | ||
npm run build | ||
|
||
# Make sure the statics folder exists | ||
if (-not (Test-Path "../back/src/whombat/statics")) { | ||
New-Item -Path "../back/src/whombat/statics" -ItemType Directory | Out-Null | ||
} | ||
|
||
# Move the static files to the backend | ||
Move-Item -Path out/* -Destination ../back/src/whombat/statics/ -Force | ||
|
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,16 @@ | ||
# Move to the root directory of the backend | ||
cd back | ||
|
||
# Make sure there is a virtual environment | ||
if (-not (Test-Path .venv)) { | ||
python -m venv .venv | ||
} | ||
|
||
# Activate virtual environment | ||
.venv\Scripts\activate | ||
|
||
# Install necessary packages | ||
pip install .[docs] | ||
|
||
# Build the user guide | ||
make build-guide |