The Scheduler is an automated tool for the Gemini Observatory, designed to generate and optimize observation schedules as part of the GPP project. It uses the lucupy library for modeling and supports both standalone and service modes, as well as a Jupyter-based UI for experimentation.
- Automated scheduling of observations
- GraphQL API for integration with Gemini Program Platform
- Jupyter notebooks for interactive exploration
- Docker support for easy deployment
Before running the scheduler, set the following environment variables:
PYTHONPATH
: Should include the project base path.REDISCLOUD_URL
: Redis connection string (contact project staff for credentials).APP_VERSION
: Application version (e.g.,dev
).
Example:
export PYTHONPATH=$PYTHONPATH:/path/to/scheduler
export REDISCLOUD_URL=redis://<USER>:<PASSWORD>@redisserver.ec2.cloud.redislabs.com:12345
export APP_VERSION=dev
Note:
To ensure GitHub Actions secrets (such asREDISCLOUD_URL
) are available for testing and CI, all contributions should be made from branches within the main repository, not from forks.
-
Clone the main repository:
git clone https://github.com/gemini-hlsw/scheduler.git cd scheduler
-
Create a new feature branch:
git checkout -b your-feature-branch
-
Work on your changes and commit as usual.
-
Rebase your branch with the latest main branch before pushing:
git fetch origin git rebase origin/main
-
Push your branch to the main repository:
git push origin your-feature-branch
-
Open a Pull Request from your feature branch to
main
in the main repository.
Do not use the GitHub fork workflow.
Opening pull requests from forks will not have access to required repository secrets, and CI/CD workflows may fail.
Using uv
:
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
uv sync
#### Run the Scheduler
Standalone script:
```shell
uv run python scheduler/main.py
As a service:
uv run python scheduler/main.py
Build and run the container:
docker build -t scheduler .
docker run -dp 8000:8000 scheduler
Access the GraphQL console at http://localhost:8000/graphql.
To update your local repository and dependencies:
git pull
pip install -U lucupy
If you encounter issues, ensure you have the latest version of lucupy
and all dependencies.
For help, contact the project maintainers