Houston is a REST API component within the CODEX application suite. It is used to glue the frontend Wildbook-IA.
flask_restx_patched
folder), so it can handle Marshmallow schemas and Webargs arguments.The Wild Me team is working to sunset the Codex product. As such, contributions will be reviewed at a lower priority than active products. If you want to provide contributions, the information below is the most up-to-date information available.
To start, you will need to be signed in to your GitHub account, have admin access to your OS's terminal, and have Git installed.
git clone --recurse-submodules https://github.com/USERNAME/houston
cd houston
git remote add upstream https://github.com/WildMeOrg/houston
git fetch upstream
You will want to work in a branch when doing any feature development you want to provide to the original project.
git checkout main
git branch ISSUENUMBER-FEATUREBRANCHNAME
git checkout ISSUENUMBER-FEATUREBRANCHNAME
git pull upstream main
Make the code changes necessary for the issue you're working on. The following git commands may prove useful.
git log
: lastest commits of current branchgit status
: current staged and unstaged modificationsgit diff --staged
: the differences between the staging area and the last commitgit commit
: commits the stagged files, opens a text editor for you to write a commit logSet up the tools needed:
houston
directorysudo apt install docker
sudo apt install docker-compose
pip install pre-commit
./scripts/codex/activate.sh
sudo sysctl -w vm.max_map_count=262144
Manage your container:
docker-compose up
to bring up the container.docker-compose down
to bring down the container.docker-compose up -build
Up to this point, all changes have been done to your local copy of Houston. You need to push the new commits to a remote branch to start the PR process.
git push <remote> <local branch>
git push origin ISSUENUMBER-FEATUREBRANCHNAME
At this point, it's on us to get you feedback on your submission! Someone from the Wild Me team will review the project and provide any feedback that may be necessary. If changes are recommended, you'll need to checkout the branch you were working from, update the branch, and make these changes locally.
git checkout ISSUENUMBER-FEATUREBRANCHNAME
git pull upstream main
git add <filename>
for all files impacted by changesgit commit --ammend
if the changes are small stylistic changesgit commit
if the changes involved significant rework and require additional detailsSee Contributing to Houston for code styles and other information.
See Background and Periodic Tasks
Open online interactive API documentation: http://127.0.0.1:5000/api/v1/
Autogenerated swagger config is always available from http://127.0.0.1:5000/api/v1/swagger.json
NOTE: Use On/Off switch in documentation to sign in.
To build and view the documentation use the following commands:
cd docs
pip install -r requirements.txt
make html
open _build/html/index.html
This project requires either Python >= 3.7 or Docker.
The tus portions of this application require Redis to facilitate resumable file uploads.
GitLab (community edition) is required for asset and submission storage and management.
Postgres is an optional dependency that can be used for a highly reliable scaled database solution.
There are some site settings that some features are dependent on:
Site setting name | Environment variable | |
---|---|---|
flatfileKey |
FLATFILE_KEY |
Flatfile API key for bulk upload |
recaptchaPublicKey |
RECAPTCHA_PUBLIC_KEY |
Recaptcha site key (disabled if empty) |
recaptchaSecretKey |
RECAPTCHA_SECRET_KEY |
Recaptcha secret key |
googleMapsApiKey |
GOOGLE_MAPS_API_KEY |
Google maps API key (sighting report form) |
email_service |
DEFAULT_EMAIL_SERVICE |
e.g. "mailchimp" |
email_service_username |
DEFAULT_EMAIL_SERVICE_USERNAME |
mailchimp username |
email_service_password |
DEFAULT_EMAIL_SERVICE_PASSWORD |
mailchimp password |
The way these site settings work is:
site_setting
for key, return value if existsFor example, you can set the environment variables in the .env
file or use docker-compose.override.yml
to override the environment variables without having to edit any checked in files. Run docker-compose up -d
to update any affected containers.
Register at https://www.google.com/recaptcha/admin/create for reCAPTCHA v3
.
Add the site (public) key and secret key to docker-compose.override.yml
:
services:
houston:
environment:
RECAPTCHA_PUBLIC_KEY: "recaptcha-public-key"
RECAPTCHA_SECRET_KEY: "recaptcha-secret-key"
docker-compose up -d
to update running services.
Settings can also be set via SiteSetting
, the keys are
recaptchaPublicKey
and recaptchaSecretKey
.
This software is subject to the provisions of MIT License. See LICENSE
for details. Copyright (c) 2023 Wild Me