Skip to content

Commit

Permalink
Add copyright notice and LICENSE references
Browse files Browse the repository at this point in the history
  • Loading branch information
moble committed Dec 11, 2014
1 parent f021f30 commit 6a6df16
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 103 deletions.
56 changes: 53 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
*.pyc
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so
build
.ipynb_checkpoints

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

# 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/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Michael Boyle

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<a href="https://travis-ci.org/moble/numpy_quaternion"><img align="right" hspace="3" alt="Status of automatic build and test suite" src="https://travis-ci.org/moble/numpy_quaternion.svg?branch=master"></a> <a href="https://github.com/moble/numpy_quaternion/blob/master/LICENSE"><img align="right" hspace="3" alt="Code distributed under the open-source MIT license" src="http://moble.github.io/spherical_functions/images/MITLicenseBadge.svg"></a>
<a href="https://travis-ci.org/moble/quaternion"><img align="right" hspace="3" alt="Status of automatic build and test suite" src="https://travis-ci.org/moble/quaternion.svg?branch=master"></a> <a href="https://github.com/moble/quaternion/blob/master/LICENSE"><img align="right" hspace="3" alt="Code distributed under the open-source MIT license" src="http://moble.github.io/spherical_functions/images/MITLicenseBadge.svg"></a>

# Quaternion modules

This Python module adds a quaternion dtype to NumPy.

The code was originally based on [code by Martin
Ling](https://github.com/martinling/numpy_quaternion) (with help from
Mark Weibe), but has been updated to work with python 3.x, and to
expand the applications of quaternions (as well as to fix a few bugs).
The code was originally based on
[code by Martin Ling](https://github.com/martinling/numpy_quaternion) (with
help from Mark Weibe), but has been essentially totally rewritten to work with
both python 2.x and 3.x, and to expand the applications of quaternions (and to
fix a few bugs).


## Dependencies

The basic requirements for this code are reasonably current versions
of `python` and `numpy`. In particular, `python` versions 2.6, 2.8,
3.2, 3.3, and 3.4 are
[routinely tested](https://travis-ci.org/moble/numpy_quaternion), and
[routinely tested](https://travis-ci.org/moble/quaternion), and
any `numpy` version greater than 1.7.0 should work.

However, certain advanced functions in this package (including
Expand Down Expand Up @@ -51,7 +52,7 @@ Installation is simple with `pip` (which should be present in any
reasonably new installation of `python`):

```sh
pip install git+git://github.com/moble/numpy_quaternion
pip install git+git://github.com/moble/quaternion
```

If you refuse to use anaconda, you might want to install inside your
Expand All @@ -60,7 +61,7 @@ default anyway.) This is done by adding `--user` to the above
command:

```sh
pip install --user git+git://github.com/moble/numpy_quaternion
pip install --user git+git://github.com/moble/quaternion
```


Expand Down Expand Up @@ -115,7 +116,7 @@ real or complex types.

Bug reports and feature requests are entirely welcome. The best way
to do this is to open an
[issue on this code's github page](https://github.com/moble/numpy_quaternion/issues).
[issue on this code's github page](https://github.com/moble/quaternion/issues).
For bug reports, please try to include a minimal working example
demonstrating the problem.

Expand All @@ -125,7 +126,7 @@ code is going wrong, or have an idea for a new feature that you know
how to implement.

This code is
[routinely tested](https://travis-ci.org/moble/numpy_quaternion) on
[routinely tested](https://travis-ci.org/moble/quaternion) on
recent versions of both python (2.x and 3.x) and numpy (>=1.7). But
the test coverage is not necessarily as complete as it should be, so
bugs may certainly be present, especially in the higher-level
Expand All @@ -140,7 +141,7 @@ features of github are available, including free wiki space and web
page hosting, pull requests, a nice interface to the git logs, etc.

Every change in this code is
[auomatically tested](https://travis-ci.org/moble/numpy_quaternion) on
[auomatically tested](https://travis-ci.org/moble/quaternion) on
[Travis-CI](https://travis-ci.org/). This is a free service (for
open-source projects like this one), which integrates beautifully with
github, detecting each commit and automatically re-running the tests.
Expand Down
3 changes: 3 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

from __future__ import division, print_function, absolute_import
import numpy as np

Expand Down
3 changes: 3 additions & 0 deletions calculus.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

from __future__ import division, print_function, absolute_import
import numpy as np
from quaternion.numba_wrapper import njit, jit, xrange
Expand Down
3 changes: 3 additions & 0 deletions means.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

from __future__ import division, print_function, absolute_import
import numpy as np
from .calculus import definite_integral
Expand Down
3 changes: 3 additions & 0 deletions numba_quaternion.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

from __future__ import print_function, division, absolute_import

import itertools
Expand Down
3 changes: 3 additions & 0 deletions numba_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

from __future__ import division, print_function, absolute_import

## Allow the code to function without numba, but discourage it
Expand Down
35 changes: 2 additions & 33 deletions numpy_quaternion.c
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
/*
* Quaternion type for NumPy
* Copyright (c) 2011 Martin Ling
*
* This code has been expanded (and a few bugs have been corrected) by
* Michael Boyle.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the NumPy Developers nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// Copyright (c) 2014, Michael Boyle
// See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

#define NPY_NO_DEPRECATED_API NPY_API_VERSION

Expand Down
30 changes: 2 additions & 28 deletions quaternion.c
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
/*
* Quaternion math implementation
* Copyright (c) 2011 Martin Ling
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the NumPy Developers nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTERS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// Copyright (c) 2014, Michael Boyle
// See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

#include "quaternion.h"
#include <math.h>
Expand Down
31 changes: 3 additions & 28 deletions quaternion.h
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
/*
* Quaternion math implementation
* Copyright (c) 2011 Martin Ling
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the NumPy Developers nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTERS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// Copyright (c) 2014, Michael Boyle
// See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

#ifndef __QUATERNION_H__
#define __QUATERNION_H__

Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env python

# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

def configuration(parent_package='',top_path=None):
import numpy
import os
Expand Down

0 comments on commit 6a6df16

Please sign in to comment.