-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
1,186 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[paths] | ||
source = src | ||
|
||
[run] | ||
branch = True | ||
source = src | ||
parallel = true | ||
|
||
[report] | ||
show_missing = true | ||
precision = 2 | ||
omit = *migrations* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
# Packages | ||
*.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 | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
.tox | ||
.coverage | ||
.coverage.* | ||
nosetests.xml | ||
coverage.xml | ||
htmlcov | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
.idea | ||
|
||
# Complexity | ||
output/*.html | ||
output/*/index.html | ||
|
||
# Sphinx | ||
docs/_build | ||
|
||
.DS_Store | ||
*~ | ||
.*.sw[po] | ||
.build | ||
.ve | ||
.bootstrap | ||
*.bak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
language: python | ||
python: 3.4 | ||
sudo: false | ||
env: | ||
global: | ||
LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so | ||
matrix: | ||
- TOXENV=check | ||
- TOXENV=3.3,coveralls | ||
- TOXENV=3.3-nocover | ||
- TOXENV=3.4,coveralls | ||
- TOXENV=3.4-nocover | ||
- TOXENV=pypy,coveralls | ||
- TOXENV=pypy-nocover | ||
before_install: | ||
- python --version | ||
- virtualenv --version | ||
- pip --version | ||
- uname -a | ||
- lsb_release -a | ||
install: | ||
- pip install tox | ||
script: | ||
- tox -v | ||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: always | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
Authors | ||
======= | ||
|
||
* Teppo Perä - https://github.com/Debith/py3traits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
Changelog | ||
========= | ||
|
||
0.10.0 (2014-01-01) | ||
----------------------------------------- | ||
- Splitting into two projects: py2traits and py3traits | ||
- Taking new project template to use from cookiecutter. | ||
|
||
0.9.0 Bringing back compatibility to Python 2.x | ||
----------------------------------------- | ||
- Some small clean up too | ||
|
||
0.8.0 Adding support to private class and instance attributes | ||
----------------------------------------- | ||
- Redone function binding to include recompilation of the function | ||
- Leaving Python 2.x into unsupported state temporarily. | ||
|
||
0.7.0 Improving usability of the library | ||
----------------------------------------- | ||
- Introduced new extendable decorator, which adds function to add traits to object | ||
- Introduced new function combine_class to create new classes out of traits | ||
- Fixed module imports through out the library | ||
- Improved documentation in examples | ||
|
||
0.6.0 Restructuring into library | ||
----------------------------------------- | ||
- Added support for py.test | ||
- Preparing to support tox | ||
- Improved multiple examples and renamed them to make more sense | ||
- Removed the need of having two separate code branches for different Python versions | ||
|
||
0.5.0 Instances can now be extended with traits in Python 3.x | ||
----------------------------------------- | ||
- Instance support now similar to classes | ||
- Added more examples | ||
|
||
0.4.0 Completed function binding with examples in Python 2.x | ||
----------------------------------------- | ||
- Separate functions can now be bound to classes | ||
- Functions with 'self' as a first parameter will be acting as a method | ||
- Functions with 'cls' as a first parameter will be acting as classmethod | ||
- Other functions will be static methods. | ||
- Fixed an issue with binding functions | ||
|
||
0.3.0 Trait extension support without conflicts for Python 2.x | ||
----------------------------------------- | ||
- Classes can be extended | ||
- Instances can be extended | ||
- Python 2.x supported | ||
|
||
0.2.0 Apache License Updated | ||
----------------------------------------- | ||
- Added apache 2.0 license to all files | ||
- Set the character set as utf-8 for all files | ||
|
||
0.1.0 Initial Version | ||
----------------------------------------- | ||
- prepared files for Python 2.x | ||
- prepared files for Python 3.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
============ | ||
Contributing | ||
============ | ||
|
||
Contributions are welcome, and they are greatly appreciated! Every | ||
little bit helps, and credit will always be given. | ||
|
||
Bug reports | ||
=========== | ||
|
||
When `reporting a bug <https://github.com/Debith/py3traits/issues>`_ please include: | ||
|
||
* Your operating system name, version and python version. | ||
* Failing test case created similar manner as in py3traits/examples. | ||
|
||
Documentation improvements | ||
========================== | ||
|
||
py3traits could always use more documentation, whether as part of the | ||
official py3traits docs, in docstrings, or even on the web in blog posts, | ||
articles, and such. | ||
|
||
Feature requests and feedback | ||
============================= | ||
|
||
The best way to send feedback is to file an issue at https://github.com/Debith/py3traits/issues. | ||
|
||
If you are proposing a feature: | ||
|
||
* Explain in detail how it would work or even better, create a failing test case similar manner as in py3traits/examples | ||
* Keep the scope as narrow as possible, to make it easier to implement. | ||
* Remember that this is a volunteer-driven project, and that contributions are welcome :) | ||
|
||
Development | ||
=========== | ||
|
||
To set up `py3traits` for local development: | ||
|
||
1. `Fork py3traits on GitHub <https://github.com/Debith/py3traits/fork>`_. | ||
2. Clone your fork locally:: | ||
|
||
git clone git@github.com:your_name_here/py3traits.git | ||
|
||
3. Create a branch for local development:: | ||
|
||
git checkout -b name-of-your-bugfix-or-feature | ||
|
||
Now you can make your changes locally. | ||
|
||
4. When you're done making changes, run all the checks, doc builder and spell checker with `tox <http://tox.readthedocs.org/en/latest/install.html>`_ one command:: | ||
|
||
tox | ||
|
||
5. Commit your changes and push your branch to GitHub:: | ||
|
||
git add . | ||
git commit -m "Your detailed description of your changes." | ||
git push origin name-of-your-bugfix-or-feature | ||
|
||
6. Submit a pull request through the GitHub website. | ||
|
||
Pull Request Guidelines | ||
----------------------- | ||
|
||
If you need some code review or feedback while you're developing the code just make the pull request. | ||
|
||
For merging, you should: | ||
|
||
1. Include passing tests (run ``tox``) [1]_. | ||
2. Update documentation when there's new API, functionality etc. | ||
3. Add a note to ``CHANGELOG.rst`` about the changes. | ||
4. Add yourself to ``AUTHORS.rst``. | ||
|
||
.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will | ||
`run the tests <https://travis-ci.org/Debith/py3traits/pull_requests>`_ for each change you add in the pull request. | ||
It will be slower though ... | ||
Tips | ||
---- | ||
|
||
To run a subset of tests:: | ||
|
||
tox -e envname -- py.test -k test_myfeature | ||
|
||
To run all the test environments in *parallel* (you need to ``pip install detox``):: | ||
|
||
detox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
graft docs | ||
graft examples | ||
graft src | ||
graft ci | ||
graft tests | ||
|
||
include *.komodoproject | ||
include .bumpversion.cfg | ||
include .coveragerc | ||
include .isort.cfg | ||
include .pylintrc | ||
|
||
include AUTHORS.rst | ||
include CHANGELOG.rst | ||
include CONTRIBUTING.rst | ||
include LICENSE | ||
include README.rst | ||
|
||
include tox.ini .travis.yml appveyor.yml | ||
|
||
global-exclude *.py[co] __pycache__ *.so *.pyd |
Oops, something went wrong.