Skip to content

Modernize the app template - #11

Merged
andriykislitsyn merged 8 commits into
mainfrom
andriykislitsyn/modernize-the-app-2
Apr 14, 2026
Merged

Modernize the app template#11
andriykislitsyn merged 8 commits into
mainfrom
andriykislitsyn/modernize-the-app-2

Conversation

@andriykislitsyn

@andriykislitsyn andriykislitsyn commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Modernize the app template to rely on the DataRobot Python client and DataRobotAppFrameworkBaseSettings for automatic credential, base-path, and runtime-parameter loading, removing the previous os.getenv()/start-app.sh guidance.


Note

Medium Risk
Switches credential/base-path handling to datarobot.Client() and DataRobotAppFrameworkBaseSettings, which can affect authentication and routing behavior if environment/runtime parameters are misconfigured.

Overview
Modernizes the Flask template to rely on the DataRobot Python client and DataRobotAppFrameworkBaseSettings instead of manual os.getenv() wiring.

The app now derives BASE_PATH via a new Config class (src/config.py), uses datarobot.Client() for endpoint/token when proxying API calls, and computes the API docs URL at request time. Packaging is updated to pyproject.toml/uv (dropping requirements.txt), and the README/runtime-parameter guidance is revised to match the new automatic configuration flow.

Reviewed by Cursor Bugbot for commit 5e801b6. Bugbot is set up for automated code reviews on this repo. Configure here.

…obot.Client()

- Replace requirements.txt with pyproject.toml (uv-managed)
- Add config.py using DataRobotAppFrameworkBaseSettings for typed env var reading
- Use datarobot.Client() (no args) in _proxy() for token/endpoint resolution
- Read BASE_PATH via Config instead of os.getenv()
- Add datarobot and pydantic-settings dependencies
…ttings

- Remove stale start-app.sh credential export snippet
- Replace MLOPS_RUNTIME_PARAM_* shell-export pattern with Config class approach
- Add uv setup instructions
- Document DataRobotAppFrameworkBaseSettings and runtime parameter workflow
@andriykislitsyn
andriykislitsyn requested a review from a team as a code owner April 10, 2026 14:44
Comment thread src/flask_app.py Outdated
Comment thread src/flask_app.py Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 702797b. Configure here.

Comment thread src/flask_app.py Outdated
Comment thread src/config.py
@andriykislitsyn
andriykislitsyn merged commit d5fa33e into main Apr 14, 2026
2 checks passed
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