-
Notifications
You must be signed in to change notification settings - Fork 0
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 an endpoint to initialize the GUI #109
Conversation
# On Linux, this should typically resolve to "/" | ||
root_directory = Path.cwd().root | ||
|
||
# TODO: FastAPI has a bug where a URL object can't be directly returned here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brianhelba TODO: report this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to file local and upstream issues, then delete this code comment.
41c5ac5
to
bef41c2
Compare
def test_gui_select_directory(client: TestClient) -> None: | ||
response = client.get("/") | ||
def test_gui_home(client: TestClient) -> None: | ||
response = client.get(app.url_path_for("home"), follow_redirects=True) | ||
|
||
assert response.status_code == 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could put some more specific assertions in here, to ensure it really is the root that's being redirected to. I believe that was the problem raised in #59.
@marySalvi Beyond the two issues I've self-identified, can you review this and let me know if it's a reasonable approach? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@marySalvi @brianhelba what is the status of this PR? Can it be closed? |
This doesn't seem necessary with the current behavior on Windows. We can reopen it if we decide it is needed. |
This should improve how we handle default directories on Windows. It also provides a better separation of concerns (GUI initialization vs actual directory selection), which should make future development and testing easier.
Fixes #59.