Skip to content

Commit b221f21

Browse files
authored
Merge pull request #1 from bcdev/yogesh-xxx-initial-commit
Add Gaiaflow library v0.0.1.dev0
2 parents 829e013 + 39b63a2 commit b221f21

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+10754
-1
lines changed

.github/workflows/gh_deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Install requirements
20+
run: pip install mkdocs mkdocs-material mkdocstrings mkdocstrings-python mkdocs-jupyter
21+
22+
- name: Deploy to GitHub Pages
23+
run: mkdocs gh-deploy --force

.github/workflows/publish.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Package and Publish to PyPi
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
python-tests:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.12"]
15+
16+
steps:
17+
- name: checkout xcube-clms
18+
uses: actions/checkout@v4
19+
20+
- name: Install Pixi
21+
run: curl -fsSL https://pixi.sh/install.sh | bash
22+
shell: bash
23+
24+
- name: Add Pixi to PATH
25+
run: echo "$HOME/.pixi/bin" >> $GITHUB_PATH
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
run: pixi add python=${{ matrix.python-version }} --no-install
29+
30+
- name: Install dependencies
31+
run: pixi install
32+
33+
- name: Linting with ruff
34+
run:
35+
pixi run check
36+
37+
- name: Install and Test
38+
run:
39+
pixi run test --cov=gaiaflow --cov-report=xml
40+
41+
- name: Upload coverage reports to Codecov
42+
uses: codecov/codecov-action@v4
43+
with:
44+
verbose: true
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
47+
48+
PyPi-Deploy:
49+
name: Publish Python Package to PyPI
50+
runs-on: ubuntu-latest
51+
needs: python-tests
52+
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- name: Set up Python
57+
uses: actions/setup-python@v5
58+
with:
59+
python-version: '3.x'
60+
61+
- name: Install dependencies
62+
run: |
63+
python -m pip install --upgrade pip
64+
pip install build
65+
66+
- name: Build package
67+
run: |
68+
python -m build
69+
70+
- name: Publish package to PyPI
71+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
72+
with:
73+
user: __token__
74+
password: ${{ secrets.PYPI_API_TOKEN }}
75+
verbose: true

.github/workflows/unittest.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Unittest Gaiaflow
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
unittest:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: ["3.12"]
13+
14+
steps:
15+
- name: checkout xcube-clms
16+
uses: actions/checkout@v4
17+
18+
- name: Install Pixi
19+
run: curl -fsSL https://pixi.sh/install.sh | bash
20+
shell: bash
21+
22+
- name: Add Pixi to PATH
23+
run: echo "$HOME/.pixi/bin" >> $GITHUB_PATH
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
run: pixi add python=${{ matrix.python-version }} --no-install
27+
28+
- name: Install dependencies
29+
run: pixi install
30+
31+
- name: Linting with ruff
32+
run:
33+
pixi run check
34+
35+
- name: Install and Test
36+
run:
37+
pixi run test --cov=gaiaflow --cov-report=xml
38+
39+
- name: Upload coverage reports to Codecov
40+
uses: codecov/codecov-action@v4
41+
with:
42+
verbose: true
43+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,5 @@ cython_debug/
205205
marimo/_static/
206206
marimo/_lsp/
207207
__marimo__/
208+
# pixi environments
209+
.pixi

CHANGES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Version 0.0.1 (in development)
2+
3+
This is an experimental version. A stable release will follow in the future.
4+
5+
* First implementation of Gaiaflow CLI tool for managing local MLOps
6+
infrastructure.
7+
* Moved all Docker files from the user’s cookiecutter project into this library.
8+
* A documentation site has been created.
9+
10+

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include src/docker_stuff/*

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
1-
# gaiaflow
1+
# Gaiaflow
2+
3+
[![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)
4+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff)
5+
[![Docs](https://img.shields.io/badge/docs-mkdocs-blue)](https://bcdev.github.io/gaiaflow/)
6+
![Static Badge](https://img.shields.io/badge/Airflow-3.0-8A2BE2?logo=apacheairflow)
7+
![Static Badge](https://img.shields.io/badge/MLFlow-darkblue?logo=mlflow)
8+
![Static Badge](https://img.shields.io/badge/MinIO-red?logo=minio)
9+
![Static Badge](https://img.shields.io/badge/Jupyter-grey?logo=jupyter)
10+
![Static Badge](https://img.shields.io/badge/Minikube-lightblue?logo=kubernetes)
11+
12+
13+
Gaiaflow is a local-first MLOps infrastructure python package tool that simplifies the process
14+
of building, testing, and deploying ML workflows.
15+
It provides an opinionated CLI for managing Airflow, MLflow, and other
16+
dependencies, abstracting away complex configurations, and giving you
17+
a smooth developer experience.
18+
19+
Gaiaflow is a tool that
20+
- provides you with a local MLOps infrastructure via a CLI tool with
21+
some prerequisites already installed.
22+
- handles the complex Airflow configuration and [Xcom](https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/xcoms.html)
23+
handling and provides the user a simpler interface for creating DAGs.
24+
- provides a [cookiecutter template](https://github.com/bcdev/gaiaflow-cookiecutter)
25+
to get started with your projects with a standardized structure.
26+
27+
- provides tools to deploy models locally and in production (in future)
28+
- provides clear documentation on how to setup production environment to run your
29+
workflows at scale (in future, private?)
30+
31+
32+
Prerequisites:
33+
- Docker
34+
- Docker compose
35+
- Miniforge
36+
- Mamba/Conda
37+
38+
To install it, you can do it via:
39+
40+
`pip install gaiaflow`
41+
42+
Check installation:
43+
44+
`gaiaflow --help`
45+
46+
You can read the documentation [here]()

docs/cli_ref.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# CLI Reference
2+
3+
To see options for any command, add `--help` at the end of your command.
4+
5+
```bash
6+
gaiaflow --help
7+
```
8+
9+
## `gaiaflow dev`
10+
11+
Manage local development services.
12+
13+
```bash
14+
gaiaflow dev [OPTIONS] COMMAND [ARGS]...
15+
```
16+
17+
**Commands**
18+
19+
- `start` – Start Gaiaflow dev services
20+
- `stop` – Stop Gaiaflow dev services
21+
- `restart` – Restart services
22+
- `cleanup` – Remove temporary context and state
23+
- `dockerize` – Build a Docker image of your ML package
24+
25+
**Example**
26+
27+
```bash
28+
gaiaflow dev start -p /path/to/project --service airflow --jupyter-port 8888
29+
```
30+
31+
32+
## `gaiaflow prod-local`
33+
Manage **production-like services** (via Minikube).
34+
35+
**Commands**
36+
37+
- `start` – Start production-like services
38+
- `stop` – Stop services
39+
- `restart` – Restart services
40+
- `dockerize` – Build image inside Minikube
41+
- `create-config` – Generate Airflow K8s config (debugging only)
42+
- `create-secret` – Create Kubernetes (K8s) secrets
43+
- `cleanup` – Remove Minikube-specific resources
44+
45+
**Example**
46+
47+
```bash
48+
gaiaflow prod-local start -p /path/to/project --force-new
49+
```
50+

0 commit comments

Comments
 (0)