Browse Source

working on documentation

master
Holger Frey 7 years ago
parent
commit
03470644dd
  1. 17
      CONTRIBUTING.rst
  2. 33
      HISTORY.rst
  3. 50
      README.rst
  4. 46
      docs/installation.rst
  5. 4
      tests/resources/__init__.py

17
CONTRIBUTING.rst

@ -9,13 +9,14 @@ little bit helps, and credit will always be given. @@ -9,13 +9,14 @@ little bit helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions
----------------------
Report Bugs
~~~~~~~~~~~
Report bugs at https://github.com/holgi/ordr2/issues.
Report bugs at https://git.cpi.imtek.uni-freiburg.de/holgi/ordr2/issues.
If you are reporting a bug, please include:
@ -23,18 +24,21 @@ If you are reporting a bug, please include: @@ -23,18 +24,21 @@ If you are reporting a bug, please include:
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.
Fix Bugs
~~~~~~~~
Look through the GitHub issues for bugs. Anything tagged with "bug"
and "help wanted" is open to whoever wants to implement it.
Implement Features
~~~~~~~~~~~~~~~~~~
Look through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~
@ -42,10 +46,11 @@ Ordr2 could always use more documentation, whether as part of the @@ -42,10 +46,11 @@ Ordr2 could always use more documentation, whether as part of the
official Ordr2 docs, in docstrings, or even on the web in blog posts,
articles, and such.
Submit Feedback
~~~~~~~~~~~~~~~
The best way to send feedback is to file an issue at https://github.com/holgi/ordr2/issues.
The best way to send feedback is to file an issue at https://git.cpi.imtek.uni-freiburg.de/holgi/ordr2/issues.
If you are proposing a feature:
@ -54,6 +59,7 @@ If you are proposing a feature: @@ -54,6 +59,7 @@ If you are proposing a feature:
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)
Get Started!
------------
@ -62,7 +68,7 @@ Ready to contribute? Here's how to set up `ordr2` for local development. @@ -62,7 +68,7 @@ Ready to contribute? Here's how to set up `ordr2` for local development.
1. Fork the `ordr2` repo on GitHub.
2. Clone your fork locally::
$ git clone git@github.com:your_name_here/ordr2.git
$ git clone https://git.cpi.imtek.uni-freiburg.de/your_name_here/ordr2/
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
@ -92,6 +98,7 @@ Ready to contribute? Here's how to set up `ordr2` for local development. @@ -92,6 +98,7 @@ Ready to contribute? Here's how to set up `ordr2` for local development.
7. Submit a pull request through the GitHub website.
Pull Request Guidelines
-----------------------
@ -101,9 +108,7 @@ Before you submit a pull request, check that it meets these guidelines: @@ -101,9 +108,7 @@ Before you submit a pull request, check that it meets these guidelines:
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 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/holgi/ordr2/pull_requests
and make sure that the tests pass for all supported Python versions.
Tips
----

33
HISTORY.rst

@ -2,7 +2,34 @@ @@ -2,7 +2,34 @@
History
=======
0.0.1 (2017-09-26)
------------------
* First release on PyPI.
0.1.4 (2017-10-10, php2python branch)
-------------------------------------
* date of order status change have a nicer format
* fixed a bug in recording a status change
* owner of order only notified for status change if (s)he didn't issue the change
0.1.3 (2017-10-10, php2python branch)
-------------------------------------
* custom error page for exception handling
* uncaught exceptions mailed to administrator
* fixed type ahead function for selecting consumables when creating a new order
* loading of google fonts now via https
* multiple selections of order not available for normal users since these
have not edit or delete rights for all orders
0.1.1 (2017-10-05, php2python branch)
-------------------------------------
* First production release
0.0.1 (2017-09-26, php2python branch)
-------------------------------------
* Start of the project

50
README.rst

@ -2,9 +2,53 @@ @@ -2,9 +2,53 @@
Ordr2 - CPI Ordering System
===========================
This is a complete rewrite of our current `ordering system`_.
Features
--------
Goals
-----
* more information on orders:
* record the status change in order in a log
* add a new status "hold" if there are questions
* simpler reordering of already placed orders
* better tools for consumables (templates for new orders):
* propose consumables on placed orders
* check unused or outdated consumables
* make categories editable
* revamped user management:
* validate email address on registration
* forgot password system
* make password hashing future proof
* move away from PHP as a programming language (done, branch php2pyhton)
* update the front end tools to current versions
* TODO
Notes on technologies used
---------------------------
The project uses `Pyramid`_ as a web framework, especially the `traversal`_
style routing instead of the more widely spread url dispatch method. This
decision was made because:
* the starter of this project likes this kind of routing
* it eliminates the need of defining routes
* `row level security`_ is easy to implement since traversal works with
resources from the start.
The new system should have automated unit- and integration tests for all
self written code, aming at 100% coverage although this might never be
reached.
To run a test use the ``make coverage`` command or if you'd like to test
without a coverage report use ``make test``
Also the code should be documented well enough to support the current and
new developers. Good Documentation is hard, so please be forgiving in this
regard. A set of documents can be compiled and viewed with the ``make docs``
command.
.. _ordering system: https://ordr.cpi.imtek.uni-freiburg.de
.. _Pyramid: https://trypyramid.com
.. _traversal: https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/muchadoabouttraversal.html
.. _row level security: https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/security.html

46
docs/installation.rst

@ -5,47 +5,49 @@ Installation @@ -5,47 +5,49 @@ Installation
============
Stable release
--------------
From sources
------------
To install Ordr2, run this command in your terminal:
The sources for Ordr2 can be downloaded from the `Github repo`_.
You can clone the public repository:
.. code-block:: console
$ pip install ordr2
$ git clone https://git.cpi.imtek.uni-freiburg.de/holgi/ordr2
This is the preferred method to install Ordr2, as it will always install the most recent stable release.
You should create a new virtual environment prior to installing and activate it
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
.. code-block:: console
.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
$ python3 -m venv venv-ordr2
$ source venv-ordr2/bin/activate
Once you have a copy of the source, you can install it with:
From sources
------------
.. code-block:: console
The sources for Ordr2 can be downloaded from the `Github repo`_.
$ pip install .
You can either clone the public repository:
.. _Github repo: https://git.cpi.imtek.uni-freiburg.de/holgi/ordr2
.. code-block:: console
$ git clone git://github.com/holgi/ordr2
Stable release (CURRENTLY NOT AVAILABLE)
----------------------------------------
Or download the `tarball`_:
To install Ordr2, run this command in your terminal:
.. code-block:: console
$ curl -OL https://github.com/holgi/ordr2/tarball/master
$ pip install ordr2
Once you have a copy of the source, you can install it with:
This is the preferred method to install Ordr2, as it will always install the
most recent stable release.
.. code-block:: console
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
$ python setup.py install
.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
.. _Github repo: https://github.com/holgi/ordr2
.. _tarball: https://github.com/holgi/ordr2/tarball/master

4
tests/resources/__init__.py

@ -40,6 +40,6 @@ def test_root_resource_init(): @@ -40,6 +40,6 @@ def test_root_resource_init():
resource = RootResource('request object')
assert resource.__name__ == None
assert resource.__parent__ == None
assert resource.__name__ is None
assert resource.__parent__ is None
assert resource.request == 'request object'