-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from punch-mission/prepare-open
Prepare open version
- Loading branch information
Showing
15 changed files
with
187 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build -s | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.12" | ||
|
||
|
||
# Build documentation in the "docs/" directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
formats: | ||
- epub | ||
|
||
# Optional but recommended, declare the Python requirements required | ||
# to build your documentation | ||
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | ||
python: | ||
install: | ||
- method: pip | ||
extra_requirements: | ||
- all | ||
- docs | ||
path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,36 @@ | ||
# punchpipe | ||
|
||
`punchpipe` is the data processing pipeline for [the PUNCH mission](https://punch.space.swri.edu/). | ||
All the science code and actual calibration functionality lives in `punchbowl`. This package | ||
only automates the control segment for the Science Operations Center. | ||
|
||
> [!CAUTION] | ||
> This package is still being developed. There will be breaking code changes until v1. | ||
> We advise you to wait until then to use it. | ||
The `punchpipe` is organized into segments, i.e. levels of processing to produce specific | ||
data products. Segments are referred in code by their ending level, | ||
e.g. `level1` means the Level 0 to Level 1 segment. | ||
|
||
## Accessing the data | ||
|
||
Coming soon. | ||
|
||
## First-time setup | ||
1. Create a clean virtual environment. You can do this with conda using `conda env create --name ENVIRONMENT-NAME` | ||
2. Install `punchbowl` using `pip install .` in the `punchbowl` directory. | ||
3. Install `punchpipe` using `pip install .` while in this directory | ||
4. Set up database credentials Prefect block by running `python scripts/credentials.py`. | ||
- If this file does not exist for you. You need to determine your mySQL credentials then create a block in Python: | ||
```py | ||
from punchpipe.controlsegment.db import MySQLCredentials | ||
cred = MySQLCredentials(user="username", password="password") | ||
cred.save('mysql-cred') | ||
``` | ||
5. Set up databases by running `scripts/create_db.py` directory. | ||
6. Build all the necessary deployments for Prefect by following [these instructions](https://docs.prefect.io/concepts/deployments/). | ||
- See below for an example: | ||
```shell | ||
./deploy.sh | ||
``` | ||
7. Create a work queue in the Prefect UI for the deployments (will need to run `prefect orion start` to get the UI) | ||
8. Create an agent for the work queue by following instructions in the UI | ||
|
||
Coming soon. | ||
|
||
## Running | ||
1. Make sure first-time setup is complete | ||
2. Launch Prefect using `prefect orion start` | ||
3. Create agents for the work queues by following the instructions in the UI for the work queue | ||
|
||
## Resetting | ||
1. Reset the Prefect Orion database using `prefect orion database reset`. | ||
2. Remove all the `punchpipe` databases by running `erase_db.sql` | ||
Coming soon. | ||
|
||
## Getting help | ||
|
||
Please open an issue or discussion on this repo. | ||
|
||
## Contributing | ||
|
||
## Licensing | ||
We encourage all contributions. | ||
If you have a problem with the code or would like to see a new feature, please open an issue. | ||
Or you can submit a pull request. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.