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

fix: Datasette-serve command not running correctly on Windows #52

Merged
merged 10 commits into from
Oct 13, 2023

Conversation

Poiuy7312
Copy link
Collaborator

@Poiuy7312 Poiuy7312 commented Sep 15, 2023

This adds a function in util.py called get_OS() which gets what the OS of the user so MacOS, Linux or Windows. This was implemented because there was an issue with the Datasette-serve command on windows would look in the wrong directory for the executable for datasette. So I changed to look in a different directory Scripts if its run on Windows and then it looks for them in the Bin file when run on anything else

I also added a function in database.py which creates a path to the executable which the function Datasette-serve previously did itself. This was done because it made it a lot easier to make sure that the added feature works as intended and allowed me to write a test case for it.

@Poiuy7312 Poiuy7312 added the in-progress Work is actively happening on this issue label Sep 15, 2023
@Poiuy7312 Poiuy7312 self-assigned this Sep 15, 2023
@Poiuy7312 Poiuy7312 requested a review from gkapfham September 15, 2023 13:08
@Poiuy7312 Poiuy7312 marked this pull request as draft September 15, 2023 13:09
@Poiuy7312 Poiuy7312 linked an issue Sep 15, 2023 that may be closed by this pull request
@Poiuy7312 Poiuy7312 added the bug Something isn't working label Sep 15, 2023
@Poiuy7312 Poiuy7312 marked this pull request as ready for review September 18, 2023 13:03
@Poiuy7312 Poiuy7312 removed in-progress Work is actively happening on this issue bug Something isn't working labels Sep 18, 2023
@gkapfham
Copy link
Collaborator

Hello @Poiuy7312, please note that you need to use the commit standard that we have adopted for this project: https://www.conventionalcommits.org/en/v1.0.0/.

@gkapfham
Copy link
Collaborator

Hello @Poiuy7312 your description of this PR needs to clearly explain what this will change in the main codebase and in the main tool once it is merged. Can you please furnish an example of what did not work before you made the changes and then what now does work if we merge this PR? You are also welcome to reference an issue in the issue tracker when you explain your PR.

@gkapfham gkapfham added bug Something isn't working in-progress Work is actively happening on this issue labels Sep 19, 2023
@Poiuy7312 Poiuy7312 changed the title Datasette serve fix fix: Datasette-serve command not running correctly on Windows Sep 20, 2023
@Poiuy7312 Poiuy7312 removed the in-progress Work is actively happening on this issue label Sep 21, 2023
@Poiuy7312 Poiuy7312 added the ready-for-review This pull request is ready for review label Sep 22, 2023
Copy link
Collaborator

@laurennevill laurennevill left a comment

Choose a reason for hiding this comment

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

It looks like you've successfully identified and remedied a bug in Chasten and I think this looks good.

I see this code also has a test which would be @tuduun's area of expertise. I'd like to see his review specifically on this PR before approving and merging. Thanks for your work!

@gkapfham
Copy link
Collaborator

Hello @Poiuy7312 is this PR fully updated so that it contains the new build matrix setup for running everything in GitHub Actions?

tuduun
tuduun previously approved these changes Sep 26, 2023
Copy link
Collaborator

@tuduun tuduun left a comment

Choose a reason for hiding this comment

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

Great work on configuring the path for all macOS, windows, and Ubuntu. You even tested the code! I will grant the merge request, and I would encourage prof @gkapfham to take a final look at this before anyone merges it!

@Poiuy7312
Copy link
Collaborator Author

Hello @Poiuy7312 is this PR fully updated so that it contains the new build matrix setup for running everything in GitHub Actions?

Yes

Copy link
Collaborator

@laurennevill laurennevill left a comment

Choose a reason for hiding this comment

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

This looks good.

@boulais01 boulais01 requested a review from tuduun September 29, 2023 13:43
@boulais01
Copy link
Collaborator

Hey @tuduun @gkapfham @jnormile would one of you mind giving this a look?

@boulais01 boulais01 self-requested a review October 9, 2023 16:12
@boulais01
Copy link
Collaborator

@tuduun We are still waiting on your review, when you get the chance.

Copy link
Collaborator

@jnormile jnormile left a comment

Choose a reason for hiding this comment

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

An important fix! Passing build, some additional testing to support new code--looks like a winner to me! (Sorry the review took so long!)

@Poiuy7312 Poiuy7312 merged commit dcc5e78 into master Oct 13, 2023
3 checks passed
@laurennevill laurennevill deleted the Datasette-serve-fix branch October 13, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready-for-review This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue finding executable for datasette on Windows
6 participants