-
Notifications
You must be signed in to change notification settings - Fork 6
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
21 changed files
with
302 additions
and
349 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 |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
# Packages | ||
*.egg | ||
*.egg-info | ||
.cache | ||
dist | ||
build | ||
eggs | ||
|
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,12 +1,22 @@ | ||
# Config file for automatic testing at travis-ci.org | ||
sudo: false | ||
|
||
language: python | ||
|
||
python: | ||
- "2.7" | ||
- "3.4" | ||
- "3.5" | ||
|
||
# command to install dependencies | ||
install: | ||
- make travisci-install | ||
|
||
# command to run tests | ||
script: | ||
- make travisci-test | ||
|
||
# tasks to execute after successful test | ||
after_success: | ||
- pip install python-coveralls | ||
- coveralls |
File renamed without changes.
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,157 +1,97 @@ | ||
How to Contribute | ||
***************** | ||
Contributing | ||
============ | ||
|
||
- Overview_ | ||
- Guidelines_ | ||
- Branching_ | ||
- `Continuous Integration`_ | ||
- `Project CLI`_ | ||
- `Areas of Needed Improvement`_ | ||
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. | ||
|
||
You can contribute in many ways: | ||
|
||
Overview | ||
======== | ||
|
||
1. Fork the repo. | ||
2. Build development environment run tests to ensure a clean, working slate. | ||
3. Improve/fix the code. | ||
4. Add test cases if new functionality introduced or bug fixed (100% test coverage). | ||
5. Ensure tests pass. | ||
6. Add yourself to ``AUTHORS.rst``. | ||
7. Push to your fork and submit a pull request to the ``develop`` branch. | ||
Types of Contributions | ||
---------------------- | ||
|
||
Report Bugs | ||
+++++++++++ | ||
|
||
Guidelines | ||
========== | ||
Report bugs at https://github.com/dgilland/alchy. | ||
|
||
Some simple guidelines to follow when contributing code: | ||
If you are reporting a bug, please include: | ||
|
||
- Adhere to `PEP8`_. | ||
- Clean, well documented code. | ||
- All tests must pass. | ||
- 100% test coverage. | ||
- Your operating system name and version. | ||
- Any details about your local setup that might be helpful in troubleshooting. | ||
- Detailed steps to reproduce the bug. | ||
|
||
|
||
Branching | ||
========= | ||
Fix Bugs | ||
++++++++ | ||
|
||
There are two main development branches: ``master`` and ``develop``. ``master`` represents the currently released version while ``develop`` is the latest development work. When submitting a pull request, be sure to submit to ``develop``. The originating branch you submit from can be any name though. | ||
Look through the GitHub issues for bugs. Anything tagged with "bug" is open to whoever wants to implement it. | ||
|
||
|
||
Continuous Integration | ||
====================== | ||
Implement Features | ||
++++++++++++++++++ | ||
|
||
Integration testing is provided by `Travis-CI`_ at https://travis-ci.org/dgilland/alchy. | ||
Look through the GitHub issues for features. Anything tagged with "enhancement" or "help wanted" is open to whoever wants to implement it. | ||
|
||
Test coverage reporting is provided by `Coveralls`_ at https://coveralls.io/r/dgilland/alchy. | ||
|
||
Write Documentation | ||
+++++++++++++++++++ | ||
|
||
Project CLI | ||
=========== | ||
Pydash could always use more documentation, whether as part of the official alchy docs, in docstrings, or even on the web in blog posts, articles, and such. | ||
|
||
Some useful CLI commands when working on the project are below. **NOTE:** All commands are run from the root of the project and require ``make``. | ||
|
||
make build | ||
---------- | ||
Submit Feedback | ||
+++++++++++++++ | ||
|
||
Run the ``clean`` and ``install`` commands. | ||
The best way to send feedback is to file an issue at https://github.com/dgilland/alchy. | ||
|
||
:: | ||
If you are proposing a feature: | ||
|
||
make build | ||
- Explain in detail how it would work. | ||
- 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 :) | ||
|
||
|
||
make install | ||
Get Started! | ||
------------ | ||
|
||
Install Python dependencies into virtualenv located at ``env/``. | ||
|
||
:: | ||
|
||
make install | ||
|
||
|
||
make clean | ||
---------- | ||
|
||
Remove build/test related temporary files like ``env/``, ``.tox``, ``.coverage``, and ``__pycache__``. | ||
|
||
:: | ||
|
||
make clean | ||
|
||
|
||
make test | ||
--------- | ||
|
||
Run unittests under the virtualenv's default Python version. Does not test all support Python versions. To test all supported versions, see `make test-full`_. | ||
|
||
:: | ||
|
||
make test | ||
|
||
Ready to contribute? Here's how to set up ``alchy`` for local development. | ||
|
||
make test-full | ||
-------------- | ||
1. Fork the ``alchy`` repo on GitHub. | ||
2. Clone your fork locally:: | ||
|
||
Run unittest and linting for all supported Python versions. **NOTE:** This will fail if you do not have all Python versions installed on your system. If you are on an Ubuntu based system, the `Dead Snakes PPA`_ is a good resource for easily installing multiple Python versions. If for whatever reason you're unable to have all Python versions on your development machine, note that Travis-CI will run full integration tests on all pull requests. | ||
$ git clone git@github.com:your_name_here/alchy.git | ||
|
||
:: | ||
3. Install your local copy into a virtualenv. Assuming you have virtualenv installed, this is how you set up your fork for local development:: | ||
|
||
make test-full | ||
$ cd alchy | ||
$ pip install -r requirements-dev.txt | ||
|
||
4. Create a branch for local development:: | ||
|
||
make lint | ||
--------- | ||
$ git checkout -b name-of-your-bugfix-or-feature | ||
|
||
Run ``make pylint`` and ``make pep8`` commands. | ||
Now you can make your changes locally. | ||
|
||
:: | ||
5. When you're done making changes, check that your changes pass linting and all unit tests by testing with tox across all supported Python versions:: | ||
|
||
make lint | ||
$ invoke tox | ||
|
||
6. Add yourself to ``AUTHORS.rst``. | ||
|
||
make pylint | ||
----------- | ||
|
||
Run ``pylint`` compliance check on code base. | ||
|
||
:: | ||
|
||
make pylint | ||
|
||
|
||
make pep8 | ||
--------- | ||
|
||
Run `PEP8`_ compliance check on code base. | ||
|
||
:: | ||
|
||
make pep8 | ||
|
||
|
||
make docs | ||
--------- | ||
|
||
Build documentation to ``docs/_build/``. | ||
|
||
:: | ||
7. Commit your changes and push your branch to GitHub:: | ||
|
||
make docs | ||
$ git add . | ||
$ git commit -m "Detailed description of your changes." | ||
$ git push origin name-of-your-bugfix-or-feature | ||
|
||
8. Submit a pull request through the GitHub website. | ||
|
||
Areas of Needed Improvement | ||
=========================== | ||
|
||
- Better documentation of functions/modules. Many are missing docstrings. Existing docstrings could be improved. Additional code comments may be needed as well. | ||
- Improve code quality for readability (e.g. eliminate dense code statements like one-liners which do too much). | ||
- Improve testing infrastructure. | ||
- More battle testing. Tests currently cover basic usage, but there may be more complex uses-cases that could draw out some edge-case bugs. | ||
- Potentially improve ``Query`` loading methods. The current implementation doesn't handle nested loading options which differ than the base loading method used. For example, emulating this ``query.options(joinedload(Foo).lazyload(Bar))`` is not supported while this ``query.options(joinedload(Foo).joinedload(Bar))`` is via ``query.joinedload(Foo, Bar)``. Would be nice to have a way to drill down into the nested loading strategies without having to use ``query.options``. However, if the solution introduces too much complexity for a feature that isn't used/needed often, then it may be best to not attempt to support it. | ||
Pull Request Guidelines | ||
----------------------- | ||
|
||
Before you submit a pull request, check that it meets these guidelines: | ||
|
||
.. _Travis-CI: https://travis-ci.org/ | ||
.. _Coveralls: https://coveralls.io/ | ||
.. _Dead Snakes PPA: https://launchpad.net/~fkrull/+archive/deadsnakes | ||
.. _PEP8: http://legacy.python.org/dev/peps/pep-0008/ | ||
1. The pull request should include tests. | ||
2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the README.rst. | ||
3. The pull request should work for Python 2.7, 3.4, and 3.5. Check https://travis-ci.org/dgilland/alchy/pull_requests and make sure that the tests pass for all supported Python versions. |
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 +1,13 @@ | ||
include LICENSE.rst README.rst | ||
include AUTHORS.rst | ||
include CONTRIBUTING.rst | ||
include CHANGELOG.rst | ||
include LICENSE.rst | ||
include README.rst | ||
include requirements.txt | ||
include requirements-dev.txt | ||
|
||
recursive-include tests * | ||
recursive-include docs *.rst conf.py Makefile make.bat | ||
|
||
recursive-exclude * __pycache__ | ||
recursive-exclude * *.py[cod] |
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 @@ | ||
|
||
## | ||
# TravisCI | ||
## | ||
|
||
.PHONY: travisci-install | ||
travisci-install: | ||
pip install -r requirements-dev.txt | ||
|
||
.PHONY: travisci-test | ||
travisci-test: | ||
invoke test |
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
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Define project metadata | ||
""" | ||
|
||
__package_name__ = 'alchy' | ||
__description__ = ('A SQLAlchemy extension for its declarative ORM that ' | ||
'provides enhancements for model classes, queries, and ' | ||
'sessions.') | ||
__url__ = 'https://github.com/dgilland/alchy' | ||
__version__ = '2.2.1' | ||
__author__ = 'Derrick Gilland' | ||
__email__ = 'dgilland@gmail.com' | ||
__license__ = 'MIT License' |
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,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# flake8: noqa | ||
# pylint: skip-file | ||
"""Python 2/3 compatibility | ||
|
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,6 @@ | ||
|
||
.wy-table-responsive table td, | ||
.wy-table-responsive table th { | ||
/* Get ride of nowrap for table cells. */ | ||
white-space: normal; | ||
} |
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,3 +1,3 @@ | ||
.. _changelog: | ||
|
||
.. include:: ../CHANGES.rst | ||
.. include:: ../CHANGELOG.rst |
Oops, something went wrong.