Skip to content
Where I continue the CodeIgniter-based Librarian...in Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
alembic
docker-setup
lib
librarian
.coveragerc
.dockerignore
.gitignore
.travis.yml
Dockerfile
Dockerfile-test
alembic-test.ini
alembic.ini
config.py
db_playground.py
docker-compose-test.yml
docker-compose.yml
dockertests
fixtures.py
jsTestDriver.conf
package.json
practices.markdown
readme.markdown
requirements.txt
run.py
run_js_tests
runtests
standards.markdown
tasks.py
test-requirements.txt
wait-for-mysql.sh

readme.markdown

Alexandria

Build Status codecov

Citing related repos compels me to mention this one.

Dev Set-up

Install docker and docker-compose and do docker-compose up --build.

Create a virtualenv and do pip install -r requirements.txt. Note that this virtualenv is not required if you just want to run Alexandria; it is needed for invoke and is mainly for development and administration.

Note that at this point, you don't have fixture data yet. So do

invoke load_fixtures

Or, if you already have a database dump you want to load into the app,

invoke load-db [--dump-name dump.sql]

In general, have a look at tasks.py (or just invoke -l) for a bunch of useful routines.

Testing

Set-up

Build the Dockerfile without a username (so it stays local) and tag it as current:

docker build -t alexandria:current .

This will be used by the image in Dockerfile-test (which is only referenced in docker-compose-test.yml).

Running

Just do,

docker-compose -f docker-compose-test.yml run --entrypoint ./dockertests test

More relevant information can be found at .travis.yml.

Documentation

JavaScript

Assuming npm is installed, use jsdoc.

$ npm install jsdoc
$ node_modules/jsdoc/jsdoc.js -r librarian/static/scripts/

You can then find the docs in the /out directory of the project's root.

You can’t perform that action at this time.