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

Address numpy int argument conversion issue #1782

Merged
merged 2 commits into from
May 9, 2024

Conversation

arkid15r
Copy link
Collaborator

@arkid15r arkid15r commented May 1, 2024

Proposed change

Resolves #1779

This change fixes years numpy int incompatibility issue. In order to test it properly we'll need numpy package installed in the test environment. I'm still not sure if that's a great idea as it's not really 💯 PH issue. On the other hand Prophet is a huge part of our ecosystem and it'd be very nice of us to take care of the issue.

FYI: there is a problem when running the new test on Windows pypy3.10 so I skipped it with skipif. It looks like import numpy causes that. If anyone knows how to fix that please let me know.

I also added pypy3.9 pypy3.10 to tox.ini env list.

@KJhellico @PPsyrius I'd like to know your opinion on this PR -- I'm open to removing the test or discarding the PR entirely based on your suggestions.

Thank you!

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new python-holidays functionality in general)

Checklist

  • I've followed the contributing guidelines
  • I've run make pre-commit, it didn't generate any changes
  • I've run make test, all tests passed locally

@arkid15r arkid15r requested a review from PPsyrius May 1, 2024 02:58
@arkid15r arkid15r requested a review from KJhellico as a code owner May 1, 2024 02:58
@PPsyrius
Copy link
Collaborator

PPsyrius commented May 1, 2024

As long as numpy are only used for testing I have no qualm against that.

@coveralls
Copy link

coveralls commented May 1, 2024

Pull Request Test Coverage Report for Build 8978758502

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 8972750703: 0.0%
Covered Lines: 11085
Relevant Lines: 11085

💛 - Coveralls

Comment on lines +24 to +29
@pytest.mark.skipif(
platform().startswith("Windows")
and python_implementation().startswith("PyPy")
and python_version().startswith("3.10"),
reason='Avoid "make: *** [Makefile:63: test] Error 5" for pypy3.10 on Windows',
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link

sonarcloud bot commented May 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.1% Duplication on New Code

See analysis details on SonarCloud

@arkid15r arkid15r enabled auto-merge May 8, 2024 19:52
Copy link
Collaborator

@KJhellico KJhellico left a comment

Choose a reason for hiding this comment

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

LGTM.

@arkid15r arkid15r added this pull request to the merge queue May 9, 2024
Merged via the queue into vacanza:dev with commit 4efae51 May 9, 2024
29 checks passed
@arkid15r arkid15r deleted the fix-numpy-int-error branch May 9, 2024 15:42
@arkid15r arkid15r mentioned this pull request May 20, 2024
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.

The calculation of the lunar start date throws a TypeError exception for Thailand and Cambodia
4 participants