Skip to content

Conversation

@jmelburg
Copy link
Collaborator

supersedes #395
resolves #465

the streamlit import error is due to it not being included in the core dependencies. You have to run this:

uvx 'pdstools[app]'

If this is acceptable I think it now all works as expected, though I can't properly test it with uvx before we publish a new version.
For now I was testing with:

uv tool install -e '.[app]'
uvx pdstools

I'm not sure uvx pdstools can work out of the box without making streamlit a core dependency.

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.12%. Comparing base (9ea0cc0) to head (3b26b9c).
⚠️ Report is 103 commits behind head on master.

Files with missing lines Patch % Lines
python/pdstools/cli.py 0.00% 48 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #468      +/-   ##
==========================================
- Coverage   67.60%   67.12%   -0.49%     
==========================================
  Files          66       66              
  Lines        6474     6528      +54     
==========================================
+ Hits         4377     4382       +5     
- Misses       2097     2146      +49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@StijnKas
Copy link
Collaborator

@jmelburg thanks :)

I think we could perhaps solve this by adding the optional dependencies in app to the dependencies list? Something like this

# /// script
# requires-python = ">=3.9"
# dependencies = [
#     "pdstools[app]>=4.0.3",
#     "streamlit"
# ]
# ///

uv should pick it up. https://docs.astral.sh/uv/guides/scripts/

I wonder if we just need streamlit or other things too?

@jmelburg
Copy link
Collaborator Author

uv picks it up, uvx does not

there are some vaguely related issues (astral-sh/uv#6542) at uv raised already, but nothing indicating this will become possible. I see two options now:

  1. use uv run pdstools and declare the app dependency group as dependency in the cli.py script header
    • Straightforward
    • Does not work globally
  2. use uvx 'pdstools[app]'
    • Works globally
    • Slightly annoying syntax

If we really want option 3 uvx pdstools I can raise another issue

@operdeck
Copy link
Collaborator

operdeck commented Nov 21, 2025 via email

@StijnKas
Copy link
Collaborator

Pretty sure we could make both of these work at the same time, right?

Let's document these two in the documentation and call it a day :)

@jmelburg jmelburg marked this pull request as draft November 24, 2025 08:47
@jmelburg
Copy link
Collaborator Author

Found a middle ground solution:

uv tool install 'pdstools[app]'

ensures pdstools is callable from anywhere and prompts you to choose between health check and decision analyzer. When run, it prompts you to choose between the Health Check and Decision Analyzer. The tool is installed in an isolated environment, avoiding the global dependency conflicts often caused by pip. We have updated the docs to make this the recommended quickstart installation.

@StijnKas could you review and publish if it's all okay?

@jmelburg jmelburg requested a review from StijnKas November 24, 2025 13:12
@jmelburg jmelburg marked this pull request as ready for review November 24, 2025 14:15
@StijnKas StijnKas merged commit 4bdf3f8 into pegasystems:master Jan 14, 2026
14 of 16 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.

CLI improvements

3 participants