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

widgets.json gets overwritten every time the API is launched, users cannot make "small changes" or "tweaks". #5

Open
deeleeramone opened this issue Aug 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@deeleeramone
Copy link
Contributor

^^

API should be able to launch without changing contents of the JSON, and also watch for changes to the file or assets folder.

@deeleeramone deeleeramone added the bug Something isn't working label Aug 6, 2024
@piiq
Copy link
Contributor

piiq commented Aug 6, 2024

Currently the widget's json is generated programmatically and served. The saving of the file was done for debug purposes by me initially. The problem with a fully static widgets.json is that if I install an extension it will not be referenced in the widgets.json and this not served.
If we decide to rely on a file and watch for changes in it and/or in the openapi this would add more complexity.

Currently this script is made to work with different platform installations. I can install it into an environment where I have few extensions and it will work. I can also install it into an environment with all extensions and it will also work. If you think you can accommodate the logic to handle all the various use cases without making it into a bloated monster script, I would be more than supportive of this initiative

@piiq piiq added enhancement New feature or request and removed bug Something isn't working labels Aug 6, 2024
@deeleeramone
Copy link
Contributor Author

Two pieces of logic that I am incorporating into the installation package are:

  • Expose uvicorn kwargs to allow custom command line execution and environment variable overrides.
    • This also allows you to run the launch script without any user input prompts.
  • Make widgets.json in a defined location as opposed to the CWD. The widgets builder portion of the script reads the existing file, if it does exist already, and prompts the user if they would like to replace or append the existing widgets.json file.
    • Appending preserves any manual changes (tweaks, personalizations) and only brings in new items - i.e, new extensions.

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

No branches or pull requests

2 participants