Skip to content
This repository was archived by the owner on Feb 13, 2021. It is now read-only.

Commit 40d8ac1

Browse files
author
staticdev
committed
Add Readthedocs
1 parent 07c5dd1 commit 40d8ac1

17 files changed

Lines changed: 938 additions & 225 deletions

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
select = ANN,B,B9,BLK,C,D,DAR,E,F,S,W
2+
select = ANN,B,B9,BLK,C,D,DAR,E,F,RST,S,W
33
ignore = E203,E501,W503
44
max-line-length = 80
55
max-complexity = 10

.github/dependabot.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ updates:
44
directory: "/"
55
schedule:
66
interval: daily
7-
time: "09:00"
8-
open-pull-requests-limit: 10
97
- package-ecosystem: pip
10-
directory: "/"
8+
directory: "/.github/workflows"
119
schedule:
1210
interval: daily
13-
time: "09:00"
14-
open-pull-requests-limit: 10
1511
- package-ecosystem: pip
16-
directory: "/.github/workflows"
12+
directory: "/docs"
13+
schedule:
14+
interval: daily
15+
- package-ecosystem: pip
16+
directory: "/"
1717
schedule:
1818
interval: daily
19-
time: "09:00"
20-
open-pull-requests-limit: 10

.github/workflows/tests.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- { python-version: 3.8, os: windows-latest, session: "tests" }
2222
- { python-version: 3.8, os: macos-latest, session: "tests" }
2323
- { python-version: 3.8, os: ubuntu-latest, session: "typeguard" }
24-
# - { python-version: 3.8, os: ubuntu-latest, session: "docs" }
24+
- { python-version: 3.8, os: ubuntu-latest, session: "docs" }
2525

2626
env:
2727
NOXSESSION: ${{ matrix.session }}
@@ -76,14 +76,14 @@ jobs:
7676
7777
- name: Run Nox
7878
run: |
79-
nox --force-color
80-
81-
# - name: Upload documentation
82-
# if: matrix.session == 'docs'
83-
# uses: actions/upload-artifact@v2
84-
# with:
85-
# name: docs
86-
# path: docs/_build
79+
nox --force-color --python=${{ matrix.python-version }}
80+
81+
- name: Upload documentation
82+
if: matrix.session == 'docs'
83+
uses: actions/upload-artifact@v2
84+
with:
85+
name: docs
86+
path: docs/_build
8787

8888
- name: Create coverage report
8989
if: always() && matrix.session == 'tests'

.readthedocs.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
sphinx:
3+
configuration: docs/conf.py
4+
formats: all
5+
python:
6+
version: 3.8
7+
install:
8+
- requirements: docs/requirements.txt
9+
- path: .

CODE_OF_CONDUCT.rst

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
Contributor Covenant Code of Conduct
2+
====================================
3+
4+
Our Pledge
5+
----------
6+
7+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
8+
9+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
10+
11+
12+
Our Standards
13+
-------------
14+
15+
Examples of behavior that contributes to a positive environment for our community include:
16+
17+
- Demonstrating empathy and kindness toward other people
18+
- Being respectful of differing opinions, viewpoints, and experiences
19+
- Giving and gracefully accepting constructive feedback
20+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
21+
- Focusing on what is best not just for us as individuals, but for the overall community
22+
23+
Examples of unacceptable behavior include:
24+
25+
- The use of sexualized language or imagery, and sexual attention or
26+
advances of any kind
27+
- Trolling, insulting or derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or email
30+
address, without their explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
Enforcement Responsibilities
35+
----------------------------
36+
37+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
38+
39+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
40+
41+
42+
Scope
43+
-----
44+
45+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
46+
47+
48+
Enforcement
49+
-----------
50+
51+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at thiagocavila@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
52+
53+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
54+
55+
56+
Enforcement Guidelines
57+
----------------------
58+
59+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
60+
61+
62+
1. Correction
63+
~~~~~~~~~~~~~
64+
65+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
66+
67+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
68+
69+
70+
2. Warning
71+
~~~~~~~~~~
72+
73+
**Community Impact**: A violation through a single incident or series of actions.
74+
75+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
76+
77+
78+
3. Temporary Ban
79+
~~~~~~~~~~~~~~~~
80+
81+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
82+
83+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
84+
85+
86+
4. Permanent Ban
87+
~~~~~~~~~~~~~~~~
88+
89+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
90+
91+
**Consequence**: A permanent ban from any sort of public interaction within the community.
92+
93+
94+
Attribution
95+
-----------
96+
97+
This Code of Conduct is adapted from the `Contributor Covenant <homepage_>`__, version 2.0,
98+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
99+
100+
Community Impact Guidelines were inspired by `Mozilla’s code of conduct enforcement ladder <https://github.com/mozilla/diversity>`__.
101+
102+
.. _homepage: https://www.contributor-covenant.org
103+
104+
For answers to common questions about this code of conduct, see the FAQ at
105+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

