Skip to content

Commit

Permalink
Merge pull request #8 from westonplatter/features/cicd
Browse files Browse the repository at this point in the history
setup github action for running tests
  • Loading branch information
jkirkby3 authored Oct 17, 2023
2 parents 039f9c8 + 2689fc5 commit c094b10
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 43 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests

on: [push, pull_request]

jobs:
ci:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip # doesn't work with pyproject.toml?
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[test]'
- name: Test with unittest
run: |
python tests/test_runner.py
165 changes: 165 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,168 @@
*.pyc
*.idea
*.cache

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# --- custom stuff ---

# don't save jupyter notebook checkpoints
.ipynb_checkpoints/*

# let each dev decide on their conventions
.python-version

# ignore the vscode settings
.vscode
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ You can check the latest sources with the command

You can run the full test suite with this command,

python -m unittest discover -s test -p '*_test.py'
python tests/test_runner.py



Expand Down
17 changes: 0 additions & 17 deletions requirements.txt

This file was deleted.

64 changes: 39 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
from setuptools import setup, find_packages



setup(name='fypy',
version='0.0.1',
description='Financial Quant model calibration and option pricing',
long_description='Financial Quant model calibration and option pricing',
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering ',
"Operating System :: OS Independent",
],
keywords='quant option-pricing calibration fit levy stochastic-volatility',
url='https://github.com/jkirkby3/fypy',
author='Justin Lars Kirkby',
author_email='[email protected]',
license='MIT',
packages=find_packages(where="fypy"),
python_requires=">=3.7",
install_requires=[
'numpy',
],
include_package_data=True,
zip_safe=False)
setup(
name='fypy',
version='0.0.1',
description='Financial Quant model calibration and option pricing',
long_description='Financial Quant model calibration and option pricing',
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering ',
"Operating System :: OS Independent",
],
keywords='quant option-pricing calibration fit levy stochastic-volatility',
url='https://github.com/jkirkby3/fypy',
author='Justin Lars Kirkby',
author_email='[email protected]',
license='MIT',
packages=find_packages(),
python_requires=">=3.7",
install_requires=[
"matplotlib",
"numpy",
"python-dateutil",
"scipy",
"py_lets_be_rational>=1.0.1",
"pandas",
"requests-cache",
"yfinance",
],
extras_require={
"test": []
},
include_package_data=True,
zip_safe=False,
)

0 comments on commit c094b10

Please sign in to comment.