foga 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. foga-0.1.0/.devcontainer/devcontainer.json +32 -0
  2. foga-0.1.0/.devcontainer/post-create.sh +33 -0
  3. foga-0.1.0/.github/workflows/ci.yml +36 -0
  4. foga-0.1.0/.github/workflows/publish.yml +59 -0
  5. foga-0.1.0/.gitignore +47 -0
  6. foga-0.1.0/AGENTS.md +69 -0
  7. foga-0.1.0/LICENSE +21 -0
  8. foga-0.1.0/PKG-INFO +533 -0
  9. foga-0.1.0/README.md +514 -0
  10. foga-0.1.0/RELEASING.md +93 -0
  11. foga-0.1.0/examples/qupled/fixtures/artifacts/demo-artifact.txt +1 -0
  12. foga-0.1.0/examples/qupled/foga.yml +105 -0
  13. foga-0.1.0/pyproject.toml +45 -0
  14. foga-0.1.0/skills/foga-config-authoring/SKILL.md +52 -0
  15. foga-0.1.0/skills/foga-config-authoring/agents/openai.yaml +3 -0
  16. foga-0.1.0/skills/foga-config-authoring/references/checklist.md +113 -0
  17. foga-0.1.0/skills/github-issue-workflow/SKILL.md +47 -0
  18. foga-0.1.0/skills/github-issue-workflow/agents/openai.yaml +3 -0
  19. foga-0.1.0/skills/github-issue-workflow/references/github-commands.md +74 -0
  20. foga-0.1.0/skills/pr-review-loop/SKILL.md +72 -0
  21. foga-0.1.0/skills/pr-review-loop/agents/openai.yaml +3 -0
  22. foga-0.1.0/skills/pr-review-loop/references/prompts.md +56 -0
  23. foga-0.1.0/skills/python-development/SKILL.md +80 -0
  24. foga-0.1.0/skills/python-development/agents/openai.yaml +3 -0
  25. foga-0.1.0/skills/python-development/references/python-standards.md +61 -0
  26. foga-0.1.0/src/foga/__init__.py +5 -0
  27. foga-0.1.0/src/foga/adapters/__init__.py +1 -0
  28. foga-0.1.0/src/foga/adapters/build.py +212 -0
  29. foga-0.1.0/src/foga/adapters/common.py +22 -0
  30. foga-0.1.0/src/foga/adapters/contracts.py +61 -0
  31. foga-0.1.0/src/foga/adapters/deploy.py +135 -0
  32. foga-0.1.0/src/foga/adapters/kinds.py +35 -0
  33. foga-0.1.0/src/foga/adapters/testing.py +192 -0
  34. foga-0.1.0/src/foga/cli/__init__.py +5 -0
  35. foga-0.1.0/src/foga/cli/app.py +87 -0
  36. foga-0.1.0/src/foga/cli/build.py +101 -0
  37. foga-0.1.0/src/foga/cli/clean.py +47 -0
  38. foga-0.1.0/src/foga/cli/common.py +58 -0
  39. foga-0.1.0/src/foga/cli/deploy.py +64 -0
  40. foga-0.1.0/src/foga/cli/inspect.py +607 -0
  41. foga-0.1.0/src/foga/cli/test.py +95 -0
  42. foga-0.1.0/src/foga/cli/validate.py +145 -0
  43. foga-0.1.0/src/foga/config/__init__.py +1 -0
  44. foga-0.1.0/src/foga/config/constants.py +9 -0
  45. foga-0.1.0/src/foga/config/loading.py +61 -0
  46. foga-0.1.0/src/foga/config/merge.py +182 -0
  47. foga-0.1.0/src/foga/config/models.py +352 -0
  48. foga-0.1.0/src/foga/config/parsing.py +341 -0
  49. foga-0.1.0/src/foga/config/values.py +231 -0
  50. foga-0.1.0/src/foga/errors.py +30 -0
  51. foga-0.1.0/src/foga/executor.py +95 -0
  52. foga-0.1.0/src/foga/output.py +117 -0
  53. foga-0.1.0/tests/conftest.py +10 -0
  54. foga-0.1.0/tests/test_adapters.py +227 -0
  55. foga-0.1.0/tests/test_cli.py +847 -0
  56. foga-0.1.0/tests/test_config.py +591 -0
  57. foga-0.1.0/tests/test_executor.py +52 -0
  58. foga-0.1.0/tests/test_inspect.py +44 -0
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "devkit",
3
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
4
+ "remoteUser": "vscode",
5
+ "features": {
6
+ "ghcr.io/devcontainers/features/python:1": {
7
+ "version": "3.11"
8
+ },
9
+ "ghcr.io/devcontainers/features/node:1": {
10
+ "version": "22"
11
+ }
12
+ },
13
+ "postCreateCommand": "bash .devcontainer/post-create.sh",
14
+ "runArgs": [
15
+ "--security-opt=seccomp=unconfined",
16
+ "--security-opt=apparmor=unconfined"
17
+ ],
18
+ "mounts": [
19
+ "type=bind,source=${localEnv:HOME}/.codex,target=/home/vscode/.codex"
20
+ ],
21
+ "customizations": {
22
+ "vscode": {
23
+ "extensions": [
24
+ "ms-python.python",
25
+ "ms-python.vscode-pylance",
26
+ "ms-vscode.cmake-tools",
27
+ "charliermarsh.ruff",
28
+ "openai.chatgpt"
29
+ ]
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ export DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install the native development toolchain that `devkit` users commonly need
8
+ # when building and testing Python packages with C/C++ bindings.
9
+ sudo apt-get update
10
+ sudo apt-get install -y --no-install-recommends \
11
+ build-essential \
12
+ bubblewrap \
13
+ clang \
14
+ cmake \
15
+ gdb \
16
+ git \
17
+ gh \
18
+ ninja-build \
19
+ pkg-config
20
+ sudo apt-get clean
21
+ sudo rm -rf /var/lib/apt/lists/*
22
+
23
+ # Upgrade pip first so editable installs and modern packaging tools behave
24
+ # consistently inside the fresh container image.
25
+ python3 -m pip install --upgrade pip
26
+
27
+ # Install this repository in editable mode together with the development
28
+ # dependencies used to build, test, and publish `devkit` itself.
29
+ python3 -m pip install -e ".[dev]"
30
+
31
+ # Install Codex in the container so the development environment matches the
32
+ # local workflow expected for this repository.
33
+ npm install -g @openai/codex
@@ -0,0 +1,36 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ verify:
11
+ name: Verify
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Check out repository
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Set up Python 3.11
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.11"
22
+
23
+ - name: Install project and development dependencies
24
+ run: python -m pip install -e ".[dev]"
25
+
26
+ - name: Lint with Ruff
27
+ run: ruff check .
28
+
29
+ - name: Run test suite
30
+ run: pytest
31
+
32
+ - name: Build package
33
+ run: python -m build
34
+
35
+ - name: Validate example configuration
36
+ run: foga --config examples/qupled/foga.yml validate
@@ -0,0 +1,59 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build:
11
+ name: Build Release Artifacts
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Check out repository
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Set up Python 3.11
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.11"
22
+
23
+ - name: Install project and development dependencies
24
+ run: python -m pip install -e ".[dev]"
25
+
26
+ - name: Run lint checks
27
+ run: ruff check .
28
+
29
+ - name: Run test suite
30
+ run: pytest
31
+
32
+ - name: Build package
33
+ run: python -m build
34
+
35
+ - name: Upload distribution artifacts
36
+ uses: actions/upload-artifact@v4
37
+ with:
38
+ name: python-package-distributions
39
+ path: dist/
40
+
41
+ publish-pypi:
42
+ name: Publish To PyPI
43
+ runs-on: ubuntu-latest
44
+ needs: build
45
+ environment:
46
+ name: pypi
47
+ url: https://pypi.org/p/foga
48
+ permissions:
49
+ id-token: write
50
+
51
+ steps:
52
+ - name: Download distribution artifacts
53
+ uses: actions/download-artifact@v4
54
+ with:
55
+ name: python-package-distributions
56
+ path: dist/
57
+
58
+ - name: Publish package distributions to PyPI
59
+ uses: pypa/gh-action-pypi-publish@release/v1
foga-0.1.0/.gitignore ADDED
@@ -0,0 +1,47 @@
1
+ # Python bytecode and caches
2
+ __pycache__/
3
+ **/__pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # Build and packaging artifacts
8
+ .Python
9
+ build/
10
+ dist/
11
+ site/
12
+ *.egg
13
+ *.egg-info/
14
+ .eggs/
15
+ pip-wheel-metadata/
16
+
17
+ # Virtual environments
18
+ .venv/
19
+ venv/
20
+ env/
21
+ ENV/
22
+
23
+ # Test and coverage output
24
+ .coverage
25
+ .coverage.*
26
+ .pytest_cache/
27
+ htmlcov/
28
+ .tox/
29
+ .nox/
30
+
31
+ # Type checker and linter caches
32
+ .mypy_cache/
33
+ .ruff_cache/
34
+ .pyre/
35
+
36
+ # Jupyter
37
+ .ipynb_checkpoints/
38
+
39
+ # Local tool state
40
+ .codex
41
+
42
+ # Editors and OS files
43
+ .vscode/
44
+ .idea/
45
+ *.swp
46
+ *.swo
47
+ .DS_Store
foga-0.1.0/AGENTS.md ADDED
@@ -0,0 +1,69 @@
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure & Module Organization
4
+
5
+ Application code lives under `src/foga/`. Keep CLI entrypoints in `src/foga/cli.py`, shared config handling in `src/foga/config.py`, execution helpers in `src/foga/executor.py`, and backend-specific command builders in `src/foga/adapters/`. Tests live in `tests/` and currently cover config loading, adapter behavior, and CLI routing. Example user configuration lives in `examples/qupled/foga.yml`. Use `README.md` for end-user setup. Track unfinished product work in GitHub issues and milestones.
6
+
7
+ ## Build, Test, and Development Commands
8
+
9
+ Set up a local environment with:
10
+
11
+ ```bash
12
+ pip install -e .[dev]
13
+ ```
14
+
15
+ Format the code with:
16
+
17
+ ```bash
18
+ ruff format .
19
+ ```
20
+
21
+ Run the test suite with:
22
+
23
+ ```bash
24
+ pytest
25
+ ```
26
+
27
+ Lint the code with:
28
+
29
+ ```bash
30
+ ruff check .
31
+ ```
32
+
33
+ Validate packaging metadata with:
34
+
35
+ ```bash
36
+ python -m build
37
+ ```
38
+
39
+ Exercise the CLI during development with commands such as `foga validate`, `foga build --profile mpi`, and `foga deploy --dry-run`. When using the devcontainer, `.devcontainer/post-create.sh` installs the same editable development environment automatically.
40
+
41
+ Shared Python implementation guidance lives in `skills/python-development/`. Use that skill when editing Python code, tests, packaging metadata, or developer-tooling configuration in this repository.
42
+ Shared GitHub execution guidance lives in `skills/github-issue-workflow/`. Use that skill when starting work from GitHub issues or when the task should end with an opened pull request.
43
+ Shared PR review coordination guidance lives in `skills/pr-review-loop/`. Use that skill when one agent should review a PR on GitHub and another agent should implement the published comments without relaying them manually in chat.
44
+
45
+ ## Coding Style & Naming Conventions
46
+
47
+ Target Python 3.10+ and use 4-space indentation. Follow existing module boundaries instead of adding large multi-purpose files. Prefer descriptive snake_case for functions, variables, and test names; keep class names in PascalCase. Match the repository’s current style: small focused functions, straightforward control flow, and minimal comments unless behavior is non-obvious. Run `ruff format .` and `ruff check .` for formatting and linting, and keep diffs consistent with surrounding code.
48
+
49
+ ## Testing Guidelines
50
+
51
+ Use `pytest` for all tests. Add new tests in `tests/` with filenames named `test_<area>.py` and test functions named `test_<behavior>()`. Cover both happy paths and invalid configuration or command-generation cases. Run `ruff format .`, `ruff check .`, and `pytest` before merging. Run `python -m build` when packaging metadata or install behavior changes. If you change CLI behavior, add or update CLI-facing tests before merging.
52
+
53
+ ## Commit & Pull Request Guidelines
54
+
55
+ Recent commits use short, imperative subjects such as `Add devcontainer bootstrap and development docs`. Keep commit titles concise and specific.
56
+
57
+ Before creating commits or changing git settings, check `.codex/` for repository-local git configuration instructions or other custom workflow notes.
58
+
59
+ Codex identity: use the repository's configured bot account for repository-local commits, branch pushes, pull request creation, and PR comments or reviews unless the user explicitly asks otherwise.
60
+
61
+ Development flow: work locally on a dedicated branch. One subprocess implements the change, and a separate subprocess reviews the local diff before any GitHub interaction. Address review findings locally before pushing or opening a pull request.
62
+
63
+ Pull request flow: after the PR is open, the human user is the reviewer. The human reviews on GitHub, leaves comments, and Codex resumes local development to address that feedback. Repeat the local edit plus internal review loop until the human is satisfied, then the human approves and merges.
64
+
65
+ When picking up work from GitHub issues, always create a dedicated branch before making changes and open a pull request when the work is complete. Pull requests should explain the user-facing change, note any config or CLI behavior differences, and list the verification performed, for example `ruff format .`, `ruff check .`, `pytest`, `python -m build`, or a representative `foga ... --dry-run` command. Include sample output only when it clarifies behavior. After opening the PR, stop and wait for user feedback instead of continuing automatically.
66
+
67
+ ## Configuration Notes
68
+
69
+ `foga` expects a root-level `foga.yml`. When adding new configuration fields or adapter behavior, update `README.md` and the example in `examples/qupled/foga.yml` so the documented workflow stays accurate.
foga-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Federico Lucco Castello
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.