Skip to content

Commit

Permalink
Merge 3dbd98c into e0c8454
Browse files Browse the repository at this point in the history
  • Loading branch information
ndem0 committed Jun 26, 2019
2 parents e0c8454 + 3dbd98c commit 9a31488
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 31 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -72,6 +72,7 @@ install:
- pip install enum34
- pip install coveralls
- pip install coverage
- pip install future
- python setup.py install

script:
Expand Down
7 changes: 4 additions & 3 deletions docs/source/conf.py
Expand Up @@ -23,6 +23,7 @@
# 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.
sys.path.insert(0, os.path.abspath('../..'))
import pydmd

# -- General configuration ------------------------------------------------

Expand Down Expand Up @@ -70,8 +71,8 @@

# General information about the project.
project = u'PyDMD'
copyright = u'2017-2018, PyDMD contributors'
author = u'PyDMD contributors'
copyright = pydmd.__copyright__
author = pydmd.__author__

# autoclass
autoclass_content = 'both'
Expand All @@ -81,7 +82,7 @@
# built documents.
#
# The short X.Y version.
version = '0.2'
version = pydmd.__version__
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
10 changes: 10 additions & 0 deletions pydmd/__init__.py
Expand Up @@ -3,6 +3,16 @@
"""
__all__ = ['dmdbase', 'dmd', 'fbdmd', 'mrdmd', 'cdmd', 'hodmd', 'dmdc', 'optdmd']

__title__ = "pydmd"
__author__ = "Nicola Demo, Marco Tezzele"
__copyright__ = "Copyright 2017-2019, PyDMD contributors"
__license__ = "MIT"
__version__ = "0.2.1"
__mail__ = 'demo.nicola@gmail.com, marcotez@gmail.com'
__maintainer__ = __author__
__status__ = "Stable"


from .dmdbase import DMDBase
from .dmd import DMD
from .fbdmd import FbDMD
Expand Down
113 changes: 85 additions & 28 deletions setup.py
@@ -1,6 +1,26 @@
from setuptools import setup
from setuptools import setup, Command
import os
import sys
import pydmd

description = (
# Package meta-data.
NAME = pydmd.__title__
DESCRIPTION = 'Python Dynamic Mode Decomposition.'
URL = 'https://github.com/mathLab/PyDMD'
MAIL = pydmd.__mail__
AUTHOR = pydmd.__author__
VERSION = pydmd.__version__
KEYWORDS='dynamic-mode-decomposition dmd mrdmd fbdmd cdmd'

REQUIRED = [
'future', 'numpy', 'scipy', 'matplotlib',
]

EXTRAS = {
'docs': ['Sphinx==1.4', 'sphinx_rtd_theme'],
}

LDESCRIPTION = (
"PyDMD is a Python package that uses Dynamic Mode Decomposition for "
"a data-driven model simplification based on spatiotemporal coherent "
"structures.\n"
Expand Down Expand Up @@ -32,33 +52,70 @@
"of the model.\n"
)

setup(name='pydmd',
version='0.2.0',
description='Python Dynamic Mode Decomposition.',
long_description=description,
classifiers=[
here = os.path.abspath(os.path.dirname(__file__))
class UploadCommand(Command):
"""Support setup.py upload."""

description = 'Build and publish the package.'
user_options = []

@staticmethod
def status(s):
"""Prints things in bold."""
print('\033[1m{0}\033[0m'.format(s))

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
try:
self.status('Removing previous builds...')
rmtree(os.path.join(here, 'dist'))
except OSError:
pass

self.status('Building Source and Wheel (universal) distribution...')
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))

self.status('Uploading the package to PyPI via Twine...')
os.system('twine upload dist/*')

self.status('Pushing git tags...')
os.system('git tag v{0}'.format(VERSION))
os.system('git push --tags')

sys.exit()

setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
long_description=LDESCRIPTION,
author=AUTHOR,
author_email=MAIL,
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Mathematics'
],
keywords='dynamic-mode-decomposition dmd mrdmd fbdmd cdmd',
url='https://github.com/mathLab/PyDMD',
author='Nicola Demo, Marco Tezzele',
author_email='demo.nicola@gmail.com, marcotez@gmail.com',
license='MIT',
packages=['pydmd'],
install_requires=[
'future',
'numpy',
'scipy',
'matplotlib',
'Sphinx==1.4',
'sphinx_rtd_theme'
],
test_suite='nose.collector',
tests_require=['nose'],
include_package_data=True,
zip_safe=False)
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Mathematics'
],
keywords=KEYWORDS,
url=URL,
license='MIT',
packages=[NAME],
install_requires=REQUIRED,
extras_require=EXTRAS,
test_suite='nose.collector',
tests_require=['nose'],
include_package_data=True,
zip_safe=False,

# $ setup.py publish support.
cmdclass={
'upload': UploadCommand,
},)

0 comments on commit 9a31488

Please sign in to comment.