Skip to content

Commit

Permalink
Merge branch 'master' into static-media
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankoegl committed Jul 4, 2017
2 parents b081472 + 5cd52a5 commit 8fc3cf6
Show file tree
Hide file tree
Showing 383 changed files with 6,320 additions and 8,514 deletions.
31 changes: 31 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[run]
branch = True
source=mygpo/
omit=*/admin.py,*/wsgi.py,*/tests.py,*/management/*
plugins =
django_coverage_plugin


[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

show_missing = True

omit=*/migrations/*,admin.py,*/wsgi.py,*/tests.py,*/management/*

precision = 1
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mygpo/staticfiles/
staticfiles/

# virtualenv
venv
venv*

# test coverage
.coverage
Expand Down
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
language: python

python:
- "2.7"
- "3.5"
- "nightly"

services:
- couchdb
- redis-server
- elasticsearch

install:
- pip install -r requirements.txt --allow-external argparse
- pip install -r requirements.txt -r requirements-test.txt
- pip install coveralls

before_script:
- psql -c 'create database mygpo_test;' -U postgres

script:
python manage.py test
coverage run --branch --source=mygpo ./manage.py test

after_script:
- coveralls

env:
- DATABASE_URL="postgres://postgres@localhost/mygpo_test"

sudo: false
102 changes: 2 additions & 100 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ When no version number is indicated, it is advisable to install the current
development version from the repository.

* Python (>= 2.6) or PyPy (tested with 2.0 beta1)
* [CouchDB](https://couchdb.apache.org/) (>= 1.2)
* PostgreSQL


Basic setup
Expand All @@ -21,9 +21,6 @@ Ubuntu 12.04 x86 install, 'should work' with other versions/archs as well).
If you are on a Debian/Ubuntu system, do:

sudo apt-get install erlang git python-pip python-dev libevent-dev
sudo apt-get build-dep couchdb

[ install couchdb 1.2.0 from source ]

For creating logo thumbnails, install libraries for the various image formats.
They are used by the pillow library.
Expand All @@ -43,8 +40,7 @@ some other fancy stuff):
That's it for the setup. Now to initialize the DB:

cd mygpo
python manage.py sync_couchdb
python manage.py sync-design-docs
python manage.py migrate

..and here we go:

Expand Down Expand Up @@ -78,23 +74,6 @@ that your machine is connected to. Apply common sense and ideally use only
on trusted networks.


Installing database dumps (if you have any, that is)
----------------------------------------------------

As easy as..

cd lib
hg clone https://code.google.com/p/couchdb-python/
cd couchdb-python
zcat /path/to/your.dump.gz | python couchdb/tools/load.py \
http://localhost:5984/mygpo

..when you have created a dump like this:

python manage.py dump-sample --user=[username] | gzip > my.dump.gz

(where [username] is a specific user for which the data will be dumped)

Updating derived data
---------------------

Expand Down Expand Up @@ -129,83 +108,6 @@ To set a user as publisher for a given feed URL, use:
python manage.py make-publisher <username> <feed-url> [...]


Resetting the database ("start from scratch")
---------------------------------------------

Delete the database:

curl -X DELETE http://127.0.0.1:5984/mygpo
curl -X DELETE http://127.0.0.1:5984/mygpo_sessions

Recreate the design documents:

cd mygpo
python manage.py sync_couchdb
python manage.py sync-design-docs


Additional details on couchDB
-----------------------------

A source distribution of CouchDB can be obtained from

http://couchdb.apache.org/downloads.html

Build and installation instructions can be found at

http://wiki.apache.org/couchdb/Installation

Here are some rough instructions on how to build CouchDB 1.2.0 from source
and setting it up with a local user account:

(assuming you have downloaded and extracted the CouchDB 1.2.0 source)
sudo apt-get build-dep couchdb
export COUCHDB_HOME=~/pkg/apache-couchdb-1.2.0/
./configure --prefix=$COUCHDB_HOME
make -j4 && make install
sudo useradd -d $COUCHDB_HOME/var/lib/couchdb couchdb
sudo chown -R couchdb: $COUCHDB_HOME
sudo chown -R root:couchdb $COUCHDB_HOME/etc/couchdb
sudo chmod 664 $COUCHDB_HOME/etc/couchdb/*.ini
sudo chmod 775 $COUCHDB_HOME/etc/couchdb/*.d


If you want to avoid installing a CouchDB server yourself, you can use a free
CouchDB hosting service, for example from

http://www.iriscouch.com/service

Please note, however, that hosted CouchDB services generally do not provide
security or authentication mechanisms, so this might only be useful for
development servers.

If you don't use a local database, you need to update the COUCHDB_DATABASES
setting (see the "Settings" section below).



Initializing an empty Database
------------------------------

To create the database, execute the following on the commandline

curl -X PUT http://127.0.0.1:5984/mygpo

To initialize the views, execute from the mygpo directory

python manage.py sync_couchdb


Importing a Dump
----------------

To import a CouchDB dump, execute the following from the commandline

gunzip -c <dumpfile.couch.gz> | couchdb-load http://127.0.0.1:5984/mygpo




Settings
--------

Expand Down
6 changes: 0 additions & 6 deletions bin/compact-db.sh

This file was deleted.

8 changes: 0 additions & 8 deletions bin/compact-view.sh

This file was deleted.

16 changes: 0 additions & 16 deletions bin/couchdb-view-usage.sh

This file was deleted.

65 changes: 0 additions & 65 deletions bin/perform-update.sh

This file was deleted.

8 changes: 0 additions & 8 deletions bin/view-usage.sh

This file was deleted.

9 changes: 0 additions & 9 deletions couchdb/general/_design/generic/filters/is_type.js

This file was deleted.

9 changes: 0 additions & 9 deletions couchdb/general/_design/generic/filters/is_types.js

This file was deleted.

4 changes: 0 additions & 4 deletions couchdb/general/_design/generic/filters/notdeleted.js

This file was deleted.

11 changes: 0 additions & 11 deletions couchdb/userdata/_design/chapters/views/by_episode/map.js

This file was deleted.

41 changes: 0 additions & 41 deletions couchdb/userdata/_design/episode_actions/views/by_device/map.js

This file was deleted.

Loading

0 comments on commit 8fc3cf6

Please sign in to comment.