You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
look up if credentials for instance exist
*if yes => log in , go on
*if no => log in popup/prompt, with option to save credentials in local encrypted file
update local model (WikiFile, LocalFile)
suggestion for funciton definition:
deffile_download(file: str , credentials_path="usual/path/to/local/model", download_cache="", osw_domain=None, return_binary=False) ->Union[path, bytesio]:
""" convenience function to quickly download a file from osw via a url that can conveniently be copied from the browser url line """ifosw_domainisnotNone:
### prepend domain to file , else file must contain valid domain + osw id
The text was updated successfully, but these errors were encountered:
What we would still need or is currently problematic: the reload of the model.entity classes generated by the controller imports leads to errors when serializing objects because the model loaded at the top by importing osw dont match the models imported by the reload (not pointing to the same memory entry).
Option a) Therefore, in my opinion, just as the controllers are part of osw-python, the (File) models should also be part of it.
This is scalable and can be transferred now and in future to other schemata. Idea for implementation: Before overwriting and re-importing entity.py, check whether it would result in any changes at all. Can this be implemented at code generator level?
Option b) Alternatively, the models could be persisted and not be replaced if already loaded. This would require maintenance of osw-python parallel to the PagePackages
(the first line may look bloated, by this approach will be consistent for any controller, inkl. DeviceController, DbController, etc.)
So I guess the discussion is more about the osw initialization (login, schema download) and maybe a wrapper for the two lines above
Currently a simple file-download takes 20-30 lines of code. This should be reduced to one line. Suggestion:
What should happen in background:
*if yes => log in , go on
*if no => log in popup/prompt, with option to save credentials in local encrypted file
suggestion for funciton definition:
The text was updated successfully, but these errors were encountered: