Skip to content

Commit 94dd238

Browse files
author
Sergio García Prado
authored
Merge pull request #387 from minos-framework/0.7.0.dev1
0.7.0.dev1
2 parents 72cd513 + 061baca commit 94dd238

File tree

242 files changed

+4251
-10211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+4251
-10211
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Publish: minos-discovery-kong"
2+
3+
on:
4+
push:
5+
branches:
6+
- '*.*.x'
7+
paths:
8+
- 'packages/plugins/minos-discovery-kong/**'
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-discovery-kong
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: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: "Test: minos-discovery-kong"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '*.*.x'
8+
pull_request:
9+
paths:
10+
- 'packages/plugins/minos-discovery-kong/**'
11+
- 'packages/core/minos-microservice-networks/**'
12+
- 'packages/core/minos-microservice-common/**'
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
container: python:3.9-buster
18+
services:
19+
postgres:
20+
image: postgres:9.5
21+
env:
22+
POSTGRES_DB: kong
23+
POSTGRES_USER: kong
24+
POSTGRES_PASSWORD: kong
25+
ports:
26+
# Maps tcp port 5432 on service container to the host
27+
- 5432:5432
28+
defaults:
29+
run:
30+
working-directory: packages/plugins/minos-discovery-kong
31+
32+
steps:
33+
- name: Check out repository code
34+
uses: actions/checkout@v2
35+
36+
- name: Install dependencies
37+
run: apt install -y curl apt-transport-https
38+
39+
- name: Update apt list
40+
run: echo "deb [trusted=yes] https://download.konghq.com/gateway-2.x-debian-buster/ default all" | tee /etc/apt/sources.list.d/kong.list
41+
42+
- name: Install kong
43+
run: apt-get update && apt install -y kong-enterprise-edition=2.8.0.0
44+
45+
- name: Set env variables
46+
run: |
47+
echo "KONG_DATABASE=postgres" >> $GITHUB_ENV
48+
echo "KONG_PG_DATABASE=kong" >> $GITHUB_ENV
49+
echo "KONG_PG_HOST=postgres" >> $GITHUB_ENV
50+
echo "KONG_PG_USER=kong" >> $GITHUB_ENV
51+
echo "KONG_PG_PASSWORD=kong" >> $GITHUB_ENV
52+
echo "KONG_ADMIN_ACCESS_LOG=/dev/stdout" >> $GITHUB_ENV
53+
echo "KONG_ADMIN_ERROR_LOG=/dev/stderr" >> $GITHUB_ENV
54+
echo "KONG_PROXY_LISTEN=0.0.0.0:8000" >> $GITHUB_ENV
55+
echo "KONG_ADMIN_LISTEN=0.0.0.0:8001" >> $GITHUB_ENV
56+
echo "KONG_PROXY_ACCESS_LOG=/dev/stdout" >> $GITHUB_ENV
57+
echo "KONG_PROXY_ERROR_LOG=/dev/stderr" >> $GITHUB_ENV
58+
echo "KONG_LOG_LEVEL=debug" >> $GITHUB_ENV
59+
60+
- name: Kong Migration
61+
run: kong migrations bootstrap && kong migrations up && kong migrations finish
62+
63+
- name: Kong Start
64+
run: kong start
65+
66+
- name: Install Poetry
67+
uses: snok/install-poetry@v1
68+
69+
- name: Install dependencies
70+
run: make install
71+
72+
- name: Lint package
73+
run: make lint
74+
75+
- name: Test package with coverage
76+
run: make coverage
77+
78+
- name: Publish coverage
79+
uses: codecov/codecov-action@v2
80+
with:
81+
token: ${{ secrets.CODECOV_TOKEN }}
82+
files: ./packages/plugins/minos-discovery-kong/coverage.xml
83+
fail_ci_if_error: true
84+
85+
- name: Generate build
86+
run: make dist

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ $RECYCLE.BIN/
323323
*.lmdb
324324

325325
# Sphinx Api Documentation
326-
**/docs/api*
326+
**/docs/api-reference*
327327
**/docs/_build
328328

