Skip to content

Commit 4ecea70

Browse files
author
Sergio García Prado
committed
ISSUE #99
* Add `minos-database-lmdb` package skeleton
1 parent 772e330 commit 4ecea70

File tree

19 files changed

+1298
-0
lines changed

19 files changed

+1298
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Publish: minos-database-lmdb"
2+
3+
on:
4+
push:
5+
branches:
6+
- '*.*.x'
7+
paths:
8+
- 'packages/plugins/minos-database-lmdb/**'
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
container: python:3.9-buster
14+
defaults:
15+
run:
16+
working-directory: packages/plugins/minos-database-lmdb
17+
18+
steps:
19+
20+
- name: Check out repository code
21+
uses: actions/checkout@v2
22+
23+
- name: Install Poetry
24+
uses: snok/install-poetry@v1
25+
26+
- name: Install dependencies
27+
run: make install
28+
29+
- name: Publish package
30+
run: make release
31+
env:
32+
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
33+
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Test: minos-database-lmdb"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '*.*.x'
8+
pull_request:
9+
paths:
10+
- 'packages/plugins/minos-database-lmdb/**'
11+
- 'packages/core/minos-microservice-saga/**'
12+
- 'packages/core/minos-microservice-common/**'
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
container: python:3.9-buster
18+
defaults:
19+
run:
20+
working-directory: packages/plugins/minos-database-lmdb
21+
22+
steps:
23+
- name: Check out repository code
24+
uses: actions/checkout@v2
25+
26+
- name: Install Poetry
27+
uses: snok/install-poetry@v1
28+
29+
- name: Install dependencies
30+
run: make install
31+
32+
- name: Lint package
33+
run: make lint
34+
35+
- name: Test package with coverage
36+
run: make coverage
37+
38+
- name: Publish coverage
39+
uses: codecov/codecov-action@v2
40+
with:
41+
token: ${{ secrets.CODECOV_TOKEN }}
42+
files: ./packages/plugins/minos-database-lmdb/coverage.xml
43+
fail_ci_if_error: true
44+
45+
- name: Generate documentation
46+
run: make docs
47+
48+
- name: Generate build
49+
run: make dist
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Credits
2+
3+
## Development Lead
4+
5+
* Andrea Mucci <[email protected]>
6+
7+
## Core Devs
8+
9+
* Sergio Garcia Prado <[email protected]>
10+
* Vladyslav Fenchak <[email protected]>
11+
* Alberto Amigo Alonso <[email protected]>
12+
13+
## Contributors
14+
15+
None yet. Why not be the first?
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# History
2+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Clariteia
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.PHONY: docs
2+
3+
lint:
4+
poetry run flake8
5+
6+
test:
7+
poetry run pytest
8+
9+
coverage:
10+
poetry run coverage run -m pytest
11+
poetry run coverage report -m
12+
poetry run coverage xml
13+
14+
reformat:
15+
poetry run black --line-length 120 minos tests
16+
poetry run isort minos tests
17+
18+
release:
19+
$(MAKE) dist
20+
poetry publish
21+
22+
dist:
23+
poetry build
24+
ls -l dist
25+
26+
install:
27+
poetry install
28+
29+
update:
30+
poetry update
31+
32+
check:
33+
$(MAKE) install
34+
$(MAKE) reformat
35+
$(MAKE) lint
36+
$(MAKE) test
37+
$(MAKE) dist
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<p align="center">
2+
<a href="https://minos.run" target="_blank"><img src="https://raw.githubusercontent.com/minos-framework/.github/main/images/logo.png" alt="Minos logo"></a>
3+
</p>
4+
5+
## minos-database-lmdb
6+
7+
[![PyPI Latest Release](https://img.shields.io/pypi/v/minos-database-lmdb.svg)](https://pypi.org/project/minos-database-lmdb/)
8+
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/minos-framework/minos-python/pages%20build%20and%20deployment?label=docs)](https://minos-framework.github.io/minos-python)
9+
[![License](https://img.shields.io/github/license/minos-framework/minos-python.svg)](https://github.com/minos-framework/minos-python/blob/main/LICENSE)
10+
[![Coverage](https://codecov.io/github/minos-framework/minos-python/coverage.svg?branch=main)](https://codecov.io/gh/minos-framework/minos-python)
11+
[![Stack Overflow](https://img.shields.io/badge/Stack%20Overflow-Ask%20a%20question-green)](https://stackoverflow.com/questions/tagged/minos)
12+
13+
## Summary
14+
15+
Minos is a framework which helps you create [reactive](https://www.reactivemanifesto.org/) microservices in Python. Internally, it leverages Event Sourcing, CQRS and a message driven architecture to fulfil the commitments of an asynchronous environment.
16+
17+
## Installation
18+
19+
Install the dependency:
20+
21+
```shell
22+
pip install minos-database-lmdb
23+
```
24+
25+
Set the database client on the `config.yml` file:
26+
27+
```yaml
28+
...
29+
databases:
30+
foobar:
31+
client: minos.plugins.lmdb.LmdbDatabaseClient
32+
path: "./foobar.lmdb"
33+
...
34+
...
35+
```
36+
37+
## Documentation
38+
39+
The official API Reference is publicly available at the [GitHub Pages](https://minos-framework.github.io/minos-python).
40+
41+
## Source Code
42+
43+
The source code of this project is hosted at the [GitHub Repository](https://github.com/minos-framework/minos-python).
44+
45+
## Getting Help
46+
47+
For usage questions, the best place to go to is [StackOverflow](https://stackoverflow.com/questions/tagged/minos).
48+
49+
## Discussion and Development
50+
51+
Most development discussions take place over the [GitHub Issues](https://github.com/minos-framework/minos-python/issues). In addition, a [Gitter channel](https://gitter.im/minos-framework/community) is available for development-related questions.
52+
53+
## License
54+
55+
This project is distributed under the [MIT](https://raw.githubusercontent.com/minos-framework/minos-python/main/LICENSE) license.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Run the tests
2+
3+
In order to run the tests, please make sure you have the `Docker Engine <https://docs.docker.com/engine/install/>`_
4+
and `Docker Compose <https://docs.docker.com/compose/install/>`_ installed.
5+
6+
Move into tests/ directory
7+
8+
`cd tests/`
9+
10+
Run service dependencies:
11+
12+
`docker-compose up -d`
13+
14+
Install library dependencies:
15+
16+
`make install`
17+
18+
Run tests:
19+
20+
`make test`
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""The lmdb plugin of the Minos Framework."""
2+
3+
__author__ = "Minos Framework Devs"
4+
__email__ = "[email protected]"
5+
__version__ = "0.0.0"

packages/plugins/minos-database-lmdb/minos/plugins/lmdb/factories/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)