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

Add quarter granularity #1048

Merged
merged 5 commits into from
Oct 22, 2021
Merged

Conversation

Alig1493
Copy link
Contributor

Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:

  • 🧪 Added tests for changed code.
  • 🛠️ All tests pass when run locally (run tox or make test to find out!).
  • 🧹 All linting checks pass when run locally (run tox -e lint or make lint to find out!).
  • 📚 Updated documentation for changed code.
  • ⏩ Code is up-to-date with the master branch.

If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

Description of Changes

#1019

  • Using a regex dependency of regex==2020.1.8 to bypass errors encountered during linting checks. I.E:
Traceback (most recent call last):
  File "/Users/ali/.cache/pre-commit/repo7bat5wn8/py_env-python3/bin/black", line 5, in <module>
    from black import patched_main
  File "/Users/ali/.cache/pre-commit/repo7bat5wn8/py_env-python3/lib/python3.9/site-packages/black/__init__.py", line 10, in <module>
    import regex as re
  File "/Users/ali/.cache/pre-commit/repo7bat5wn8/py_env-python3/lib/python3.9/site-packages/regex/__init__.py", line 1, in <module>
    from .regex import *
  File "/Users/ali/.cache/pre-commit/repo7bat5wn8/py_env-python3/lib/python3.9/site-packages/regex/regex.py", line 419, in <module>
    import regex._regex_core as _regex_core
  File "/Users/ali/.cache/pre-commit/repo7bat5wn8/py_env-python3/lib/python3.9/site-packages/regex/_regex_core.py", line 21, in <module>
    import regex._regex as _regex
ImportError: dlopen(/Users/ali/.cache/pre-commit/repo7bat5wn8/py_env-python3/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so, 2): no suitable image found.  Did find:
	/Users/ali/.cache/pre-commit/repo7bat5wn8/py_env-python3/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so: code signature in (/Users/ali/.cache/pre-commit/repo7bat5wn8/py_env-python3/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so) not valid for use in process using Library Validation: Trying to load an unsigned library
  • Add quarter granularity options to humanize.
  • Add test to check quarter granularity

@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #1048 (f281c0f) into master (4d1aa4f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1048   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2218      2221    +3     
  Branches       348       349    +1     
=========================================
+ Hits          2218      2221    +3     
Impacted Files Coverage Δ
arrow/locales.py 100.00% <ø> (ø)
arrow/arrow.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d1aa4f...f281c0f. Read the comment docs.

Copy link
Member

@anishnya anishnya left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -20,7 +20,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
rev: v2.23.3
Copy link
Member

Choose a reason for hiding this comment

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

Rebase this file from master since it was updated in a recent commit.

hooks:
- id: black
args: [--safe, --quiet, --target-version=py36]
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
additional_dependencies: [regex==2020.1.8]
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is necessary if the CI build for this change passes when the PR is submitted. The lint error you are seeing must be a local caching issue. Try deleting the pre-commit cache: rm -rf /Users/ali/.cache/pre-commit/.

Copy link
Member

@jadchaar jadchaar left a comment

Choose a reason for hiding this comment

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

Looks good, but it would be good to add a few more tests :)!

tests/test_arrow.py Show resolved Hide resolved
Copy link
Member

@jadchaar jadchaar left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the awesome contribution @Alig1493!

@jadchaar jadchaar merged commit f7a3aa3 into arrow-py:master Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants