Skip to content

Conversation

@StijnKas
Copy link
Collaborator

@yusufuyanik1 , @operdeck, any concerns with this? I would like to ultimately be able to run uvx pdstools and have you choose between health check and decision analyzer -> then you don't even need to pre-install pdstools, just uv. Please test this out to see if it works like you would like.

@codecov
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

❌ Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.00%. Comparing base (7801e0a) to head (1110cf7).
⚠️ Report is 325 commits behind head on master.

Files with missing lines Patch % Lines
python/pdstools/cli.py 0.00% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #395      +/-   ##
==========================================
- Coverage   64.22%   64.00%   -0.23%     
==========================================
  Files          58       58              
  Lines        5470     5489      +19     
==========================================
  Hits         3513     3513              
- Misses       1957     1976      +19     

☔ 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.

@operdeck
Copy link
Collaborator

Good idea. It does bring the DA app more to the front, so let’s address cosmetics soon (after Friday?). The intro, empty sections here and there, an “init” page (showing in both apps now), marketing your optimization feature more by giving it a better name - etc etc. There’s also a few warnings and semi random print statements in the DA app. Let’s do those things soon.
@StijnKas @yusufuyanik1

run_parser = subparsers.add_parser("run", help="Run the specified pdstools app")
run_parser.add_argument(
"app",
choices=["health_check", "decision_analyzer"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than the nerdy lowercased underscored names, why not use "Health Check" and "Decision Analyzer"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

so that you don't have to quote these arguments when giving them as command line arguments (i.e., pdstools run decision_analyzer vs pdstools run "Decision Analyzer". We still need that shortcut for programmatic use - the 'options' thing is just for convenience. but perhaps we could use an alias when choosing from options?

Copy link
Collaborator

Choose a reason for hiding this comment

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

An alias sounds good

args.func(args, unknown)


def run(args, unknown):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this run method both in py.typed and cli.py? Looks pretty identical.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

py.typed is a completely empty file, no? it just indicates to mypy that the code is typed, doesn't actually contain anything. where are you seeing anything?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You're right. It's empty - I must have seen it wrong before.

@yusufuyanik1
Copy link
Collaborator

I am a bit confused, it is giving me "No module named streamlit" error even after installing it

uyany@L103034MEU pega-datascientist-tools % uv pip install streamlit
Audited 1 package in 31ms
uyany@L103034MEU pega-datascientist-tools % uvx pdstools            
Traceback (most recent call last):
  File "/Users/uyany/Library/Caches/uv/archive-v0/PIUKuqEOjpvgcTtYUCxIp/bin/pdstools", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/uyany/Library/Caches/uv/archive-v0/PIUKuqEOjpvgcTtYUCxIp/lib/python3.12/site-packages/pdstools/cli.py", line 45, in main
    args.func(args, unknown)
  File "/Users/uyany/Library/Caches/uv/archive-v0/PIUKuqEOjpvgcTtYUCxIp/lib/python3.12/site-packages/pdstools/cli.py", line 49, in run
    from streamlit.web import cli as stcli
ModuleNotFoundError: No module named 'streamlit'
uyany@L103034MEU pega-datascientist-tools % 

@StijnKas
Copy link
Collaborator Author

StijnKas commented Jul 23, 2025

I am a bit confused, it is giving me "No module named streamlit" error even after installing it

uyany@L103034MEU pega-datascientist-tools % uv pip install streamlit
Audited 1 package in 31ms
uyany@L103034MEU pega-datascientist-tools % uvx pdstools            
Traceback (most recent call last):
  File "/Users/uyany/Library/Caches/uv/archive-v0/PIUKuqEOjpvgcTtYUCxIp/bin/pdstools", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/uyany/Library/Caches/uv/archive-v0/PIUKuqEOjpvgcTtYUCxIp/lib/python3.12/site-packages/pdstools/cli.py", line 45, in main
    args.func(args, unknown)
  File "/Users/uyany/Library/Caches/uv/archive-v0/PIUKuqEOjpvgcTtYUCxIp/lib/python3.12/site-packages/pdstools/cli.py", line 49, in run
    from streamlit.web import cli as stcli
ModuleNotFoundError: No module named 'streamlit'
uyany@L103034MEU pega-datascientist-tools % 

Yeah, I don't really know how that works either. I do know that uvx uses a temporary virtual environment and doesn't use your venv -> but I would've expected the install command at the top to include streamlit

@StijnKas
Copy link
Collaborator Author

@jmelburg , is this something you can try to look at? The use case here is that it would be great if we could simply run uvx pdstools which would ensure you have python and the app dependencies installed, and run the health check or decision analyzer app. We could default to health check, give the user an option, or think of something else. I tried a first stab in this PR but I never got to completing it.

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.

5 participants