<commit_before>Open Permissions Platform Repository Service
============================================

This repository contains the Repository Service for the Open Permissions Platform.

The Repository Service provides the mechanisms for storage and retrieval of licensing data.
It provides a multi-tenant facility, with each client's data stored in repositories which have their own access control policy.

The REStful interface is very similar to that of the Query Service, in order to support end users directly communicating with a repository or via a federating service.

Running locally
===============
#### blazegraph data store

Follow the instruction on blazegraph in [developer environment setup doc]( https://github.com/openpermissions/dev-environment#blazegraph).

#### repository service application

```
pip install -r requirements/dev.txt
python setup.py develop
python repository/
```

To show a list of available CLI parameters:

```
python repository/ -h [--help]
```

To start the service using test.service.conf:

```
python repository/ -t [--test]
```

Running tests and generating code coverage
==========================================
To have a clean target from build artifacts:

```
make clean
```

To install requirements. By default, prod requirement is used:

```
make requirements [REQUIREMENT=test|dev|prod]
```

To run all unit tests and generate an HTML code coverage report along with a
JUnit XML report in tests/unit/reports:

```
make test
```

To run pyLint and generate a HTML report in tests/unit/reports:

```
make pylint
```

To run create the documentation for the service in _build:

```
make docs
```


Loading initial data
====================

To add inital data to the repository, run the following command:

```
python repository load_data fixtures
```
<commit_msg>Add useful links to readme<commit_after>Open Permissions Platform Repository Service
============================================

Useful Links
============
* [Open Permissions Platform](http://openpermissions.org)
* [Low level Design](https://github.com/openpermissions/repository-srv/blob/master/documents/markdown/low-level-design.md)
* [API Documentation] (https://github.com/openpermissions/repository-srv/blob/master/documents/apiary/api.md)

Service Overview
================
This repository contains the Repository Service for the Open Permissions Platform.

The Repository Service provides the mechanisms for storage and retrieval of licensing data.
It provides a multi-tenant facility, with each client's data stored in repositories which have their own access control policy.

The REStful interface is very similar to that of the Query Service, in order to support end users directly communicating with a repository or via a federating service.

Running locally
---------------
#### blazegraph data store

Follow the instruction on [blazegraph](https://www.blazegraph.com/) to set up a data store for the repository service.

#### repository service application

```
pip install -r requirements/dev.txt
python setup.py develop
python repository/
```

To show a list of available CLI parameters:

```
python repository/ -h [--help]
```

To start the service using test.service.conf:

```
python repository/ -t [--test]
```

Running tests and generating code coverage
------------------------------------------
To have a clean target from build artifacts:

```
make clean
```

To install requirements. By default, prod requirement is used:

```
make requirements [REQUIREMENT=test|dev|prod]
```

To run all unit tests and generate an HTML code coverage report along with a
JUnit XML report in tests/unit/reports:

```
make test
```

To run pyLint and generate a HTML report in tests/unit/reports:

```
make pylint
```

To run create the documentation for the service in _build:

```
make docs
```


Loading initial data
--------------------

To add inital data to the repository, run the following command:

```
python repository load_data fixtures
```

{'fraction_non_alphanumeric': 0.14199547625031414, 'fraction_numerical': 0.0, 'mean_word_length': 4.444596443228455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4163291', 'n_tokens_mistral': 1045, 'n_tokens_neox': 970, 'n_words': 457}