Skip to content

Commit e3fa2bf

Browse files
committed
Updated docs
1 parent 0172e0b commit e3fa2bf

File tree

72 files changed

+124
-27740
lines changed

Some content is hidden

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

72 files changed

+124
-27740
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Documentation
2+
3+
This project use MkDocs
4+
5+
* `mkdocs new [dir-name]` - Create a new project.
6+
* `mkdocs serve` - Start the live-reloading docs server.
7+
* `mkdocs build` - Build the documentation site.
8+
* `mkdocs help` - Print this help message.
9+
10+
## Project layout
11+
12+
```
13+
mkdocs.yml # The configuration file.
14+
docs/
15+
index.md # The documentation homepage.
16+
... # Other markdown pages, images and other files.
17+
```
18+
19+
## Deploy configuration
20+
21+
```
22+
mkdocs gh-deploy
23+
```

docs/contributing/index.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Contributing
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+
9+
## Commit Message Guidelines
10+
11+
- The messages of the commits use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
12+
- See [Angular guideline](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)
13+
14+
15+
## Installation
16+
17+
After cloning this repo, create a [virtualenv](https://virtualenv.pypa.io/en/stable/) and ensure dependencies are installed by running:
18+
19+
```sh
20+
virtualenv venv
21+
source venv/bin/activate
22+
pip install -e ".[test]"
23+
```
24+
25+
Well-written tests and maintaining good test coverage is important to this project. While developing, run new and existing tests with:
26+
27+
```sh
28+
pytest --cov=pyms --cov=tests tests/
29+
```
30+
31+
Add the `-s` flag if you have introduced breakpoints into the code for debugging.
32+
Add the `-v` ("verbose") flag to get more detailed test output. For even more detailed output, use `-vv`.
33+
Check out the [pytest documentation](https://docs.pytest.org/en/latest/) for more options and test running controls.
34+
35+
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:
36+
37+
```sh
38+
tox
39+
```
40+
41+
If you wish to run against a specific version defined in the `tox.ini` file:
42+
43+
```sh
44+
tox -e py36
45+
```
46+
47+
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.
48+
49+
## Pipenv
50+
51+
### Advantages over plain pip and requirements.txt
52+
[Pipenv](https://pipenv.readthedocs.io/en/latest/) generates two files: a `Pipfile`and a `Pipfile.lock`.
53+
* `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
54+
* `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.
55+
56+
### How to...
57+
58+
Here the most 'common' `pipenv` commands, for a more in-depth explanation please refer to the [official documentation](https://pipenv.readthedocs.io/en/latest/).
59+
60+
#### Install pipenv
61+
```bash
62+
pip install pipenv
63+
```
64+
65+
#### Install dependencies defined in a Pipfile
66+
```bash
67+
pipenv install
68+
```
69+
70+
#### Install both dev and "standard" dependencies defined in a Pipfile
71+
```bash
72+
pipenv install --dev
73+
```
74+
75+
#### Install a new module
76+
```bash
77+
pipenv install django
78+
```
79+
80+
#### Install a new dev module (usually test related stuff)
81+
```bash
82+
pipenv install nose --dev
83+
```
84+
85+
#### Install dependencies in production
86+
```bash
87+
pipenv install --deploy
88+
```
89+
90+
#### Start a shell
91+
```bash
92+
pipenv shell
93+
```
94+
95+
## Tutorial: Create your own service
96+
97+
See this [tutorial](tutorial_create_services.md)

mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ nav:
3737
- Articles and events:
3838
- External Links and Articles: links_articles.md
3939
- HacktoberfestES: hacktoberfest_es_2020.md
40+
- Contributing:
41+
- External Links and Articles: links_articles.md
42+
- HacktoberfestES: hacktoberfest_es_2020.md
43+
4044

4145
markdown_extensions:
4246
- admonition: null

0 commit comments

Comments
 (0)