Skip to content

Commit

Permalink
initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mtezzele committed Jun 12, 2017
1 parent 5b343e1 commit d597d19
Show file tree
Hide file tree
Showing 7 changed files with 205 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .checkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore folder content
tests/*
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# mac file systems
.DS_Store

# compiled python codes
*.pyc
70 changes: 70 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
sudo: true
dist: trusty

language: python

service: docker

matrix:
include:
- os: linux
python: 2.7
env: TOXENV=py27
- os: osx
language: generic
env: TOXENV=py27

before_script:
- "export DISPLAY=:99.0"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sh -e /etc/init.d/xvfb start;
sleep 3;
fi

before_install:
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
brew update;
brew install python;
python --version;
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
- chmod +x miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$HOME/miniconda/lib:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda config --add channels conda-forge

install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
conda create --yes -n test python=$TRAVIS_PYTHON_VERSION;
else
conda create --yes -n test python="2.7";
fi
- source activate test
- conda install --yes numpy scipy matplotlib vtk pip nose sip=4.18
- pip install setuptools
- pip install enum34
- pip install coveralls
- pip install coverage
- python setup.py install

script:
- coverage run test.py
# Docker in travis works only with linux.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker run -u root docker.io/pygemdocker/pygem:latest /bin/sh -c "cd /home/PyGeM/build/PyGeM; coverage run test.py";
fi
after_success:
- coveralls

branches:
only:
- master
84 changes: 83 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,84 @@
# DMD
# DMD [![Build Status](https://travis-ci.org/mathLab/DMD.svg?branch=master)](https://travis-ci.org/mathLab/DMD) [![Coverage Status](https://coveralls.io/repos/github/mathLab/DMD/badge.svg)](https://coveralls.io/github/mathLab/DMD) [![Code Issues](https://www.quantifiedcode.com/api/v1/project/b5605d26e9e84ed0a6c8740caa66728a/badge.svg)](https://www.quantifiedcode.com/app/project/b5605d26e9e84ed0a6c8740caa66728a)

Dynamic Mode Decomposition

## Description

## Dependencies and installation

The official distribution is on GitHub, and you can clone the repository using

```bash
> git clone https://github.com/mathLab/DMD
```

To install the package just type:

```bash
> python setup.py install
```

To uninstall the package you have to rerun the installation and record the installed files in order to remove them:

```bash
> python setup.py install --record installed_files.txt
> cat installed_files.txt | xargs rm -rf
```


## Authors and contributors
**PyGeM** is currently developed and mantained at [SISSA mathLab](http://mathlab.sissa.it/) by
* [Marco Tezzele](mailto:marcotez@gmail.com)
* [Nicola Demo](mailto:demo.nicola@gmail.com)

under the supervision of [Prof. Gianluigi Rozza](mailto:gianluigi.rozza@sissa.it).

Contact us by email for further information or questions about **DMD**, or suggest pull requests. Contributions improving either the code or the documentation are welcome!


## How to contribute
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.

### Submitting a patch

1. It's generally best to start by opening a new issue describing the bug or
feature you're intending to fix. Even if you think it's relatively minor,
it's helpful to know what people are working on. Mention in the initial
issue that you are planning to work on that bug or feature so that it can
be assigned to you.

2. Follow the normal process of [forking][] the project, and setup a new
branch to work in. It's important that each group of changes be done in
separate branches in order to ensure that a pull request only includes the
commits related to that bug or feature.

3. To ensure properly formatted code, please make sure to use a tab of 4
spaces to indent the code. The easy way is to run on your bash the provided
script: ./code_formatter.sh. You should also run [pylint][] over your code.
It's not strictly necessary that your code be completely "lint-free",
but this will help you find common style issues.

4. Any significant changes should almost always be accompanied by tests. The
project already has good test coverage, so look at some of the existing
tests if you're unsure how to go about it. We're using [coveralls][] that
is an invaluable tools for seeing which parts of your code aren't being
exercised by your tests.

5. Do your best to have [well-formed commit messages][] for each change.
This provides consistency throughout the project, and ensures that commit
messages are able to be formatted properly by various git tools.

6. Finally, push the commits to your fork and submit a [pull request][]. Please,
remember to rebase properly in order to maintain a clean, linear git history.

[forking]: https://help.github.com/articles/fork-a-repo
[pylint]: https://www.pylint.org/
[coveralls]: https://coveralls.io
[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[pull request]: https://help.github.com/articles/creating-a-pull-request


## License

See the [LICENSE](LICENSE) file for license rights and limitations (MIT).
Empty file added dmd/__init__.py
Empty file.
38 changes: 38 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from setuptools import setup

def readme():
"""
This function just return the content of README.md
"""
with open('README.md') as f:
return f.read()

setup(name='dmd',
version='0.0.1',
description='Dynamic Mode Decomposition.',
long_description=readme(),
classifiers=[
'Development Status :: 1 - Planning',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Mathematics'
],
keywords='dynamic_mode_decomposition ',
url='https://github.com/mathLab/DMD',
author='Marco Tezzele, Nicola Demo',
author_email='marcotez@gmail.com, demo.nicola@gmail.com',
license='MIT',
packages=['dmd'],
install_requires=[
'numpy',
'scipy',
'matplotlib',
'enum34',
'Sphinx>=1.4',
'sphinx_rtd_theme'
],
test_suite='nose.collector',
tests_require=['nose'],
include_package_data=True,
zip_safe=False)
7 changes: 7 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

import matplotlib
import nose

matplotlib.use('agg')

nose.main()

0 comments on commit d597d19

Please sign in to comment.