Skip to content

Commit

Permalink
Parameterize fastapi-github example with environment vars (#3078)
Browse files Browse the repository at this point in the history
## 📝 Summary

Detects `GITHUB_REPO` and `REPO_ROOT` environment variables if set,
falling back to default in marimo.

(I believe this is the desired behavior of the script)

<!--
Provide a concise summary of what this pull request is addressing.

If this PR fixes any issues, list them here by number (e.g., Fixes
#123).
-->

## 🔍 Description of Changes

Just detects `GITHUB_REPO` and `REPO_ROOT` environment variables if set.

<!--
Detail the specific changes made in this pull request. Explain the
problem addressed and how it was resolved. If applicable, provide before
and after comparisons, screenshots, or any relevant details to help
reviewers understand the changes easily.
-->

## 📋 Checklist

- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [ ] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [ ] I have added tests for the changes made.
- [ ] I have run the code and verified that it works as expected.

## 📜 Reviewers

@mscolnick
  • Loading branch information
manzt authored Dec 6, 2024
1 parent 84e5f35 commit 4129e02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/frameworks/fastapi-github/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
logger = logging.getLogger(__name__)

# Constants
GITHUB_REPO = "marimo-team/marimo"
ROOT_DIR = "examples/ui"
GITHUB_REPO = os.environ.get("GITHUB_REPO", "marimo-team/marimo")
ROOT_DIR = os.environ.get("ROOT_DIR", "examples/ui")
templates_dir = os.path.join(os.path.dirname(__file__), "templates")

# Set up templates
Expand Down

0 comments on commit 4129e02

Please sign in to comment.