Skip to content

Commit

Permalink
Misc docs fixes/improvements
Browse files Browse the repository at this point in the history
- Add features list.
- Use proper package name - tg-utils - in more places.
- Fix docs generation.
  • Loading branch information
rivol committed Jan 11, 2016
1 parent c1bcd47 commit 1e33df0
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 48 deletions.
16 changes: 8 additions & 8 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/thorgate/tg_utils/issues.
Report bugs at https://github.com/thorgate/tg-utils/issues.

If you are reporting a bug, please include:

Expand Down Expand Up @@ -45,7 +45,7 @@ articles, and such.
Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/thorgate/tg_utils/issues.
The best way to send feedback is to file an issue at https://github.com/thorgate/tg-utils/issues.

If you are proposing a feature:

Expand All @@ -57,17 +57,17 @@ If you are proposing a feature:
Get Started!
------------

Ready to contribute? Here's how to set up `tg_utils` for local development.
Ready to contribute? Here's how to set up `tg-utils` for local development.

1. Fork the `tg_utils` repo on GitHub.
1. Fork the `tg-utils` repo on GitHub.
2. Clone your fork locally::

$ git clone git@github.com:your_name_here/tg_utils.git
$ git clone git@github.com:your_name_here/tg-utils.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::

$ mkvirtualenv tg_utils
$ cd tg_utils/
$ mkvirtualenv tg-utils
$ cd tg-utils/
$ python setup.py develop

4. Create a branch for local development::
Expand Down Expand Up @@ -102,7 +102,7 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
https://travis-ci.org/thorgate/tg_utils/pull_requests
https://travis-ci.org/thorgate/tg-utils/pull_requests
and make sure that the tests pass for all supported Python versions.

Tips
Expand Down
24 changes: 16 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
tg-utils
===============================

.. image:: https://img.shields.io/pypi/v/tg_utils.svg
:target: https://pypi.python.org/pypi/tg_utils
.. image:: https://img.shields.io/pypi/v/tg-utils.svg
:target: https://pypi.python.org/pypi/tg-utils

.. image:: https://img.shields.io/travis/thorgate/tg_utils.svg
:target: https://travis-ci.org/thorgate/tg_utils
.. image:: https://img.shields.io/travis/thorgate/tg-utils.svg
:target: https://travis-ci.org/thorgate/tg-utils

.. image:: https://readthedocs.org/projects/tg_utils/badge/?version=latest
:target: https://readthedocs.org/projects/tg_utils/?badge=latest
.. image:: https://readthedocs.org/projects/tg-utils/badge/?version=latest
:target: https://readthedocs.org/projects/tg-utils/?badge=latest
:alt: Documentation Status


Expand All @@ -18,12 +18,20 @@ Collection of various utils for Django-based projects.
This is code that we're using in our projects at Thorgate and we're hoping you'll find some of it useful as well.

* Free software: ISC license
* Documentation: https://tg_utils.readthedocs.org.
* Documentation: https://tg-utils.readthedocs.org.


Features
--------

* TODO
* Model utils, e.g. timestamped and closable models, QuerySets that send out a signal when objects are modified.
* Templated email sending.
* Profiling utilities.
* Unique filename generation for uploads.
* Using hashids for models (instead of exposing primary keys).
* System checks for email and Sentry configuration.
* yuglify compressors for django-compressor.


Credits
---------
Expand Down
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
# version is used.
sys.path.insert(0, project_root)

# Make Django happier
os.environ["DJANGO_SETTINGS_MODULE"] = "tests.django_settings"


import tg_utils

# -- General configuration ---------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Installation

At the command line::

$ easy_install tg_utils
$ easy_install tg-utils

Or, if you have virtualenvwrapper installed::

$ mkvirtualenv tg_utils
$ pip install tg_utils
$ mkvirtualenv tg-utils
$ pip install tg-utils
7 changes: 0 additions & 7 deletions docs/modules.rst

This file was deleted.

22 changes: 0 additions & 22 deletions docs/tg_utils.rst

This file was deleted.

1 change: 1 addition & 0 deletions tg_utils/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class ProfiledViewMixin:
To use it, make your view inherit from ProfiledViewMixin, then set profiling_mode attribute of your class to desired
value. The choices are:
- PROFILING_LOGGING - Simply logs elapsed time with standard logging lib.
- PROFILING_YAPPI - Uses yappi (https://code.google.com/p/yappi/) to dump detailed profiling data into file. The
file can be read with KCachegrind. yappi must be installed separately - `pip install yappi`. KCachegrind or
Expand Down

0 comments on commit 1e33df0

Please # to comment.