Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.03 KB

README.md

File metadata and controls

38 lines (24 loc) · 1.03 KB

Welcome to libweasyl

libweasyl is a library of functionality and database models that underpins much of weasyl and its one-off scripts.

Setup

To write a new tool using libweasyl (assuming you already have your database setup and libweasyl's requirements installed in your python environment), you probably should begin by setting up a call to [configure_libweasyl()] (libweasyl/configuration.py). At minimum this will require a SQLAlchemy scoped_session to your weasyl database and a path to a staff.yaml file identifying the staff users.

Testing and Style Checks

If you're making changes to libweasyl, you are expected to write unit tests and to check your code for style mistakes.

Running unit tests:

$ make test

Checking test coverage:

$ make coverage

Style-checks:

$ make check         # checks uncommitted changes. Runs pre-commit
$ make check-all     # checks entire codebase
$ make check-commit  # checks most recent commit