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

Adding utility to generate account codes #114

Merged
merged 4 commits into from
May 28, 2024

Conversation

adamcharnock
Copy link
Owner

@adamcharnock adamcharnock commented May 28, 2024

I need this for my current project, and figured it would be useful to others too

Simple form:

from hordak.utilities.account_codes import get_next_account_code

get_next_account_code("09")
>>> "10"

get_next_account_code("19", alpha=True)
>>> "1A"

Generator:

for code in AccountCodeGenerator(start_at='00'):
    print(code)

for code in AccountCodeGenerator(start_at='00', alpha=True):
    print(code)

@adamcharnock adamcharnock changed the title Adding utility to generate account code Adding utility to generate account codes May 28, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.11%. Comparing base (81b90df) to head (66dbe6a).
Report is 3 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #114      +/-   ##
==========================================
+ Coverage   93.01%   93.11%   +0.10%     
==========================================
  Files          59       61       +2     
  Lines        3836     3895      +59     
  Branches      249      256       +7     
==========================================
+ Hits         3568     3627      +59     
  Misses        224      224              
  Partials       44       44              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamcharnock adamcharnock force-pushed the feature/account-code-generator branch from 66dbe6a to bf63d1a Compare May 28, 2024 13:08
@adamcharnock
Copy link
Owner Author

Just so you're aware @PetrDlouhy

@adamcharnock adamcharnock merged commit 5036687 into master May 28, 2024
17 checks passed
@adamcharnock adamcharnock deleted the feature/account-code-generator branch June 28, 2024 09:10
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.

2 participants