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

Streamlit to Dash #50

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Streamlit to Dash #50

wants to merge 17 commits into from

Conversation

k8culver
Copy link

@k8culver k8culver commented Dec 7, 2024

  • Replace Streamlit UI with Dash UI
  • Move "Random Seed" setting to config file
  • Move "Save Input to File" to Input tab
  • Move "Color by Case ID" to Results tab
  • Update "Upload File" to use dcc.Upload

Note: It is expected for test-osx to fail because this demo uses mip

@k8culver k8culver self-assigned this Dec 7, 2024
@k8culver k8culver requested a review from thisac December 7, 2024 00:28
@k8culver k8culver marked this pull request as ready for review December 7, 2024 00:28
Copy link
Contributor

@thisac thisac left a comment

Choose a reason for hiding this comment

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

Looks great!

  • When saving a problem (Save Input Data to File), it wasn't clear that it was saved in the input folder. A clarification or note in the readme might be good.
  • Perhaps automatically add a .txt file ending to the stored inputs and solutions if not included in the filename?
  • I think it would feel more robust if the problem generation is disabled (i.e., the sliders are greyed out) while running. Otherwise it's easy to change the problem while getting a solution for the old, lost one. Same for disabling the results tab when generating a new problem.
  • Is it possible to have the upload-problem-file browser open at the input folder directly?

utils.py Outdated Show resolved Hide resolved
demo_configs.py Outdated
"value": 50,
}

ADVANCED_SETTINGS = ["Color by Case ID"]
Copy link
Contributor

Choose a reason for hiding this comment

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

What can this be changed to? Maybe add a comment?

Copy link
Author

Choose a reason for hiding this comment

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

Updated: d2c039e

@k8culver
Copy link
Author

  • Is it possible to have the upload-problem-file browser open at the input folder directly?

I don't think this is possible

@k8culver k8culver requested a review from thisac December 23, 2024 18:53
Comment on lines +418 to +419
if len(input_filename.split(".")) < 2:
input_filename = input_filename + ".txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be OK to have filenames with dots in, no? This would cause an issue if there's a dot in the name.

I quite like using pathlib, which can be used quite nicely here: https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.with_suffix, and also for joining and reading/writing files.

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