dschwartznyc / open-astro-org-web-service

Moved to: https://github.com/ftadvisory/open-astro-org-web-service

Home Page:https://github.com/ftadvisory/open-astro-org-web-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAstroWebService

Webservice to generate Astrological charts using a trimmed down version of OpenAstro.org (https://github.com/pascallemazurier/openastro-dev) and the full version of Pyswisseph which is a python implementation of swiss ephemeris (https://github.com/astrorigin/pyswisseph).

The source applications were re-engineered to be deployed as a web service with Docker deployment. All source and configurations for the deployment are included in this repository.

Consistent with the OpenAstro and Pysswisseph projects, this is published under the GNU Affero General Public License version 3. See the LICENSE.txt file.

Note that the original swisseph library is distributed under a dual licensing system: GNU Affero General Public License, or Swiss Ephemeris Professional License. For more information, see file libswe/LICENSE.

Instructions to setup (assuming use of VS Code)

  • uses ZSH scripts to build (will require changing the permission of these scripts to enable execution)

  • Requires Python 3.9 or higher and a docker environment

  • A valid project is required to run on gcp

  • Setup a virtual Python environment (https://code.visualstudio.com/docs/python/environments) in the project's root directory

    • python3 -m venv .venv
    • source ./.venv/bin/activate
  • Confirm that Python is installed

    • which python (should point to the virtual environment setup above)
    • python --version (should be Python 3.9+)
  • Change the permissions for the shell scripts

    • chmod 744 *.zsh
  • Setup the development environment (loads required packages)

    • ./setDevEnv.zsh
  • To build the python packages run:

    • ./package-build.zsh
  • To deploy to docker and run (on port 5000)

    • ./docker-build.zsh
  • To test the docker deployment

    • http://localhost:5000

    • will return: "Web Service for OpenAstro v1.1.57"

    • python ./test/invokeService.py

    • will return the chart for Joanne Woodward

    • ./test/test-webservice-and-cleanup.zsh

    • will install needed packages, test the docker deployment and remove the packages

  • To deploy to GCP - after editing gcloud-build.zsh to point to the GCP project

    • ./gloud-build.zsh
  • To test the GCP installation

    • http://your-gcp-url

    • will return: "Web Service for OpenAstro v1.1.57"

    • And after editing invokeService.py to point to the GCP deployment

    • ./test/invokeService.py

    • will return the chart for Joanne Woodward

About

Moved to: https://github.com/ftadvisory/open-astro-org-web-service

https://github.com/ftadvisory/open-astro-org-web-service

License:GNU General Public License v3.0


Languages

Language:Python 96.4%Language:Shell 2.0%Language:Dockerfile 1.6%