CONTRIBUTING.rst

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
Contributor Guide
2+
=================
3+
4+
Thank you for your interest in improving this project.
5+
This project is open-source under the `MIT license`_ and
6+
welcomes contributions in the form of bug reports, feature requests, and pull requests.
7+
8+
Here is a list of important resources for contributors:
9+
10+
- `Source Code`_
11+
- `Documentation`_
12+
- `Issue Tracker`_
13+
- `Code of Conduct`_
14+
15+
.. _MIT license: https://opensource.org/licenses/MIT
16+
.. _Source Code: https://github.com/staticdev/humanizer-portugues
17+
.. _Documentation: https://humanizer-portugues.readthedocs.io/
18+
.. _Issue Tracker: https://github.com/staticdev/humanizer-portugues/issues
19+
20+
How to report a bug
21+
-------------------
22+
23+
Report bugs on the `Issue Tracker`_.
24+
25+
When filing an issue, make sure to answer these questions:
26+
27+
- Which operating system and Python version are you using?
28+
- Which version of this project are you using?
29+
- What did you do?
30+
- What did you expect to see?
31+
- What did you see instead?
32+
33+
The best way to get your bug fixed is to provide a test case,
34+
and/or steps to reproduce the issue.
35+
36+
37+
How to request a feature
38+
------------------------
39+
40+
Request features on the `Issue Tracker`_.
41+
42+
43+
How to set up your development environment
44+
------------------------------------------
45+
46+
You need Python 3.6+ and the following tools:
47+
48+
- Poetry_
49+
- Nox_
50+
51+
Install the package with development requirements:
52+
53+
.. code:: console
54+
55+
$ poetry install
56+
57+
You can now run an interactive Python session,
58+
or the command-line interface:
59+
60+
.. code:: console
61+
62+
$ poetry run python
63+
$ poetry run humanizer-portugues
64+
65+
.. _Poetry: https://python-poetry.org/
66+
.. _Nox: https://nox.thea.codes/
67+
68+
69+
How to test the project
70+
-----------------------
71+
72+
Run the full test suite:
73+
74+
.. code:: console
75+
76+
$ nox
77+
78+
List the available Nox sessions:
79+
80+
.. code:: console
81+
82+
$ nox --list-sessions
83+
84+
You can also run a specific Nox session.
85+
For example, invoke the unit test suite like this:
86+
87+
.. code:: console
88+
89+
$ nox --session=tests
90+
91+
Unit tests are located in the ``tests`` directory,
92+
and are written using the pytest_ testing framework.
93+
94+
.. _pytest: https://pytest.readthedocs.io/
95+
96+
97+
How to submit changes
98+
---------------------
99+
100+
Open a `pull request`_ to submit changes to this project.
101+
102+
Your pull request needs to meet the following guidelines for acceptance:
103+
104+
- The Nox test suite must pass without errors and warnings.
105+
- Include unit tests. This project maintains 100% code coverage.
106+
- If your changes add functionality, update the documentation accordingly.
107+
108+
Feel free to submit early, though—we can always iterate on this.
109+
110+
You can ensure that your changes adhere to the code style by reformatting with Black_:
111+
112+
.. code:: console
113+
114+
$ nox --session=black
115+
116+
It is recommended to open an issue before starting work on anything.
117+
This will allow a chance to talk it over with the owners and validate your approach.
118+
119+
.. _pull request: https://github.com/staticdev/humanizer-portugues/pulls
120+
.. _Black: https://black.readthedocs.io/
121+
.. github-only
122+
.. _Code of Conduct: CODE_OF_CONDUCT.rst
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MIT License
2+
===========
23

3-
Copyright (c) 2018 Thiago C. D'Ávila
4+
Copyright © 2020 Thiago Carvalho D'Ávila
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal
@@ -12,10 +13,10 @@ furnished to do so, subject to the following conditions:
1213
The above copyright notice and this permission notice shall be included in all
1314
copies or substantial portions of the Software.
1415

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.
16+
**The software is provided "as is", without warranty of any kind, express or
17+
implied, including but not limited to the warranties of merchantability,
18+
fitness for a particular purpose and noninfringement. In no event shall the
19+
authors or copyright holders be liable for any claim, damages or other
20+
liability, whether in an action of contract, tort or otherwise, arising from,
21+
out of or in connection with the software or the use or other dealings in the
22+
software.**

0 commit comments

Comments
 (0)