diff --git a/.travis.yml b/.travis.yml index 051829f82ee024e458a5f33f81280697d5942d9d..94f2b51b8316209ffddee87a21e3290fe9acd3a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,16 @@ language: python python: - - "2.7" - - "3.3" - - "3.4" - "3.5" - - "pypy" + - "3.6" + - "3.7" + - "3.8" + - "nightly" + - "pypy3" install: - pip install -r requirements.txt - pip install --force-reinstall "coverage>=4.0,<4.4" codeclimate-test-reporter script: - - python setup.py nosetests + - python setup.py tests - python setup.py sdist bdist bdist_wheel after_success: - codeclimate-test-reporter -notifications: - slack: digicort:lbgdFcFmWmHtHKDEMI3FwQK5 \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index 240f2a955780dbb8021599db16457b1763ddbde7..13cc922681642cc17c4eb7bed396ea99c5512a02 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,7 @@ MIT License -Copyright (c) 2017 P.W. DMS s.c. +Copyright (c) 2017-2018 P.W. DMS s.c. +Copyright (c) 2018-2020 Piotr MaĹlanka Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d4bb2cbb9eddb1bb1b4f366623044af8e4830919 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..d62f2def5aac7e518f7616a40c22ed504f9d75c7 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,55 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'firanka' +copyright = '2018-2020, Piotr MaĹlanka' +author = 'Piotr MaĹlanka' + +# The full version, including alpha/beta/rc tags +release = '0.1.2' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..a9b6b9d744d360ebc00ce6458dd3015d97ae08a8 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,20 @@ +.. firanka documentation master file, created by + sphinx-quickstart on Fri Feb 7 14:22:52 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to firanka's documentation! +=================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..922152e96a04a242e6fc40f124261d74890617d8 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/firanka/builders.py b/firanka/builders.py index e484a7e79c6576924e2a8538cd9fdbef7b45a475..c309a1df453cbfc21d8797cabd252164bce9328a 100644 --- a/firanka/builders.py +++ b/firanka/builders.py @@ -1,5 +1,4 @@ -# coding=UTF-8 -from __future__ import print_function, absolute_import, division + import copy diff --git a/firanka/exceptions.py b/firanka/exceptions.py index bc1ef1447759401d4bb92453f3a76bfe76ca2d47..74613976a453cd71bf0000b5815b1c1dc1bed488 100644 --- a/firanka/exceptions.py +++ b/firanka/exceptions.py @@ -1,5 +1,4 @@ -# coding=UTF-8 -from __future__ import print_function, absolute_import, division + __all__ = [ 'FirankaError', diff --git a/firanka/intervals.py b/firanka/intervals.py index a1eee1ca2c4ad406524aff3ad322a6789721bfa0..36a3acf964ddffa4af87c286104a0d5d8a5bbc3f 100644 --- a/firanka/intervals.py +++ b/firanka/intervals.py @@ -1,10 +1,6 @@ -# coding=UTF-8 -from __future__ import print_function, absolute_import, division import math - -import six - +import functools from .exceptions import NotInDomainError __all__ = [ @@ -15,7 +11,7 @@ __all__ = [ def _pre_range(fun): # for making sure that first argument gets parsed as a Interval - @six.wraps(fun) + @functools.wraps(fun) def inner(self, arg, *args, **kwargs): if not isinstance(arg, Interval): arg = Interval(arg) diff --git a/firanka/series/__init__.py b/firanka/series/__init__.py index 6b9ae3be76d1683b9249cc651113e33e436c5c01..7a45f4642c62d0c012e4239382fa8eea73404e9c 100644 --- a/firanka/series/__init__.py +++ b/firanka/series/__init__.py @@ -1,6 +1,3 @@ -# coding=UTF-8 -from __future__ import absolute_import - from .base import DiscreteSeries, Series from .bundle import SeriesBundle, DiscreteSeriesBundle from .function import FunctionSeries diff --git a/firanka/series/base.py b/firanka/series/base.py index 9b82918077f40868244b9fa42c9ac51d59b287eb..925e0e7736059b0be02bce2fd28a7eac2474d83a 100644 --- a/firanka/series/base.py +++ b/firanka/series/base.py @@ -1,5 +1,4 @@ -# coding=UTF-8 -from __future__ import print_function, absolute_import, division + import inspect diff --git a/firanka/series/bundle.py b/firanka/series/bundle.py index 3890987431691ae137763f38094b3a529fbf5190..ba6c4e4123005374bc6a808b39718cc649debcf2 100644 --- a/firanka/series/bundle.py +++ b/firanka/series/bundle.py @@ -1,5 +1,4 @@ -# coding=UTF-8 -from __future__ import print_function, absolute_import, division + import functools import logging diff --git a/firanka/series/function.py b/firanka/series/function.py index 7778afdb7779774b56af53a9da40970489ad3a78..c87cff4fbe5ff71d280a671394e2e660e07f0d95 100644 --- a/firanka/series/function.py +++ b/firanka/series/function.py @@ -1,5 +1,4 @@ -# coding=UTF-8 -from __future__ import print_function, absolute_import, division + from .base import Series diff --git a/firanka/series/interpolations.py b/firanka/series/interpolations.py index 178c0ff901855be5a9240244d8c71d5dbda3ff75..9e3a85b07c5c76d3a5d2ed495a920ec2260e8865 100644 --- a/firanka/series/interpolations.py +++ b/firanka/series/interpolations.py @@ -1,5 +1,4 @@ -# coding=UTF-8 -from __future__ import print_function, absolute_import, division + import six diff --git a/firanka/series/modulo.py b/firanka/series/modulo.py index ccd0b4e0bf3e21baee860b93ae633082c0d1ceb7..9fce0488a0ed53f13b973130df3509f81e463663 100644 --- a/firanka/series/modulo.py +++ b/firanka/series/modulo.py @@ -1,5 +1,4 @@ -# coding=UTF-8 -from __future__ import print_function, absolute_import, division + import math diff --git a/setup.cfg b/setup.cfg index 1a5c2652bbf2871b3c148b194e538be56a5d7603..657936d8660ad68b299f01108e7c59d5eac8614f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,10 +3,11 @@ description-file = README.md license = MIT License classifiers = Programming Language :: Python - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3.3 - Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Operating System :: OS Independent @@ -27,10 +28,3 @@ universal=1 verbosity=1 detailed-errors=1 with-coverage=1 - -[isort] -add_imports = - from __future__ import absolute_import - from __future__ import division - from __future__ import print_function - from __future__ import unicode_literals \ No newline at end of file diff --git a/setup.py b/setup.py index 8f1e34b4e9041e30d376c4137752ff4b94b6666f..4ad015c8ea43b5de970c0f587c042ab00ca62c49 100644 --- a/setup.py +++ b/setup.py @@ -7,10 +7,14 @@ setup( name='firanka', version=__version__, packages=find_packages(exclude=['tests.*', 'tests']), - tests_require=["nose", 'coverage>=4.0,<4.4'], install_requires=open('requirements.txt', 'r').readlines(), - test_suite='nose.collector', url='https://github.com/smok-serwis/firanka', author=u'Piotr MaĹlanka', - author_email=u'piotrm@dms-serwis.com.pl', + author_email=u'pmaslanka@smok.co', + tests_require=[ + "nose2", "mock", "coverage", "nose2[coverage_plugin]" + ], + test_suite='nose2.collector.collector', + python_requires='!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*', + )