-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
STYLE Increase coverage of inconsistent-namespace-usage #39992
Comments
I ran the script for "extension" and it made no change to files in that folder. I checked my procedure against your example above to make sure this was not the result of a bad manipulation. When changing to series I get the same output as in your post. |
Currently working on indexes, will submit a PR as there were changes on that folder. |
Fix inconsistent namespace in apply directory.
Fix inconsistent namespace in apply directory.
Fix inconsistent namespace in apply directory.
@MarcoGorelli the automatic script only changes it from |
@jorisvandenbossche if there's both, it'll choose the non- e.g. import pandas as pd
def test_0():
pd.DataFrame()
def test_1():
pd.DataFrame() would be left untouched (i.e. it would keep being consistent within the file), but import pandas as pd
from pandas import DataFrame
def test_0():
pd.DataFrame()
def test_1():
DataFrame() would become import pandas as pd
from pandas import DataFrame
def test_0():
DataFrame()
def test_1():
DataFrame() |
libs and tslibs passed without fixes, |
computation passed without fixes |
Working on |
As part of pyladies-sprint-March-2021, I looked at dir reductions |
Nice, thanks @sionedbaker ! It doesn't look like you've opened a pull request though, let us know if you want//need help with that |
I am new to open source contribution and I have cloned this repo in my system but I am unable to understand what are the corrections needed to be done. Can anyone help me, I am literally so confused. |
working on |
There's only 9 files left now, so if anyone wants to close this issue then please change |
Working to close this issue |
As you can see in the above image that by replacing pandas/pandas/tests/test_algos.py Line 494 in 70c91a2
Rest all files are resolved. |
One solution is to exclude test_algos.py from checking for inconsistency in pre-commit. |
My bad, I missed that @sionedbaker hasn't submitted her PR for |
Hi @MarcoGorelli , very sorry for taking so long to reply, but I had huge problems with pushing my changes to github (due to me having to setup 2FA but I've push changes to my fork now, and then created PR: #40310 |
No worries, thanks for your PR and happy IWD! I recommend the first 3 chapters of the pro-git book, the rest is just practice |
Many thanks @MarcoGorelli and thanks for approving the PR. Thanks for the git book, looks good, be really interested in working through some (very simple!) panda issues in the next few weeks, I will keep an eye on the github issues. Be really interested in a further follow up session so will try to keep up to date with pyladies. thanks for all your help |
* STYLE: Inconsistent namespace - tools (#39992) * Pre-Commit Fixes * STYLE: Resolved Inconsistent namespace except test_algos.py - (#39992) * STYLE: Resolved Inconsistent namespace by excluding test_algos.py * test_algos.py fixes * Updated test_algos.py * STYLE: inconsistent-namespace-usage fixes * updated test_interval.py * FIX: Improved varible names * test_interval.py fixes * FIX: Resolved confusing variable names * test_string.py fixes * getitem.py fixes * rename more variables to arr Co-authored-by: Marco Gorelli <marcogorelli@protonmail.com>
If you already have experience contributing, then please leave this issue to newcomers - thanks 👍
In
.pre-commit-config.yaml
, the checkinconsistent-namespace-usage
is limited topandas/tests/frame/
. Let's expand it to the rest ofpandas/tests/
.The task here is:
series
) and add it to the check in.pre-commit-config.yaml
. E.g., if you choseseries
, that would be:tokenize-rt
as an additional dependency and--replace
as an arg (these will be removed later):Check that the other hooks still pass - if you enable pre-commit (
pre-commit install
), then this will happen automatically when you try to commit your changes (see step 6).pre-commit-config.yaml
(we'll update it once these changes are all so as to avoid a barrage of merge conflicts)Here are the folders in
pandas/tests
which this check needs expanding to:No need to ask for permission to work on this, just leave a comment letting people know which folder(s) from the list above you're working on
The text was updated successfully, but these errors were encountered: