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

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

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

gokulprathin8
Copy link
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
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

d = d.json()
d['nodes'] = json.loads(d['nodes'])
try:
from IPython import get_ipython
Copy link
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?

],
cwd=f"{get_root_dir()}/",
)
url = f"{GEOWEAVER_DEFAULT_ENDPOINT_URL}/web/detail"
Copy link
Member

@ZihengSun ZihengSun Oct 4, 2023

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

],
cwd=f"{get_root_dir()}/",
)
url = f"{GEOWEAVER_DEFAULT_ENDPOINT_URL}/web/detail"
Copy link
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.

@@ -146,3 +146,28 @@ def copy_files(source_folder, destination_folder):
)
os.makedirs(os.path.dirname(destination_file), exist_ok=True)
shutil.copy2(source_file, destination_file)


def create_table(data, max_length=100):
Copy link
Member

@ZihengSun ZihengSun Oct 4, 2023

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.

Copy link
Member

@ZihengSun ZihengSun left a comment

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.

None yet

2 participants