You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-99
Original file line number
Diff line number
Diff line change
@@ -1,104 +1,6 @@
1
1
# Contributing
2
2
3
-
## Branch workflow
4
-
5
-
READ BEFORE CREATE A BRANCH OR OPEN A PR/MR
6
-
- We use [Github Glow](https://guides.github.com/introduction/flow/)
7
-
8
-
## Commit Message Guidelines
9
-
10
-
- The messages of the commits use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
11
-
- See [Angular guideline](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)
12
-
13
-
14
-
## Installation
15
-
16
-
After cloning this repo, create a [virtualenv](https://virtualenv.pypa.io/en/stable/) and ensure dependencies are installed by running:
17
-
18
-
```sh
19
-
virtualenv venv
20
-
source venv/bin/activate
21
-
pip install -r requirements-dev.txt
22
-
```
23
-
24
-
Well-written tests and maintaining good test coverage is important to this project. While developing, run new and existing tests with:
25
-
26
-
```sh
27
-
pytest --cov=pyms --cov=tests tests/
28
-
```
29
-
30
-
Add the `-s` flag if you have introduced breakpoints into the code for debugging.
31
-
Add the `-v` ("verbose") flag to get more detailed test output. For even more detailed output, use `-vv`.
32
-
Check out the [pytest documentation](https://docs.pytest.org/en/latest/) for more options and test running controls.
33
-
34
-
PyMS supports several versions of Python3. To make sure that changes do not break compatibility with any of those versions, we use `tox` to create virtualenvs for each Python version and run tests with that version. To run against all Python versions defined in the `tox.ini` config file, just run:
35
-
36
-
```sh
37
-
tox
38
-
```
39
-
40
-
If you wish to run against a specific version defined in the `tox.ini` file:
41
-
42
-
```sh
43
-
tox -e py36
44
-
```
45
-
46
-
Tox can only use whatever versions of Python are installed on your system. When you create a pull request, Travis will also be running the same tests and report the results, so there is no need for potential contributors to try to install every single version of Python on their own system ahead of time.
47
-
48
-
## Pipenv
49
-
50
-
### Advantages over plain pip and requirements.txt
51
-
[Pipenv](https://pipenv.readthedocs.io/en/latest/) generates two files: a `Pipfile`and a `Pipfile.lock`.
52
-
*`Pipfile`: Is a high level declaration of the dependencies of your project. It can contain "dev" dependencies (usually test related stuff) and "standard" dependencies which are the ones you'll need for your project to function
53
-
*`Pipfile.lock`: Is the "list" of all the dependencies your Pipfile has installed, along with their version and their hashes. This prevents two things: Conflicts between dependencies and installing a malicious module.
54
-
55
-
### How to...
56
-
57
-
Here the most 'common' `pipenv` commands, for a more in-depth explanation please refer to the [official documentation](https://pipenv.readthedocs.io/en/latest/).
58
-
59
-
#### Install pipenv
60
-
```bash
61
-
pip install pipenv
62
-
```
63
-
64
-
#### Install dependencies defined in a Pipfile
65
-
```bash
66
-
pipenv install
67
-
```
68
-
69
-
#### Install both dev and "standard" dependencies defined in a Pipfile
70
-
```bash
71
-
pipenv install --dev
72
-
```
73
-
74
-
#### Install a new module
75
-
```bash
76
-
pipenv install django
77
-
```
78
-
79
-
#### Install a new dev module (usually test related stuff)
80
-
```bash
81
-
pipenv install nose --dev
82
-
```
83
-
84
-
#### Install dependencies in production
85
-
```bash
86
-
pipenv install --deploy
87
-
```
88
-
89
-
#### Start a shell
90
-
```bash
91
-
pipenv shell
92
-
```
93
-
94
-
95
-
## Black
96
-
The code is formatted using [Black](https://github.com/psf/black).
97
-
98
-
### pre-commit
99
-
To activate *black* before each commit, run `pre-commit install`.
100
-
If any file is formatted before commit, you will need to add it again.
101
-
3
+
See this [webpage](https://python-microservices.github.io/contributing/)
Copy file name to clipboardExpand all lines: README.md
+12-120
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,4 @@
1
1
# microservices-scaffold
2
-
Python Microservice Scaffold is an example of how to structure a Flask Microservice Project.
3
-
This Scaffold is build over [PyMS](https://github.com/python-microservices/pyms) package. PyMS is a [Microservice chassis pattern](https://microservices.io/patterns/microservice-chassis.html)
4
-
like Spring Boot (Java) or Gizmo (Golang). PyMS is a collection of libraries, best practices and recommended ways to build
5
-
microservices with Python which handles cross-cutting concerns:
#### Advantages over plain pip and requirements.txt
68
-
[Pipenv](https://pipenv.readthedocs.io/en/latest/) generates two files: a `Pipfile`and a `Pipfile.lock`.
69
-
*`Pipfile`: Is a high level declaration of the dependencies of your project. It can contain "dev" dependencies (usually test related stuff) and "standard" dependencies which are the ones you'll need for your project to function
70
-
*`Pipfile.lock`: Is the "list" of all the dependencies your Pipfile has installed, along with their version and their hashes. This prevents two things: Conflicts between dependencies and installing a malicious module.
71
-
72
-
For a more in-depth explanation please refer to the [official documentation](https://pipenv.readthedocs.io/en/latest/).
73
-
74
-
## Run your python script
75
-
```bash
76
-
python manage.py runserver
77
-
```
78
-
79
-
80
-
## Check the result
81
-
82
-
Your default endpoints will be in this url:
83
-
```bash
84
-
http://127.0.0.1:5000/films
85
-
http://127.0.0.1:5000/actors
86
-
```
87
-
88
-
This URL is set in your `config.yml`:
89
-
90
-
```yaml
91
-
pyms:
92
-
config:
93
-
DEBUG: false
94
-
TESTING: false
95
-
APP_NAME: Template
96
-
APPLICATION_ROOT : ""# <!---
97
-
```
98
-
99
-
You can acceded to a [swagger ui](https://swagger.io/tools/swagger-ui/) in the next url:
Copy file name to clipboardExpand all lines: docs/index.rst
+1-35
Original file line number
Diff line number
Diff line change
@@ -4,39 +4,5 @@
4
4
5
5
Python Microservices
6
6
====================
7
-
Python Microservice Scaffold is an example of how to structure a Flask Microservice Project.
8
-
This Scaffold is build over `PyMS <https://github.com/python-microservices/pyms>`_ package. PyMS is a `Microservice chassis pattern <https://microservices.io/patterns/microservice-chassis.html>`_
9
-
like Spring Boot (Java) or Gizmo (Golang). PyMS is a collection of libraries, best practices and recommended ways to build
10
-
microservices with Python which handles cross-cutting concerns:
7
+
Documentation moved to `https://python-microservices.github.io/ <https://python-microservices.github.io/>`_
0 commit comments