329329
tutorials/stock-wallet/front/stock-front

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ repos:
5151
files: ^packages/plugins/minos-discovery-minos/
5252
language: system
5353

54+
- id: minos-discovery-kong-check
55+
pass_filenames: false
56+
entry: make --directory=packages/plugins/minos-discovery-kong check
57+
name: Check minos-discovery-kong
58+
files: ^packages/plugins/minos-discovery-kong/
59+
language: system
60+
5461
- id: minos-http-aiohttp-check
5562
pass_filenames: false
5663
entry: make --directory=packages/plugins/minos-http-aiohttp check

CONTRIBUTING.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# How to contribute
22

3-
Minos being an open-source project, we are looking forward to having your contributions. No matter whether it is a pull
4-
request with new features, or the creation of an issue related to a bug you have found.
3+
Minos being an open-source project, we are looking forward to having your contributions. No matter whether it is a pull request with new features, or the creation of an issue related to a bug you have found.
54

65
Please consider these guidelines before you submit any modification.
76

8-
Create an issue
9-
----------------
7+
## Create an issue
8+
109
1. If you happen to find a bug, please file a new issue filling the 'Bug report' template.
1110
2. Set the appropriate labels, so we can categorise it easily.
1211
3. Wait for any core developer's feedback on it.
1312

14-
Submit a Pull Request
15-
-----------------------
13+
## Submit a Pull Request
14+
1615
1. Create an issue following the previous steps.
1716
2. Fork the project.
1817
3. Push your changes to a local branch.

Makefile

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,5 @@ install:
66
poetry install
77

88
docs:
9-
mkdir -p $(DOCS_TARGET)/core
10-
mkdir -p $(DOCS_TARGET)/plugins
11-
12-
$(MAKE) --directory=packages/core/minos-microservice-aggregate install docs
13-
cp -R packages/core/minos-microservice-aggregate/docs/_build/html $(DOCS_TARGET)/core/minos-microservice-aggregate
14-
15-
$(MAKE) --directory=packages/core/minos-microservice-common install docs
16-
cp -R packages/core/minos-microservice-common/docs/_build/html $(DOCS_TARGET)/core/minos-microservice-common
17-
18-
$(MAKE) --directory=packages/core/minos-microservice-cqrs install docs
19-
cp -R packages/core/minos-microservice-cqrs/docs/_build/html $(DOCS_TARGET)/core/minos-microservice-cqrs
20-
21-
$(MAKE) --directory=packages/core/minos-microservice-networks install docs
22-
cp -R packages/core/minos-microservice-networks/docs/_build/html $(DOCS_TARGET)/core/minos-microservice-networks
23-
24-
$(MAKE) --directory=packages/core/minos-microservice-saga install docs
25-
cp -R packages/core/minos-microservice-saga/docs/_build/html $(DOCS_TARGET)/core/minos-microservice-saga
26-
27-
$(MAKE) --directory=packages/plugins/minos-broker-kafka install docs
28-
cp -R packages/plugins/minos-broker-kafka/docs/_build/html $(DOCS_TARGET)/plugins/minos-broker-kafka
29-
30-
$(MAKE) --directory=packages/plugins/minos-broker-rabbitmq install docs
31-
cp -R packages/plugins/minos-broker-rabbitmq/docs/_build/html $(DOCS_TARGET)/plugins/minos-broker-rabbitmq
32-
33-
$(MAKE) --directory=packages/plugins/minos-discovery-minos install docs
34-
cp -R packages/plugins/minos-discovery-minos/docs/_build/html $(DOCS_TARGET)/plugins/minos-discovery-minos
35-
36-
$(MAKE) --directory=packages/plugins/minos-http-aiohttp install docs
37-
cp -R packages/plugins/minos-http-aiohttp/docs/_build/html $(DOCS_TARGET)/plugins/minos-http-aiohttp
38-
39-
$(MAKE) --directory=packages/plugins/minos-router-graphql install docs
40-
cp -R packages/plugins/minos-router-graphql/docs/_build/html $(DOCS_TARGET)/plugins/minos-router-graphql
41-
42-
9+
rm -rf docs/api-reference
4310
poetry run $(MAKE) --directory=docs html

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# minos-python: The framework which helps you create reactive microservices in Python
66

