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

Rejig main entry point #87

Merged
merged 3 commits into from
Sep 12, 2023
Merged

Conversation

jeromekelleher
Copy link
Member

Change how we run tsqc from using panel serve to python3 main.py. This is a step towards packaging everything up in a more standard way, where we ship this as a Python package.

Also clarifies the logic of when we load up the datafile and how we cache it, which was quite confusing before.

Also supports tszip input.

Closes #82

@savitakartik
Copy link
Collaborator

Looks great!

@savitakartik
Copy link
Collaborator

savitakartik commented Sep 12, 2023

One small note for reference - in WSL, previously VSCode would prompt me to open the app in a browser but now I get these messages:
image
Adding BROWSER=/path/to/browser.exe to the path fixes it.

@savitakartik
Copy link
Collaborator

savitakartik commented Sep 12, 2023

I had 2 questions related to this PR:

  • now that tzipped files are supported, would it make sense to add a test to check pages are loaded correctly when a compressed file is provided?

  • would it be useful to add a --help option to the click interface?

@jeromekelleher
Copy link
Member Author

Thanks for taking a look @savitakartik, this is very helpful. We'll need to fix/document the behaviour in WSL.

I've added #89 to track adding tests for compressed input

There should already be a help interface:

$ python3 main.py --help
Usage: main.py [OPTIONS] PATH

  Run the tsqc server.

Options:
  --port INTEGER  Port to serve on
  --help          Show this message and exit.

it's pretty basic, but we can fill it out as we go. Does this work for you?

Copy link
Member

@benjeffery benjeffery left a comment

Choose a reason for hiding this comment

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

LGTM. Seems to remove the ability to use --dev as I can't see any option on panel.serve which does that, but I can live with that.

@jeromekelleher jeromekelleher merged commit 5fecd18 into tskit-dev:main Sep 12, 2023
3 checks passed
@jeromekelleher jeromekelleher deleted the more-caching branch September 12, 2023 10:24
@savitakartik
Copy link
Collaborator

Thanks for taking a look @savitakartik, this is very helpful. We'll need to fix/document the behaviour in WSL.

I've added #89 to track adding tests for compressed input

There should already be a help interface:

$ python3 main.py --help
Usage: main.py [OPTIONS] PATH

  Run the tsqc server.

Options:
  --port INTEGER  Port to serve on
  --help          Show this message and exit.

it's pretty basic, but we can fill it out as we go. Does this work for you?

Ah, must have missed it, totally works for me!

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 tszipped files as input
3 participants