The yearfrac git repo is available as PyPi package
pip install yearfrac
Check the examples folder for notebooks.
Functions
isaleapyear-- Check if a year is leap yeareastersunday-- Determine day and month of an Easter Sunday for a given yearjd_to_dateanddate_to_jd-- Julian Day number conversionact_afb-- Actual/Actual AFBact_isda-- Actual/Actual ISDAd30360e-- 30E/360 ISDA daycount methodd30365-- 30/365 daycount methodyearfrac-- Wrapper for all daycount methods
python3.7 -m venv .venv
source .venv/bin/activate
pip3 install --upgrade pip
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
pip3 install -r requirements-demo.txt
(If your git repo is stored in a folder with whitespaces, then don't use the subfolder .venv. Use an absolute path without whitespaces.)
- Check syntax:
flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g') - Run Unit Tests:
python -W ignore -m unittest discover - Remove
.pycfiles:find . -type f -name "*.pyc" | xargs rm - Remove
__pycache__folders:find . -type d -name "__pycache__" | xargs rm -rf
Publish
# pandoc README.md --from markdown --to rst -s -o README.rst # RST file is too much trouble
python setup.py sdist
twine upload -r pypi dist/*Please open an issue for support.
- Adam Groszer @agroszer
- Emilio Basualdo @emiliobasualdo
- Ivan Nesic @fatkaratekid
- Vinay Gupta @vinschess
- Ulf Hamster @ulf1
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.