Skip to content

Add support for workspaces and serverFilesQuestion #76

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

Merged
merged 11 commits into from
May 19, 2024

Conversation

Bluesy1
Copy link
Collaborator

@Bluesy1 Bluesy1 commented Jul 18, 2023

While adding the copy files code for workspaces/serverFiles, I updated the code such that it should now catch a wider set of missing files at once to help fix questions faster, instead of one file at a time.

It would be more ideal for the test for serverFilesQuestion to be in its own case I admit, but at the moment I cannot discern a simple test case that would test this elegantly

Resolves #75

@Bluesy1 Bluesy1 self-assigned this Jul 18, 2023
Copy link
Collaborator Author

@Bluesy1 Bluesy1 left a comment

Choose a reason for hiding this comment

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

Left some comments to help understand my thought process here, since I did a bit more than just base workspaces looking at it now.

I can move some changes to a different PR (or just delete them entirely if they're unwanted)

Comment on lines +1103 to +1106

if os_errors:
error_msg = "\n ".join(os_errors)
raise FileNotFoundError(f"Error(s) copying specified files:\n {error_msg}")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The idea behind the try-except system here is to show all file copy errors to the best of our ability at once, instead of having it show up one file at a time.

The output of this should look something as follows, as an example:

FileNotFoundError: Error(s) copying specified files:
    [Errno 2] No such file or directory: 'test0'
    [Errno 2] No such file or directory: 'test1'
    [Errno 2] No such file or directory: 'test2'
    [Errno 2] No such file or directory: 'test3'
    [Errno 2] No such file or directory: 'test4'
    [Errno 2] No such file or directory: 'test5'
    [Errno 2] No such file or directory: 'test6'
    [Errno 2] No such file or directory: 'test7'
    [Errno 2] No such file or directory: 'test8'
    [Errno 2] No such file or directory: 'test9'

@Bluesy1 Bluesy1 marked this pull request as ready for review July 19, 2023 02:59
@Bluesy1 Bluesy1 requested a review from amurph24 July 19, 2023 02:59
Copy link
Collaborator

@amurph24 amurph24 left a comment

Choose a reason for hiding this comment

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

The changes look good to me, and the processed question works as expected.

It would be more ideal for the test to be in its own question, but at the moment I discern a simple test case that would test this elegantly
@Bluesy1 Bluesy1 requested a review from firasm July 21, 2023 01:05

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@firasm
Copy link
Contributor

firasm commented May 19, 2024

I think I looked at this a while ago, but forgot to merge it in... hopefully nothing has changed since then.

@firasm firasm merged commit 1db6e94 into main May 19, 2024
1 check passed
@Bluesy1 Bluesy1 deleted the add-workspace-support branch May 20, 2024 19:46
@Bluesy1 Bluesy1 mentioned this pull request May 27, 2024
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.

Support Workspaces
3 participants