7+
[![GitHub Repo stars](https://img.shields.io/github/stars/minos-framework/minos-python?label=GitHub)]
78
[![PyPI Latest Release](https://img.shields.io/pypi/v/minos-microservice-common.svg)](https://pypi.org/project/minos-microservice-common/)
89
[![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)
910
[![License](https://img.shields.io/github/license/minos-framework/minos-python.svg)](https://github.com/minos-framework/minos-python/blob/main/LICENSE)
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
Set up a development environment
2-
=================================
1+
# Set up a development environment
32

43
Since we use `poetry` as the default package manager, it must be installed. Please refer to
54
`https://python-poetry.org/docs/#installation`.
65

76
Run `poetry install` to get the dependencies.
87

9-
Run `pre-commit install` to set the git checks before commiting.
8+
Run `pre-commit install` to set the git checks before committing.
109

1110
Make yourself sure you are able to run the tests. Refer to the appropriate section in this guide.

docs/_static/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
.wy-nav-content {
22
max-width: 1200px !important;
33
}
4+
5+
dl[class*="py"] {
6+
display: block !important;
7+
}
8+
9+
dl[class*="py"] > dt {
10+
display: block !important;
11+
}

docs/conf.py

Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,60 @@
11
import os
22
import sys
3+
from datetime import datetime
34

4-
sys.path.insert(0, os.path.abspath('..'))
5+
sys.path.insert(0, os.path.abspath(".."))
56

6-
import sphinx_rtd_theme # noqa
7+
from minos import common
8+
9+
exclude_patterns = [
10+
"standard/docs/*.md", # FIXME: Include these directories.
11+
"standard/docs/architecture/*.md", # FIXME: Include these directories.
12+
"_build",
13+
"Thumbs.db",
14+
".DS_Store",
15+
]
716

817
extensions = [
18+
"sphinx.ext.autodoc",
919
"sphinx.ext.viewcode",
10-
"sphinx_rtd_theme",
20+
"sphinx.ext.intersphinx",
21+
"sphinx.ext.autosummary",
1122
"m2r2",
1223
]
24+
templates_path = ["_templates"]
25+
source_suffix = [".rst", ".md"]
1326

14-
source_suffix = ['.rst', '.md']
15-
16-
master_doc = 'index'
17-
18-
project = 'Minos Python'
19-
copyright = "2021, Clariteia"
27+
master_doc = "index"
28+
project = "minos-python"
29+
copyright = f"2021-{datetime.now().year}, Clariteia"
2030
author = "Minos Framework Devs"
2131

22-
language = None
23-
24-
templates_path = ['_templates']
25-
26-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
27-
28-
pygments_style = 'sphinx'
29-
30-
todo_include_todos = False
31-
32-
html_theme = 'sphinx_rtd_theme'
33-
34-
html_extra_path = ['api-reference']
32+
version = common.__version__
33+
release = common.__version__
3534

35+
html_theme = "sphinx_rtd_theme"
3636
html_sidebars = {"**": ["about.html", "navigation.html", "searchbox.html"]}
37-
3837
html_static_path = ["_static"]
38+
39+
autodoc_default_options = {
40+
"members": True,
41+
"undoc-members": True,
42+
"inherited-members": True,
43+
"show-inheritance": True,
44+
"member-order": "bysource",
45+
}
46+
autodoc_mock_imports = [
47+
"unittest",
48+
]
49+
50+
autoclass_content = "class"
51+
autodoc_class_signature = "separated"
52+
autodoc_member_order = "bysource"
53+
autodoc_typehints_format = "short"
54+
autodoc_typehints = "description"
55+
autodoc_preserve_defaults = True
56+
add_module_names = False
57+
intersphinx_mapping = {
58+
"python": ("https://docs.python.org/3", None),
59+
}
60+
autosummary_generate = True

0 commit comments

Comments
 (0)