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

pip compatibility #89

Closed
10 tasks done
mn5hk opened this issue Nov 17, 2023 · 6 comments
Closed
10 tasks done

pip compatibility #89

mn5hk opened this issue Nov 17, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@mn5hk
Copy link
Collaborator

mn5hk commented Nov 17, 2023

  • create a new pip release https://pypi.org/manage/project/pyshbundle/release/0.0.3.2/
  • add all module names to init.py
  • test pip release
    • Working on Linux Mint 21.3 with python 3.10.12
    • Need to try on Windows 10
    • Having issues installing with pip and using the newly built tar.gz on windows only
  • make pip work
  • update tutorials with pip workflow
    • Done, but there is an error - 'Module' Object not callable
  • double check our module flowchart diagram to ensure it still makes sense
@mn5hk mn5hk self-assigned this Nov 17, 2023
@mn5hk mn5hk added the enhancement New feature or request label Jan 4, 2024
@mn5hk mn5hk pinned this issue Jan 4, 2024
@mn5hk
Copy link
Collaborator Author

mn5hk commented Jan 4, 2024

Dear @abhimhamane,

I have currently created a new pypi release v0.1.1 that seems to be working: https://pypi.org/manage/project/pyshbundle/release/0.1.1/

As you have been more involved in the development of the notebooks, if possible, I request you to update the notebooks by calling the pypi module.

In addition, couple other tasks may be necessary:

  • Nomenclature of modules to me made more user-friendly [rename/replace clm2cs with clm2cs_new, for example)
    image

  • Handle multiple functions with same name from different python modules (.py files) [maybe not calling some of it works, in case all of the modules perform the same activity)
    image

Lastly, please note that the development for the pypi module is currently being undertaken in a dedicated branch: 89-pip-compatibility

Couple links that may be useful:

Maybe we have a meeting sometime later to wrap up a release version.

Best,
AS

@abhimhamane
Copy link
Collaborator

Screenshot from 2024-01-13 13-29-40
The error occuring in timeseries and visualization notebooks. The error being 'module' object is not callable. From some of the online discussion forums it seems that, there is a conflict when the file and function has the same name. Here's a snippet from - https://discuss.streamlit.io/t/error-when-deploying-app-with-stream-select-menu/34711/5
Screenshot from 2024-01-13 16-10-41

I've tried using aliases to call functions but it does not work. One solution is to reorganize the functions as per their utility

  1. ioutils - reading data files
  2. graceshutils - SH processing of grace
  3. hydrograce - tws, basin avg and other hydrological application of grace data
  4. vizutils - visualization

@abhimhamane
Copy link
Collaborator

Reorganization is a bit more time-consuming. An easy fix for the initial release is to use a slightly different function name.

  • gaussian -> Gaussian
  • tws_cal -> TWSCalc
  • basin_avg -> BasinAvg
    This works fine as there is no conflict b/w the module and function name.

@abhimhamane
Copy link
Collaborator

Error with uploading to PyPi using Twine
Screenshot from 2024-01-13 19-12-07

Also error related to sub-processor module while installing the module from tar.gz on windows. It needs to be looked into.

@mn5hk
Copy link
Collaborator Author

mn5hk commented Jan 15, 2024

Hi @abhimhamane , I have updated the latest version to v0.1.2. I had uploaded v0.1.1 to pypi, but maybe I did not push the version to github; and hence, the error in version numbering.

Further, I have reinstalled pypi in my computer to the latest version and it was successful.

Could you try to check if the update works without errors in your PC? And also test it with our notebooks?

Thanks a lot,
AS

@mn5hk
Copy link
Collaborator Author

mn5hk commented Jan 15, 2024

Also, @abhimhamane , I noticed that you do not have the API token setup in your computer.

In this instance, the error is because pypi no longer allows changes to repos with username/password. Instead, you need to setup an API token on your computer. Let me know in case you face further issues regarding the API token.

@mn5hk mn5hk linked a pull request Jan 15, 2024 that will close this issue
@mn5hk mn5hk closed this as completed Apr 22, 2024
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

Successfully merging a pull request may close this issue.

2 participants