Skip to content

Use Geoweaver API + Better UI Response (Pandas + IPython Widgets)#24

Draft
gokulprathin8 wants to merge 19 commits into
ESIPFed:mainfrom
gokulprathin8:better-ui-fixes
Draft

Use Geoweaver API + Better UI Response (Pandas + IPython Widgets)#24
gokulprathin8 wants to merge 19 commits into
ESIPFed:mainfrom
gokulprathin8:better-ui-fixes

Conversation

@gokulprathin8

Copy link
Copy Markdown
Collaborator

No description provided.

@gokulprathin8
gokulprathin8 marked this pull request as draft October 3, 2023 08:17
@gokulprathin8
gokulprathin8 marked this pull request as ready for review October 4, 2023 01:08
@gokulprathin8

Copy link
Copy Markdown
Collaborator Author

Here is the testing changes for the changed functions @ZihengSun
https://colab.research.google.com/drive/1hjinVtE3sbpe620iIMnTuqUs-kRZkjWL?usp=sharing

couldnt upload my local file of jupyter notebook, so uploaded to colab and pasted link here

Comment thread pygeoweaver/sc_detail.py Outdated
d = d.json()
d['nodes'] = json.loads(d['nodes'])
try:
from IPython import get_ipython

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this section of code is repeated in all the places. Can you make it a function and reuse it when being used?

Comment thread pygeoweaver/sc_detail.py Outdated
],
cwd=f"{get_root_dir()}/",
)
url = f"{GEOWEAVER_DEFAULT_ENDPOINT_URL}/web/detail"

@ZihengSun ZihengSun Oct 4, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole section is repeated multiple times. Need to Create a utility function and reduce the redundancy please

Comment thread pygeoweaver/sc_detail.py Outdated
],
cwd=f"{get_root_dir()}/",
)
url = f"{GEOWEAVER_DEFAULT_ENDPOINT_URL}/web/detail"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundancy section of code. Use utility function.

Comment thread pygeoweaver/utils.py
shutil.copy2(source_file, destination_file)


def create_table(data, max_length=100):

@ZihengSun ZihengSun Oct 4, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is a good idea. Also, a table is not impressive improvement comparing to all the other libraries. What we need is a widget that have button and dropdown, selection, text editors, or things similar that. Here is some example: https://medium.com/codex/fancy-world-of-ipywidgets-e3301de58bd7

Overall, people like interactive experiences. Not just a static table. If it is only a simple HTML table, the pandas dataframe output will do it.

@ZihengSun ZihengSun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments and it should be an interactive widget. A simple HTML table doesn't worth the efforts.

@gokulprathin8
gokulprathin8 marked this pull request as draft October 9, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants