Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add env var: MESOP_APP_BASE_PATH #1057

Merged
merged 6 commits into from
Nov 2, 2024

Conversation

wwwillchen
Copy link
Collaborator

@wwwillchen wwwillchen commented Oct 26, 2024

This adds MESOP_APP_BASE_PATH as a new configuration via env var to support the use case where os.getcwd() cannot be reliably used as the app base path. Specifically, if you want to build a pip package CLI app that runs Mesop, using the cwd isn't feasible because the app user can be running the CLI command from an arbitrary directory (and not the mesop app directory). I suspect this is a pretty niche use case so I don't think most people will need to use this.

Note: the testing for this isn't that great (it's not trivial to cover the pip CLI use case with our current integration test infra), but it covers the static folder case.

@wwwillchen wwwillchen changed the title MESOP_STATIC_FILES_BASE_PATH MESOP_APP_BASE_PATH Oct 26, 2024
@wwwillchen wwwillchen changed the title MESOP_APP_BASE_PATH Add env var: MESOP_APP_BASE_PATH Nov 2, 2024
@wwwillchen wwwillchen requested a review from richard-to November 2, 2024 05:29
@wwwillchen wwwillchen marked this pull request as ready for review November 2, 2024 05:29
docs/api/config.md Outdated Show resolved Hide resolved
@wwwillchen wwwillchen merged commit 6aebbfd into google:main Nov 2, 2024
6 checks passed
@wwwillchen wwwillchen deleted the static-files-base branch November 2, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants