tidy3d icon indicating copy to clipboard operation
tidy3d copied to clipboard

add python client upgrade message

Open an-li-the-dev opened this issue 3 years ago • 9 comments

Link to #171

an-li-the-dev avatar Mar 28 '22 08:03 an-li-the-dev

What I rather imagine is that the response is a list of supported versions. If the user version is not the latest, then print the warning suggesting an upgrade. If the user version is not in the list at all, then either warn that the version is deprecated, or maybe even raise an error.

momchil-flex avatar Mar 29 '22 22:03 momchil-flex

@momchil-flex backend has been deployed to uat, a few assumptions:

  • AppName in app-versions is tidy3d-python-client
  • the versions for this AppName is senmantic, eg: 1.2.1

an-li-the-dev avatar Apr 11 '22 11:04 an-li-the-dev

I pushed a commit rewording the messages a bit, and using log.warning instead of print. There are still a few things that need to be ironed out. I think it is OK if we postpone this feature to the next release if higher-priority ones need attention.

  • [ ] This worked for me on uat, but on preprod nothing happens as it requires authentication.
  • [ ] The list of supported versions that I get is 1.2.0 and 1.2.1. Where is this list coming from? Why are 1.1.x not there? How can we add versions to the list as we release them?
  • [ ] The warning message says to pip upgrade tidy3d, but currently the package name is tidy3d-beta. It will be converted to tidy3d at some point soon-ish.

momchil-flex avatar Apr 11 '22 21:04 momchil-flex

I agree that this can be postponed until next release until we work out the more urgent issues.

tylerflex avatar Apr 11 '22 22:04 tylerflex

My only initial comment (have not tested) is how we want to proceed if the try statement fails. I dont think we ever want to try: except without any action if try failed.

tylerflex avatar Apr 11 '22 22:04 tylerflex

Could just print a warning "Could not verify version".

momchil-flex avatar Apr 11 '22 22:04 momchil-flex

yea I think that would be ok, let's add a warning there.

tylerflex avatar Apr 12 '22 18:04 tylerflex

  • [ ] This worked for me on uat, but on preprod nothing happens as it requires authentication.
  • [ ] The list of supported versions that I get is 1.2.0 and 1.2.1. Where is this list coming from? Why are 1.1.x not there? How can we add versions to the list as we release them?
  • [ ] The warning message says to pip upgrade tidy3d, but currently the package name is tidy3d-beta. It will be converted to tidy3d at some point soon-ish.
  1. It has been promoted to Prod.
  2. The version information is from table app-versions, you can update it from https://admin.simulation.cloud/moduleversions, the app name is: tidy3d-python-frontend
  3. Revised.

an-li-the-dev avatar Jun 28 '22 01:06 an-li-the-dev

Let's get this in 2.0. Still a few to dos:

  • [ ] Move tidy3d-beta package to tidy3d on PyPI (not technically the goal of this PR, but otherwise we need to change the message here)
  • [ ] Add all the versions with their active/inactive tag on the admin
  • [ ] Print a warning if the try: to get the versions fails (warn that couldn't verify version)

momchil-flex avatar Jun 28 '22 18:06 momchil-flex

note that this currently has web imported into the tidy3d namespace (tidy3d/__init__.py) so it will likely require a login right when tidy3d is imported? Perhaps we should close this issue and figure something else out once the webapi and other components are separated for the 2.0 release?

tylerflex avatar Oct 14 '22 19:10 tylerflex

I'm closing this for now. We can reopen later if we want when we integrate tidy3d-webapi

tylerflex avatar Oct 17 '22 16:10 tylerflex