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

Modify deployment #498

Closed
WolfgangFahl opened this issue Sep 6, 2022 · 5 comments
Closed

Modify deployment #498

WolfgangFahl opened this issue Sep 6, 2022 · 5 comments
Assignees
Labels
core enhancement New feature or request wontfix This will not be worked on
Milestone

Comments

@WolfgangFahl
Copy link
Collaborator

WolfgangFahl commented Sep 6, 2022

According to https://github.com/justpy-org/justpy/blob/master/docs/tutorial/deployment.md

import justpy as jp
app = jp.app

is the official way of deployment.

This "instantiation by import" approach looks simple and elegant on first few but is a potential software engineering nightmare when it comes to maintainance, testing and deployment. E.g. the current "demostarter" approach won't work because the app variable is overridden by each demo and in the end all servers show the same content on all ports - the last demo "wins" the content for ressources.

It would be much better to have a JpApp and JpServer object - automatically providing a JpServer if it is not specified
for the simple case

simple

from jpcore import JpApp
app=JpApp()

advanced

from jpcore import JpApp,JpServer
server=JpServer()
app=JpApp(server=server)
@WolfgangFahl WolfgangFahl added enhancement New feature or request core labels Sep 6, 2022
@WolfgangFahl WolfgangFahl added this to the 0.7 milestone Sep 6, 2022
@WolfgangFahl
Copy link
Collaborator Author

WolfgangFahl commented Sep 6, 2022

For compatibility we might need a state variable such as "use_jp_core=False" which is defined in the new jpcore package.

The idea is to alway import jpcore before the legacy justpy thus initialization of jpcore concepts is possible.

@WolfgangFahl
Copy link
Collaborator Author

A jpconfig package might be the way to go to avoid cyclic dependencies ...

@WolfgangFahl
Copy link
Collaborator Author

see #63 and #236 for the expected reload behavior

@WolfgangFahl
Copy link
Collaborator Author

see pypa/hatch#464 for followup problems

WolfgangFahl added a commit that referenced this issue Sep 7, 2022
@WolfgangFahl WolfgangFahl modified the milestones: 0.7, 0.8, 0.10 Sep 8, 2022
@WolfgangFahl WolfgangFahl modified the milestones: 0.10, 0.13 Nov 15, 2022
@WolfgangFahl WolfgangFahl added the wontfix This will not be worked on label Sep 20, 2023
@WolfgangFahl
Copy link
Collaborator Author

see #685

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants