Skip to content

Commit f1dd8fb

Browse files
committed
chore: Initial commit
0 parents  commit f1dd8fb

40 files changed

Lines changed: 894 additions & 0 deletions

.cruft.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"template": "https://github.com/pawamoy/cookie-poetry",
3+
"commit": "39e751de4fda3c136fee27778e661365a47b9b2a",
4+
"context": {
5+
"cookiecutter": {
6+
"project_name": "mkdocstrings",
7+
"project_description": "Automatic documentation from docstrings, for mkdocs.",
8+
"author_fullname": "Timothée Mazzucotelli",
9+
"author_email": "pawamoy@pm.me",
10+
"author_username": "pawamoy",
11+
"repository_provider": "gitlab.com",
12+
"repository_namespace": "pawamoy",
13+
"repository_name": "mkdocstrings",
14+
"copyright_holder": "Timothée Mazzucotelli",
15+
"copyright_holder_email": "pawamoy@pm.me",
16+
"copyright_date": "2019",
17+
"copyright_license": "ISC License",
18+
"python_package_distribution_name": "mkdocstrings",
19+
"python_package_import_name": "mkdocstrings",
20+
"python_package_command_line_name": "mkdocstrings",
21+
"_template": "https://github.com/pawamoy/cookie-poetry"
22+
}
23+
}
24+
}

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
max-line-length = 120
3+
select = C,E,F,W,B,B950
4+
ignore = E501,W503,E203
5+

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea/
2+
__pycache__/
3+
*.py[cod]
4+
dist/
5+
*.egg-info/
6+
build/
7+
.coverage
8+
tests/tmp/*
9+
!tests/tmp/.gitkeep
10+
pip-wheel-metadata/
11+
.pytest_cache/

.gitlab-ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
variables:
2+
PIP_CACHE_DIR: "${CI_PROJECT_DIR}/.cache/pip"
3+
4+
cache:
5+
key: "${CI_JOB_NAME}"
6+
paths:
7+
- .cache/pip
8+
- .venv
9+
10+
stages:
11+
- quality
12+
- tests
13+
14+
.install-deps-template: &install-deps
15+
before_script:
16+
- pip install poetry
17+
- poetry --version
18+
- poetry config settings.virtualenvs.in-project true
19+
- poetry install -vv
20+
21+
# Quality jobs
22+
23+
.quality-template: &quality
24+
<<: *install-deps
25+
image: python:3.6
26+
stage: quality
27+
28+
check-bandit:
29+
<<: *quality
30+
script: make check-bandit
31+
32+
check-black:
33+
<<: *quality
34+
script: make check-black
35+
36+
check-flake8:
37+
<<: *quality
38+
script: make check-flake8
39+
40+
check-isort:
41+
<<: *quality
42+
script: make check-isort
43+
44+
check-safety:
45+
<<: *quality
46+
script: make check-safety
47+
48+
# Tests jobs
49+
50+
.test-template: &test
51+
<<: *install-deps
52+
stage: tests
53+
script: make test
54+
55+
python3.6:
56+
<<: *test
57+
image: python:3.6
58+
59+
python3.7:
60+
<<: *test
61+
image: python:3.7
62+
63+
python3.8:
64+
<<: *test
65+
image: python:3.8

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.6.8

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at pawamoy@pm.me. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Contributing
2+
Contributions are welcome, and they are greatly appreciated!
3+
4+
Every little bit helps, and credit will always be given.
5+
6+
For bug reports, feature requests, and feedback,
7+
simply create a new [issue][1].
8+
Try to be as descriptive as possible.
9+
10+
### Bug fixes, new features and documentation
11+
This project is developed using [`poetry`](https://github.com/sdispater/poetry).
12+
Follow the recommended installation method:
13+
14+
```bash
15+
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
16+
```
17+
18+
Then follow these instructions:
19+
20+
1. Fork the repository [on gitlab.com][2];
21+
1. Clone it on your machine;
22+
1. Go into the directory, and run `poetry install` to setup the development environment;
23+
1. Create a new branch with `git checkout -b bug-fix-or-feature-name`;
24+
1. Code!
25+
1. **Write tests. Run them all.** The commands to run the tests are:
26+
```bash
27+
poetry run pytest # to run all tests sequentially
28+
poetry run pytest -v # to print one test per line
29+
poetry run pytest -n 4 # to run tests in parallel (4 workers)
30+
poetry run pytest tests/test_api.py # to run tests in a specific file
31+
```
32+
33+
`pytest` provides the `-k` option to select tests based on their names:
34+
35+
```bash
36+
poetry run pytest -k "api and remove"
37+
poetry run pytest -k "utils or stats"
38+
```
39+
40+
See the [documentation for the `-k` option][3] for more examples.
41+
42+
A [Makefile](Makefile) is available for convenience: `make test`.
43+
1. When the tests pass, commit
44+
(make sure to have atomic commits and contextual commit messages!
45+
[Check out this awesome blog post by Chris Beams for more information.][4])
46+
1. Push;
47+
1. ...and finally, create a new [pull/merge request][5]!
48+
Make sure to follow the guidelines.
49+
50+
[1]: https://gitlab.com/pawamoy/mkdocstrings/issues/new
51+
[2]: https://gitlab.com/pawamoy/mkdocstrings
52+
[3]: https://docs.pytest.org/en/latest/example/markers.html#using-k-expr-to-select-tests-based-on-their-name
53+
[5]: http://chris.beams.io/posts/git-commit/
54+
[4]: https://gitlab.com/pawamoy/mkdocstrings/compare

CREDITS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Credits

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ISC License
2+
3+
Copyright (c) 2019, Timothée Mazzucotelli
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

0 commit comments

Comments
 (0)