8000 GitHub - timschneider/papermerge-core: Papermerge RESTful backend structured as reusable Django app
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Papermerge RESTful backend structured as reusable Django app

License

Notifications You must be signed in to change notification settings

timschneider/papermerge-core

 
 

Repository files navigation

Tests

Papermerge RESTful Backend Server

This python package is the heart of Papermerge project. It consists of a set of reusable Django apps which are consumed across different bundles of Papermerge Document Management System (DMS).

Technically speaking, it contains following Django apps:

  • papermerge.core - the epicenter of Papermerge project
  • papermerge.notifications - Django Channels app for sending notifications via websockets
  • papermerge.search - Thin RESTful API layer over elasticsearch

This package is intended to be part of Django project like this one for example.

What is Papermerge?

Papermerge is an open source document management system (DMS) primarily designed for archiving and retrieving your digital documents. Instead of having piles of paper documents all over your desk, office or drawers - you can quickly scan them and configure your scanner to directly upload to Papermerge DMS. Papermerge DMS on its turn will extract text data from the scanned documents using Optical Character Recognition (OCR) technology the index it and make it searchable. You will be able to quickly find any (scanned!) document using full text search capabilities.

Papermerge is perfect tool to manage documents in PDF, JPEG, TIFF and PNG formats.

Features Highlights

  • RESTul API
  • Documents of pdf, jpg, png, tiff formats are supported
  • OCR (Optical Character Recognition) of the documents (uses OCRmyPDF)
  • Full Text Search of the scanned documents (uses elasticsearch)
  • Document Versions
  • User defined metadata per folder/document/page
  • Tags - assign colored tags to documents or folders
  • Documents and Folders - users can organize documents in folders
  • Multi-User (Groups, Roles)
  • User permissions management
  • Document permissions management
  • Page Management - delete, reorder, cut & paste pages (uses PikePDF)
  • Automation

Documentation

Online documentation is available at https://docs.papermerge.io

Tests

Use poetry to switch into python virtual environment:

poetry shell

Then install all dependencies in current python virtual environment:

poetry install

Test suite is devided into two big groups:

  1. tests.core
  2. tests.search

First group (tests.core) is concerned with tests for papermerge.core while second one (tests.search) is concerned with tests for papermerge.search. In order to run tests.core tests you need to have redis up and running; in order to run test.search you need to both redis and elasticsearch up and running.

Core Tests

Before running core tests suite, make sure redis service is up and running. Run tests:

 DJANGO_SETTINGS_MODULE=tests.config.core_settings PYTHONPATH=. pytest tests/core/

Another way to invoke pytest, which automatically adds current working directory to PYTHONPATH:

DJANGO_SETTINGS_MODULE=tests.config.core_settings python -m pytest tests/core/

Disable warning during test runs:

DJANGO_SETTINGS_MODULE=tests.config.core_settings python -m pytest --disable-warnings tests/core/

One handy shortcut to invoke pytests in python virtual environment:

DJANGO_SETTINGS_MODULE=tests.config.core_settings poetry run python -m pytest --disable-warnings tests/core/

You can use run-tests.sh bash script to run core tests:

./run-tests.sh core

Search Tests

Before running search tests suite, make sure both redis and elasticsearch services are up and running:

 DJANGO_SETTINGS_MODULE=tests.config.search_settings poetry run python -m pytest --disable-warnings tests/search/

You can use run-tests.sh bash script to run tests for search app:

./run-tests.sh search

About

Papermerge RESTful backend structured as reusable Django app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.1%
  • Other 0.9%
0