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

Made relevant questions visible and their answers viewable. Fixed the red line issue. #82

Merged
merged 7 commits into from
Apr 17, 2021

Conversation

NamamiShanker
Copy link
Member

Related Issue

  • CLI was presenting all the answers of a single question.
  • No option to choose any other relevant question.
  • Red lines were not appearing properly

Closes: #33

Describe the changes you've made

I have made some big changes in the code. The user will now be shown all the relevant question. He will be able to view answer to any one of those questions by inputting question number. Also the issue of red line has been fixed. The line now is very defined and clear with properly formatted content on the screen. Also added automatic caching of requested answers for better performance.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

Screenshots

Original Updated
before final_dynCLI

Here is the CLI in action

CLI-working

Looks cool right? I have some more plans for changes further.

@NamamiShanker NamamiShanker changed the title Made relevant questions visible their answers viewable. Fixed the red line issue. Made relevant questions visible and their answers viewable. Fixed the red line issue. Apr 16, 2021
src/arguments/utility.py Outdated Show resolved Hide resolved
src/arguments/utility.py Outdated Show resolved Hide resolved
@NamamiShanker
Copy link
Member Author

@Siddhant-K-code I have made the requested changes.

Copy link
Member

@Siddhant-K-code Siddhant-K-code left a comment

Choose a reason for hiding this comment

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

It is not that important but would be good if you can: Grammatical, Spelling errors

1 example is given, you can do similar changes for all docstrings


3) Use the data received from the above request and loop
through it to print the answer
1) Gets the details of all the relavant question and stores their title, link and id in "question_data" list.
Copy link
Member

Choose a reason for hiding this comment

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

relavant question = > relevant questions

Copy link
Member Author

Choose a reason for hiding this comment

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

I will run the code through spell check once.

@sonarcloud
Copy link

sonarcloud bot commented Apr 17, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@NamamiShanker
Copy link
Member Author

@Siddhant-K-code I have checked the spellings and corrected grammatical mistakes.

Copy link
Member

@Siddhant-K-code Siddhant-K-code left a comment

Choose a reason for hiding this comment

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

Nice Work 🎉

Thanks @NamamiShanker

@Siddhant-K-code Siddhant-K-code requested review from lainq, rrachitgarg and GouravSardana and removed request for lainq April 17, 2021 06:17
Copy link
Member

@GouravSardana GouravSardana left a comment

Choose a reason for hiding this comment

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

LGTM. Nice work

@GouravSardana GouravSardana merged commit c3d2af3 into IndianOpenSourceFoundation:master Apr 17, 2021
@GouravSardana
Copy link
Member

@NamamiShanker Why this is conflicting with the promt-toolkit version of mine?

pkg_resources.VersionConflict: (prompt-toolkit 3.0.18 (/home/linuxbrew/.linuxbrew/lib/python3.7/site-packages), Requirement.parse('prompt-toolkit<2.1.0,>=2.0.0'))

We are not using promt-kit but still it is conflicting with the promtkit

@GouravSardana
Copy link
Member

@NamamiShanker
Copy link
Member Author

NamamiShanker commented Apr 17, 2021

@GouravSardana Can you please send a screenshot? In my case it is just showing the most upvoted answer.

varIss

variablesIssue

@NamamiShanker
Copy link
Member Author

@NamamiShanker Why this is conflicting with the promt-toolkit version of mine?

pkg_resources.VersionConflict: (prompt-toolkit 3.0.18 (/home/linuxbrew/.linuxbrew/lib/python3.7/site-packages), Requirement.parse('prompt-toolkit<2.1.0,>=2.0.0'))

We are not using promt-kit but still it is conflicting with the promtkit

What is your prompt toolkit version? I think it might be occurring either because I am using a different method to print red lines or I am clearing terminal with os module.

@GouravSardana
Copy link
Member

Mine is the latest 3.0.18

@GouravSardana
Copy link
Member

Search for variable and tag is python

@NamamiShanker
Copy link
Member Author

Mine is the latest 3.0.18

Ok I'll look into it. Are the red lines appearing properly?

@NamamiShanker
Copy link
Member Author

Do you mean it is showing so many questions related to the search? All the 30 questions are being displayed on the screen.

@GouravSardana
Copy link
Member

Nops. It is displaying Answer 1 but all the comments are displaying i.e all upvoted in the answer

@GouravSardana
Copy link
Member

To give you more content - See this - https://stackoverflow.com/questions/986006/how-do-i-pass-a-variable-by-reference

This is the first answer link and in this 6-7 comments are there with different upvotes. All are showing

@GouravSardana
Copy link
Member

  • quit is also not working

@NamamiShanker
Copy link
Member Author

Mine is the latest 3.0.18

Ok I'll look into it. Are the red lines appearing properly?

I updated my prompt-toolkit version to 3.0.18 and everything is still working, If the issue continues can we meet on discord or somewhere to resolve it?

@NamamiShanker
Copy link
Member Author

Ohh okay.. can we meet on discord because everything is working alright in my system. No prompt-toolkit error, no comments are visible and quit is also working.

@GouravSardana
Copy link
Member

We can set up a call. Please email your availability at ping@iosf.in

@NamamiShanker
Copy link
Member Author

@GouravSardana I emailed you from namami2011@gmail.com

@Siddhant-K-code
Copy link
Member

We can set up a call. Please email your availability at ping@iosf.in

Can other member of the org. can also get this @iosf.in mail address :)

@NamamiShanker
Copy link
Member Author

Hey @GouravSardana! Why was I given 0 points for this merge?

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

Successfully merging this pull request may close these issues.

Change the layout of search results
3 participants