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

Enhance Response Text Styling #51

Open
sk364 opened this issue Jul 18, 2020 · 16 comments
Open

Enhance Response Text Styling #51

sk364 opened this issue Jul 18, 2020 · 16 comments

Comments

@sk364
Copy link
Owner

sk364 commented Jul 18, 2020

Responses from various options require styling as to enhance the UI/UX.

Example (output of --search option):

This prints out a table with headers as capitals. Could print out as bold, title-cased. Also, in rows it could print out the Code in different color.

NAME                                                 CODE       SUCCESSFUL SUBMISSION   ACCURACY   

MEX-ception                                          TOTEM      7                       32.26
@sreesh-mallya
Copy link

Hi there! I would like to work on this issue. Could you please give me a elaborated description of what this issue is about?

@sk364
Copy link
Owner Author

sk364 commented Jul 19, 2020

@sreesh-mallya Check the issue description.

@sk364 sk364 changed the title Response Text Styling Enhance Response Text Styling Jul 19, 2020
@sk364
Copy link
Owner Author

sk364 commented Jul 21, 2020

Thinking of using library rich to prettify the responses.

@sreesh-mallya
Copy link

sreesh-mallya commented Jul 21, 2020

Great! Would this be of any use here? Should I keep working, or are you taking a look? @sk364. I've started going through trying to understand how it all works.

@sk364
Copy link
Owner Author

sk364 commented Jul 21, 2020

Halo looks good to me. We can use it.

Sure, you can keep working. I will be taking a look later.

@travis-sauer-oltech
Copy link

@sk364 is @sreesh-mallya still working on this, or could I give this a whirl?

@sreesh-mallya
Copy link

@aUsefulMethod I've started to work on this, but haven't done much in the past week. @sk364 please make the call. I can probably get this done this weekend, or if you want @aUsefulMethod to go ahead with this, that's fine by me too. :)

@sk364
Copy link
Owner Author

sk364 commented Aug 18, 2020

@sreesh-mallya can you describe the changes that you are doing? @aUsefulMethod, if interested, can either fill the gaps or extend it.

@sreesh-mallya
Copy link

@sk364 I'm not sure if I've done something very significant yet. All I've done is used rich.table to print out the search results in helpers.print_response_util. I need to check the tests and see what lines of code is not required anymore, since rich does all the work for creating and printing the table. I was also thinking of using halo as mentioned before.

@sreesh-mallya
Copy link

I've some suggestions too: How about using subcommands instead of using options for logging in, getting the problem description, listing contests, and submitting code?

Maybe something like codechefcli login to login, or codechefcli problem WEICOM to get the problem description, and so on. We can use click or Typer, I've found them easier to use than argparse.

@sk364 what do you think?

@sk364
Copy link
Owner Author

sk364 commented Aug 19, 2020

@sreesh-mallya yeah, we can use subcommands. You can create a separate issue for it.

@sreesh-mallya
Copy link

@aUsefulMethod check out this issue.

@sreesh-mallya
Copy link

@sk364 There are a few functions for printing tables and styling responses which I think we won't be needing since we're using rich. Shall I go ahead and remove them?

@sk364
Copy link
Owner Author

sk364 commented Aug 27, 2020 via email

@Jai2305
Copy link
Contributor

Jai2305 commented Aug 25, 2021

Hi, I was just curious that in the problems.py . get_description(...) , on line 36 onward the code is defining a list which is storing certain properties of problems like, Name, Author, Date Added and so on
image

but then on line 59 code is using .join to which is converting every object in the list into string and returning it as response ,
image

the problem is, for making tables I think it would be a lot more easier if the data is returned in a dictionary format rather than string so that separate columns can be constructed using the keys of the dictionary and corresponding values can be filled in cell

@ajjayymahato
Copy link

Hi there! I would like to work on this issue. Can you please assign this issue to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants