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

Scrape fixing #4

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

Scrape fixing #4

wants to merge 82 commits into from

Conversation

AstrophysicsAndPython
Copy link
Collaborator

@AstrophysicsAndPython AstrophysicsAndPython commented Aug 2, 2022

  • Added relative path option in __init__ method
  • Added static methods about add_import_to_results and add_from_results
  • Changed __scrape_import method
  • Changed __scrape_variables method
  • Added import_count method
  • Added option of all or top N most_used_variables
  • Separated imports in from_, import_, and all_ in get_import_names
  • Added more functionalities to utilities.py
  • Added test.py to .gitignore file

* added relative path option in __init__ method
* added static methods about add_import_to_results and add_from_results
* changed __scrape_import method
* changed __scrape_variables method
* added import_count method
* added option of all or top N most_used_variables
* separated imports in from_, import_, and all_ in get_import_names
* added more functionalities to utilities.py
* added test.py to .gitignore file
@AstrophysicsAndPython
Copy link
Collaborator Author

AstrophysicsAndPython commented Aug 2, 2022

TODO

  • Fix the issue with import by using regex instead of string comparisons.

@DamnUi
Copy link
Owner

DamnUi commented Aug 3, 2022

Insane stuff man, looking over it right now its like a full revision

DamnUi and others added 12 commits August 7, 2022 20:17
[+]Added a new class called visual_wrapper which implements current code visually
[*]Get_import_count function needs work in the new class
[-]Removed some print lines in Stat class.
Centered quick stat completely
small changes to dashboard
* made corrections in from_import and import_imports functions
[+] Added an adhd mode
[+] Added Extra adhd mode
[=] Better normal default colours
Used black to format all the code looks cleaner now.
@AstrophysicsAndPython
Copy link
Collaborator Author

We messed up the MAJOR-MINOR thing good 😆

DamnUi and others added 8 commits August 8, 2022 15:54
Realized i made mistake and i skipped over [MINOR-5]
But i dont wanna fix it so here this is!
[+] Sorted Most Called Functions:
(Formatted this in the Stat class instead of VisualWrapper and that probably made it harder for me)
[+] Made count of import and from statements its own panels
(This time i actually made it easier for me and not be dumb and made the changes in the VisualWrapper class but it probably needed to be in this class
[+] Added a rule line on line 494
[+] Not gonna explain
[+] Added a new parameter in command line options called --vars, supposed to be an int this will determine how many variables to get. (Astro take a look at line 397 i have implemented a temp fix but please implement a better fix as my code is giving me headache lol)

[+] Made all fetch statements Status statements

[=] I think line_count function parameter 2 (exclude_empty_line) is not working (line 199)
please revise the get_import_count function in visualwrapper please
* some major formatting corrections
* some minor function call and other corrections
@AstrophysicsAndPython
Copy link
Collaborator Author

AstrophysicsAndPython commented Aug 8, 2022

  • Resolve issues with functions having an exact string in their names, for example, get_color and _color will give issues in counting.
  • Resolve issues with large number of files to be read, the list output for Selected Files is not okay

DamnUi and others added 30 commits August 22, 2022 18:09
[+] Added a new panel which shows how many if, while, for, try and with statements exist

im not sure how to get the numbers coloured but if you want you can mess with it at line 638

[=] Now from and import modules are always the same height :)
[=] From import's are still not working properly
[+] Fixed a few bugs
[+] Added a total variable count
[+] Added a decorator count without ast using regex instead
[+] Fixed some bugs with Statements panel
Resolved issues in the following files via DeepSource Autofix:
1. All current dashboard ideas.py/revision design.py
2. checks.py
3. gex/func and class.py
4. PyStats.py
5. utilities.py
[=] Changed some existing code so it improves performance
- removed unused var
- useless lines
[+] Fixed a bug with a try statement count fixed it by rounding up also fixed an error with functions showing 1 less (defined line)
* major code reformatting and minor spellings corrections
* code cleanup and variable naming
* partially consistent color scheme for the dashboard
these are rare
[+] Added an img view option --imgpath which displays an img
i did something
Did something now i have brain dmg
probably spent like 6hrs today on python
[=] Massively improved quick stats
* major code reformatting and minor spellings corrections
* code cleanup and variable naming
* partially consistent color scheme for the dashboard
* moved the Stats and VisualWrapper from PyStats.py to _PyStats.py file so that the main file is cleaner
* some minor changes in _PyStats.py
* got PyStats.py working again properly
minor stuff totally did not take me hrs
* some minor fixes, the variable count is still whack
* added the table format and some fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants