- Created LOCAL_DEVELOPMENT_GUIDE.md and DEPLOYMENT_GUIDE_MANUAL.md from legacy txt files. - Migrated country/time_zone data and requirements.txt to documentation/reference_data/. - Removed redundant admin/documentation/ and admin/data_files/ directories. - Enhanced app/lib_schema_v3.py to explicitly capture 'required' fields from DB 'NOT NULL' constraint. - Added verification tests for schema logic and standalone DB connectivity.
1.8 KiB
1.8 KiB
Local Development Guide
This guide provides instructions for setting up and running the Aether API locally for development.
1. Prerequisites
- Python 3.9+ (or as specified in
requirements.txt) virtualenvorvenv
2. Setup Procedure
Create and Activate Environment
# Go to root of application
cd ~/path/to/directory/aether_api_fastapi/
# Create new application environment
virtualenv environment
# Activate application environment
source environment/bin/activate
Install Requirements
# Install application requirements
pip install -r admin/requirements.txt
# Troubleshooting/Force Reinstall if needed:
# pip install --upgrade --force-reinstall -r admin/requirements.txt
# pip install --ignore-installed -r admin/requirements.txt
3. Running the Application
Start with Uvicorn (Reload enabled)
uvicorn app.main:app --host 0.0.0.0 --port 5005 --reload
Accessing the API
The application will be available at:
- API Root: http://localhost:5005
- Swagger Docs: http://localhost:5005/docs
4. Git Workflow Basics
Initialization
git init
git remote add origin https://scott_idem@bitbucket.org/oneskyit/one-sky-it-api.git
Basic Commands
# Adding and committing
git add .
git commit -m 'Your commit message'
# Pushing to branches
git push -u origin master
git push -u origin development
Branch Management
# List branches
git branch -a
# Create and switch to new branch
git branch new-branch-name
git switch new-branch-name
5. Deployment Basics (Manual)
If you are cloning for the first time on a server:
git clone https://scott_idem@bitbucket.org/oneskyit/one-sky-it-api-fastapi.git /srv/http/destination_path