-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Validating that the word pandas is correctly capitalized #32613
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
Conversation
Can you have a look at the diff? I think something went wrong, there are lots of unrelated changes. |
@datapythonista you're right, let me check what went wrong. |
@joybhallaa Can you run the following and push?
Taken all of the commands above from https://datapythonista.me/blog/useful-git-commands.html |
@MomIsBestFriend okay, I'll do that ! |
@MomIsBestFriend I executed all these commands, and when pushing using Let me check what's causing the problem and I'll push ASAP |
@joybhallaa Have you followed the steps in the Contributing guide? |
@joybhallaa first try |
6be9787
to
591cdc6
Compare
@datapythonista done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are adding this code in the linting section (flake8...). We have a section named patterns where we are checking for many patterns in the same way as you need to check for this one.
ci/code_checks.sh
Outdated
@@ -80,6 +80,13 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then | |||
flake8-rst doc/source --filename=*.rst --format="$FLAKE8_FORMAT" | |||
RET=$(($RET + $?)) ; echo $MSG "DONE" | |||
|
|||
# Check if pandas is referenced as pandas, not *pandas* or Pandas | |||
MSG='Checking if pandas reference is standardized or not' ; echo $MSG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MSG='Checking if pandas reference is standardized or not' ; echo $MSG | |
MSG='Checking if the pandas word is always used lowercase (has to be pandas, not Pandas or PANDAS...)' ; echo $MSG |
ci/code_checks.sh
Outdated
# Check if pandas is referenced as pandas, not *pandas* or Pandas | ||
MSG='Checking if pandas reference is standardized or not' ; echo $MSG | ||
grep -nr '*pandas*|Pandas' doc/* | ||
grep -nr '*pandas*|Pandas' web/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the next code works. You can't have two statements, since you are checking the exit code later, and you're only checking the code of the last statement.
grep -nr '*pandas*|Pandas' web/* | |
grep -nr '*pandas*|Pandas' web/* doc/* |
Also, please use invgrep
as in the rest of this script, you're doing here the opposite of what you want to do. And we have lots of validations where we already do this for other patterns, don't need to reinvent the wheel, just so the same, so we also keep consistent.
ci/code_checks.sh
Outdated
grep -nr '*pandas*|Pandas' web/* | ||
RET=$(($RET + $?)) ; echo $MSG "DONE" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't leave extra blank lines, keep the same style and formatting as the rest of the script.
@joybhallaa do you have time to have a look at the previous comments? |
@datapythonista yep was busy with college stuff. Will start work ASAP |
@@ -229,6 +229,11 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then | |||
invgrep -RI --exclude=\*.{svg,c,cpp,html,js} --exclude-dir=env "\s$" * | |||
RET=$(($RET + $?)) ; echo $MSG "DONE" | |||
unset INVGREP_APPEND | |||
|
|||
# Check if pandas is referenced as pandas, not *pandas* or Pandas | |||
MSG='Checking if the pandas word reference is always used lowercase (pandas,not Pandas or PANDAS' ; echo $MSG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@datapythonista I forgot to add )
on line 234, please let me know if everything else besides this right or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is green, and I don't think we fixed all the cases of Pandas
and *pandas*
in the docs and web, did we? If we didn't, this is not working.
We use invgrep -R
everywhere else, I think we should use the same, may be that's the problem.
Also, can you add PANDAS
please?
ci/code_checks.sh
Outdated
|
||
# Check if pandas is referenced as pandas, not *pandas* or Pandas | ||
MSG='Checking if the pandas word reference is always used lowercase (pandas,not Pandas or PANDAS' ; echo $MSG | ||
invgrep -nr '*pandas*|Pandas' web/* doc/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is with the astriks in the end, does the CI fail if we remove those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MomIsBestFriend CI passes even after removing the asterisk
Sure |
Something is wrong here, @joybhallaa can you have a look at the diff, and leave things so this is ready for review please? |
* CLN: cimporting time instead of going to python space pandas/_libs/tslibs/conversion.pyx * cimporting time instead of going to python space pandas/_libs/tslibs/timestamps.pyx * cimporting time instead of going to python space pandas/_libs/tslibs/period.pyx Co-authored-by: MomIsBestFriend <>
Co-authored-by: Farhan Reynaldo <[email protected]>
…andas-dev#33074) * TYP: require _update_inplace gets BlockManager * standardize on requiring Series/DataFrame, never BlockManager
@datapythonista yes.Working on it right now EDIT: There is still one file with conflict. |
@datapythonista should I open a new PR with a new branch ? This branch keeps giving me problems. |
@joybhallaa I suggest you read https://datapythonista.me/blog/useful-git-commands.html
|
@datapythonista the 2nd last commit only has the changes that I've made. |
No, we need a proper PR to be able to fix. @MomIsBestFriend gave you a resource to fix this. But probably better to open a new PR, closing this one, since your changes are small, and looks like it'll be easier to start again, than to fix this. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
As suggested by @datapythonista , I've added checks in
ci/code_checks.sh
to look if thepandas
is being referenced in a standardized way i.epandas
, not*pandas*
orPandas
@datapythonista I've only added checks to see if pandas is being referenced correctly, but not showing where it's changed or how many references are wrong.
Should I add checks for that also ? What do you think ?