A personal homepage.
python3 -m pip install -r requirements-dev.txt
pre-commit install
flask --debug --app src/app:app run --port 50505
Then open the website at localhost:5000.
Run the unit tests:
python3 -m pytest
Run the accessibility tests:
playwright install --with-deps
python3 -m pytest src/tests/axe_analysis.py
This project is designed for deployment on Azure Static Web Apps.
Steps for deployment:
-
Sign up for a free Azure account and create an Azure Subscription.
-
Install the Azure Developer CLI. (If you open this repository in Codespaces or with the VS Code Dev Containers extension, that part will be done for you.)
-
Login to Azure:
azd auth login
-
Provision and deploy all the resources:
azd up
It will prompt you to provide an
azd
environment name (like "django-app"), select a subscription from your Azure account, and select a location (like "eastus"). Then it will provision the resources in your account and deploy the latest code. If you get an error with deployment, changing the location can help, as there may be availability constraints for some of the resources. -
When
azd
has finished deploying, you'll see an endpoint URI in the command output. Visit that URI to see the website. -
When you've made any changes to the app code, you can just run:
azd deploy
This project includes a Github workflow for deploying the resources to Azure on every push to main. That workflow requires several Azure-related authentication secrets to be stored as Github action secrets. To set that up, run:
azd pipeline config