Skip to content

Commit

Permalink
Made spelling corrections and changed some of the instructions to be …
Browse files Browse the repository at this point in the history
…more concise and focused.
  • Loading branch information
Gio Gottardi authored and Gio Gottardi committed Jul 2, 2015
1 parent 5949671 commit 1e55853
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 134 deletions.
65 changes: 21 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Installation

1. Install with the following command (in the root of the app directory)

$ [sudo] pip install major-event-log
$ pip install major-event-log

2. Add `major_event_log` to your `INSTALLED_APPS`. Be sure to add `django.contrib.admin` (and its dependencies) and `django.contrib.humanize` if they are not already present. Your `INSTALLED_APPS` should look like the following (at the minimum):

Expand All @@ -54,7 +54,7 @@ Installation

4. Migrate/sync the database

$ python manage.py migrate majore-event-log
$ python manage.py migrate major-event-log

5. Configure static files

Expand All @@ -70,49 +70,25 @@ See LICENSE
Contributors
-------------------------

Django-major-event-log was developed at the UNT Libraries.
django-major-event-log was developed at the UNT Libraries.

Contributors:

* [Gio Gottardi](https://github.com/somexpert)
* [Damon Kelley](https://github.com/damonkelley)


Developing/Testing
Developing
-------------------------

#### Requirements ####

- Django == 1.8
- Python >= 2.7

I suggest doing the following within a virtual environment. To do so, you will
first need to install virtualenv with the following command:
#### Setting up the development environment ####

$ [sudo] pip install virtualenv

Then, you will need to set up a virtual environment by navigating to the
location you want your environment created and running:

$ virtualenv --python=python2.7 new_virtualenv_name

This will create a directory called new_virtualenv_name that is the virtual
environment. Next, you'll need to get inside the new directory with:

$ cd new_virtualenv_name

and then activate the new virtual environment:

$ source ./bin/activate

(after testing, exit the virtual environment with `$ deactivate`)

You will need to install Django into the virtual env to be able to test out the
app with Django's development server:

$ pip install django==1.8

Now you need to get the source files for the app by cloning the git repository:
First, get the source files for the app by cloning the git repository:

$ git clone https://github.com/unt-libraries/django-major-event-log

Expand All @@ -131,7 +107,7 @@ database:

$ python manage.py createsuperuser

which will guide you through creating a super-user with login credentials that
which will guide you through creating a superuser with login credentials that
you can use on the admin portion of the app. Now you should have a development
environment where you can see all the source code and check out the app using
Django's development server. To do so, simply execute the following from the
Expand All @@ -145,29 +121,30 @@ You should now be able to access both the admin portion of the app at
127.0.0.1:8000/admin/, or the public-facing side of the app at
127.0.0.1:8000/major-event-log/.

#### Running the tests ####

##### Requirements #####
Testing
-------

#### Requirements ####

- Django == 1.8
- tox == 2.0
- lxml == 3.4
- Python == 2.7
- Python == 3.4

Simply invoke the tox test runner by running
#### **System** Requirements ####

$ tox
- libxml2 >= 2.7.0
- libxslt >= 1.1.23

anywhere within the app (if you are running in a virtual environment, you will
first need to install tox with `$ pip install tox`). If you don't wish to test
using tox, you can also simply use Django's test runner by navigating to the
root of the git repository and running:
#### Running the tests ####

To run the tests in the development environment:

$ python manage.py test ./tests

Note that the python test runner will only run the tests against the current
version of Python, and will also not run a flake8 test. Conversely, tox will
run the test suite against multiple versions of Python (2.7 and 3.4) as well as multiple
versions of Django (1.8 and the master branch of Django), and will also run a
flake8 check on the source code.
You can also run the tests with Tox:

$ [sudo] pip install tox
$ tox
96 changes: 11 additions & 85 deletions docs/development.rst
Original file line number Diff line number Diff line change
@@ -1,63 +1,17 @@
Developing/Testing
==================
Developing
==========

Requirements
------------

Developing
^^^^^^^^^^

- Django == 1.8
- Python >= 2.7

Testing
^^^^^^^

- Django == 1.8
- tox == 2.0
- lxml == 3.4
- Python == 2.7
- Python == 3.4

I suggest doing the following within a virtual environment. To do so,
you will first need to install virtualenv with the following command:

::

$ [sudo] pip install virtualenv

Then, you will need to set up a virtual environment by navigating to the
location you want your environment created and running:

::

$ virtualenv --python=python2.7 new_virtualenv_name

This will create a directory called new\_virtualenv\_name that is the
virtual environment. Next, you'll need to get inside the new directory
with:

::

$ cd new_virtualenv_name

and then activate the new virtual environment:

::

$ source ./bin/activate

(after testing, exit the virtual environment with ``$ deactivate``)
Setting up the development environment
--------------------------------------

You will need to install Django into the virtual env to be able to test
out the app with Django's development server:

::

$ pip install django==1.8

Now you need to get the source files for the app by cloning the git
repository:
First, get the source files for the app by cloning the git repository:

::

Expand All @@ -84,12 +38,12 @@ with a populated database:

$ python manage.py createsuperuser

which will guide you through creating a super-user with login
credentials that you can use on the admin portion of the app. Now you
should have a development environment where you can see all the source
code and check out the app using Django's development server. To do so,
simply execute the following from the current location (the root of the
git repository):
which will guide you through creating a superuser with login credentials
that you can use on the admin portion of the app. Now you should have a
development environment where you can see all the source code and check
out the app using Django's development server. To do so, simply execute
the following from the current location (the root of the git
repository):

::

Expand All @@ -100,31 +54,3 @@ git repository):
You should now be able to access both the admin portion of the app at
127.0.0.1:8000/admin/, or the public-facing side of the app at
127.0.0.1:8000/major-event-log/.

Running the tests
-----------------

Simply invoke the tox test runner by running

::

$ tox

anywhere within the app (if you are running in a virtual environment,
you will first need to install tox with ``$ pip install tox``). If you
don't wish to test using tox, you can also simply use Django's test
runner by navigating to the root of the git repository and running:

::

$ python manage.py test ./tests

Note that the python test runner will only run the tests against the
current version of Python, and will also not run a flake8 test.
Conversely, tox will run the test suite against multiple versions of
Python (2.7 and 3.4) as well as multiple versions of Django (1.8 and the
master branch of Django), and will also run a flake8 check on the source
code.

.. |Build Status| image:: https://travis-ci.org/unt-libraries/django-major-event-log.svg?branch=master
:target: https://travis-ci.org/unt-libraries/django-major-event-log
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ Table of Contents
=================

.. toctree::
:maxdepth: 2
:maxdepth: 1

installation
model
development
testing


Contributors
Expand Down
14 changes: 12 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
Installation
============

Requirements
------------

- Django == 1.8
- Python >= 2.7


Installing
----------

1. Install with the following command (in the root of the app directory)

::

$ [sudo] pip install major-event-log
$ pip install major-event-log

2. Add ``major_event_log`` to your ``INSTALLED_APPS``. Be sure to add
``django.contrib.admin`` (and its dependencies) and
Expand Down Expand Up @@ -38,7 +48,7 @@ Installation

::

$ python manage.py migrate majore-event-log
$ python manage.py migrate major-event-log

5. Configure static files

Expand Down
34 changes: 34 additions & 0 deletions docs/testing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Testing
=======

Requirements
------------

- Django == 1.8
- tox == 2.0
- lxml == 3.4
- Python == 2.7
- Python == 3.4

**System** Requirements
^^^^^^^^^^^^^^^^^^^^^^^

- libxml2 >= 2.7.0
- libxslt >= 1.1.23


Running the tests
-----------------

To run the tests in the development environment:

::

$ python manage.py test ./tests

You can also run the tests with Tox:

::

$ [sudo] pip install tox
$ tox
4 changes: 2 additions & 2 deletions major_event_log/templates/major-event-log/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class='page-header'>
<h1>About</h1>
</div>
<p>This application serves to document major events related to the UNT Library's digital preservation projects. These events are not tied to specific objects, but rather affect all preserved objects or major subsets of objects.</p>
<p>The events themselves can be viewed collectively on the home page or viewed individually by clicking on the appropriate event's ID. When viewed individually, the event is displayed in plain HTML. If desired, the event can also be displayed in XML by clicking on either of the two blue buttons underneath the individual event's details. The 'PREMIS' button will show <b>only</b> the PREMIS XML, while the 'Atom' button will present the PREMIS XML embedded in an Atom object. Additionally, an Atom feed is available by clicking the 'Atom Feed' link on the right of the navigation bar, which will always show the 10 most recent events, provided they exist.</p>
<p>This application serves to document major events related to the UNT Libraries` digital preservation projects. These events are not tied to specific objects, but rather affect all preserved objects or major subsets of objects.</p>
<p>The events themselves can be viewed collectively on the home page or individually by clicking on the appropriate event's ID, which will take you to the details page. This page can present the details in HTML, PREMIS XML, or the Atom format. Additionally, the Atom feed will always show the 10 most recent events.</p>

{% endblock %}

1 comment on commit 1e55853

@ldko
Copy link
Member

@ldko ldko commented on 1e55853 Jul 3, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are presenting a paginated feed, perhaps "the Atom feed will always show the 10 most recent events" could read more like "the Atom feed gives events ordered by most recent creation date, ten events per page"--doesn't have to be exact wording.

Please sign in to comment.