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 fiscal_month attribute to FiscalDateTime and FiscalDate #11

Merged
merged 13 commits into from
Oct 16, 2020

Conversation

nicmendoza
Copy link
Contributor

This PR specifically adds a fiscal_month attribute (and does not add a correspondingFiscalMonth object). I can follow up with fiscal_week and fiscal_day if desired, but I really needed this functionality for my use case and I'm hoping this PR stands on its own. It's pretty simple, and I think the approach could be quickly adapted to those two additional calculations if/when desired.

Please let me know if the PR is missing anything.

@nicmendoza
Copy link
Contributor Author

@adamjstewart is it possible re-running the build could resolve this issue? If I understand the logs, it seems like there's a plugin version resolution conflict with pytest specifically on Python 3.5 but the build+test are succeeding otherwise.

@nicmendoza
Copy link
Contributor Author

Added a minor commit to re-trigger the build ☝

@codecov-io
Copy link

codecov-io commented Oct 14, 2020

Codecov Report

Merging #11 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #11   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          266       269    +3     
=========================================
+ Hits           266       269    +3     
Impacted Files Coverage Δ
fiscalyear.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 365f86e...faa3711. Read the comment docs.

@nicmendoza
Copy link
Contributor Author

Had to pin pytest and pytest-mock to old versions to maintain support for python 2 .7 (assuming that's still a requirement)

@adamjstewart
Copy link
Owner

Hi @nicmendoza, thanks for the contribution!

First impression: I like it, and I think the way you have things implemented looks correct. I'll go over this in more detail over the next couple of days.

With regards to the pytest issue: I think pinning the version is the right thing to do. We don't use any new features of PyTest anyway. I would like to continue to offer Python 2 support because a lot of people are stuck with Python 2, especially in industry where they can't update their own computers. I use a couple of supercomputing clusters that are still stuck on Python 2.6 unfortunately. I've thought about dropping support for Python 2, 3.0-3.4 so that I can add type hints, but so far there hasn't been any demand for it.

Copy link
Owner

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

Just a few minor suggestions, otherwise LGTM!

docs/index.rst Show resolved Hide resolved
fiscalyear.py Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
nicmendoza and others added 2 commits October 16, 2020 12:41
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
README.rst Show resolved Hide resolved
@nicmendoza nicmendoza mentioned this pull request Oct 16, 2020
@adamjstewart adamjstewart merged commit d6e0274 into adamjstewart:master Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants