Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Telescope Schedule Optimization (TSO) A tool for assessing a variety of constraints involved in extra-planetary observation to generate a most optimal schedule configuration.

License

Notifications You must be signed in to change notification settings

elijah-ward/TSO

Repository files navigation

Telescope Schedule Optimizer (TSO)

Observe freely :)

TSO

TSO is a scheduling tool written in Python for use by astronomical researchers in order to consider a wide variety of constraints and attempt to produce an optimal observation schedule.

Getting Started

Installation

The main entrypoint into TSO is through the tsocli sub-module. The details can be found in the README of the submodule.

To install the cli tool just execute the following

  1. pip install -e . (install the project)
  2. tsocli -h start learning/using the entrypoint

Useful Tools

Conda

In this repository there is an environment.yml file that contains information about the dependencies required by this project. It also specifies tso as the name of the environment.

Creating a New Environment in Conda From an environment.yml File

conda env create -f environment.yml

Switching Environments Created Using Conda

MacOS/Linux

source activate tso

Windows

activate tso

Docker

If you'd like to work against a lightweight instance of the database or do some rapid iteration on test data sets, Docker can be of use to you while working on this project.
Docker can be installed here and docker-compose can be installed here.

Standing up a local MySQL database using Docker

From the root of the project execute the following:

docker-compose up --build -d

This executes docker-compose which will read the docker-compose.yml file and stand up docker containers with the images defined there. The --build flag tells it to always build a new image (in case of changes). -d tells it to run in "detached" mode (or else it will take over your prompt to display the container logs).

Applying Database Migrations

From the root of the project:

  1. cd db
  2. ./maintain_db migrate

This will run a container with a tool called Flyway within. It will run the scripts within the db/migrations directory (likely just the schema). It will also run any scripts in the db/sample-data where we will house scripts that insert test data.

Generate test data

There are two ways for generating test TSO data. A python script supports these methods.

generate_test_data.py Methodology

  1. Using generate_test_data.py sql -- Connecting directly to DB through python and executing statements
  2. Using generate_test_data.py file -- Outputting a file locally to be used with flyway/Docker....other methods.

Cleaning the database

Sometimes it can be useful to start from a fresh database (most useful to pick up changes you have made to test data, for example). Since we are not working with a production database, we need not worry about wiping our local database clean and starting over.

From the root of the project:

  1. cd db
  2. ./maintain_db clean

You can now apply migrations again against a clean database.

Maintainers

Credits

Icons made by Eleonor Wang from www.flaticon.com is licensed by CC 3.0 BY

About

Telescope Schedule Optimization (TSO) A tool for assessing a variety of constraints involved in extra-planetary observation to generate a most optimal schedule configuration.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •