Skip to content

Commit 91762d9

Browse files
authored
Merge pull request #413 from staticdev/docs/myst-docs
Add myst docs
2 parents f23fd47 + d962302 commit 91762d9

20 files changed

+837
-898
lines changed
Lines changed: 19 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
Contributor Covenant Code of Conduct
2-
====================================
1+
# Contributor Covenant Code of Conduct
32

4-
Our Pledge
5-
----------
3+
## Our Pledge
64

75
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.
86

97
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
108

11-
12-
Our Standards
13-
-------------
9+
## Our Standards
1410

1511
Examples of behavior that contributes to a positive environment for our community include:
1612

@@ -31,75 +27,58 @@ Examples of unacceptable behavior include:
3127
- Other conduct which could reasonably be considered inappropriate in a
3228
professional setting
3329

34-
Enforcement Responsibilities
35-
----------------------------
30+
## Enforcement Responsibilities
3631

3732
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.
3833

3934
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.
4035

41-
42-
Scope
43-
-----
36+
## Scope
4437

4538
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.
4639

40+
## Enforcement
4741

48-
Enforcement
49-
-----------
50-
51-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.
42+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at <mailto:[email protected]>. All complaints will be reviewed and investigated promptly and fairly.
5243

5344
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
5445

55-
56-
Enforcement Guidelines
57-
----------------------
46+
## Enforcement Guidelines
5847

5948
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
6049

61-
62-
1. Correction
63-
~~~~~~~~~~~~~
50+
### 1. Correction
6451

6552
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
6653

6754
**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.
6855

69-
70-
2. Warning
71-
~~~~~~~~~~
56+
### 2. Warning
7257

7358
**Community Impact**: A violation through a single incident or series of actions.
7459

7560
**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.
7661

77-
78-
3. Temporary Ban
79-
~~~~~~~~~~~~~~~~
62+
### 3. Temporary Ban
8063

8164
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
8265

8366
**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.
8467

85-
86-
4. Permanent Ban
87-
~~~~~~~~~~~~~~~~
68+
### 4. Permanent Ban
8869

8970
**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.
9071

9172
**Consequence**: A permanent ban from any sort of public interaction within the community.
9273

74+
## Attribution
9375

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.
76+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77+
available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
9978

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
79+
Community Impact Guidelines were inspired by [Mozilla’s code of conduct enforcement ladder](https://github.com/mozilla/diversity).
10380

10481
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.
82+
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
83+
84+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Contributor Guide
2+
3+
Thank you for your interest in improving this project.
4+
This project is open-source under the [MIT license] and
5+
welcomes contributions in the form of bug reports, feature requests, and pull requests.
6+
7+
Here is a list of important resources for contributors:
8+
9+
- [Source Code]
10+
- [Documentation]
11+
- [Issue Tracker]
12+
- [Code of Conduct]
13+
14+
## How to report a bug
15+
16+
Report bugs on the [Issue Tracker].
17+
18+
When filing an issue, make sure to answer these questions:
19+
20+
- Which operating system and Python version are you using?
21+
- Which version of this project are you using?
22+
- What did you do?
23+
- What did you expect to see?
24+
- What did you see instead?
25+
26+
The best way to get your bug fixed is to provide a test case,
27+
and/or steps to reproduce the issue.
28+
29+
## How to request a feature
30+
31+
Request features on the [Issue Tracker].
32+
33+
## How to set up your development environment
34+
35+
You need Python 3.7+ and the following tools:
36+
37+
- [Poetry]
38+
- [Nox]
39+
- [nox-poetry]
40+
41+
Install the package with development requirements:
42+
43+
```console
44+
$ poetry install
45+
```
46+
47+
You can now run an interactive Python session,
48+
or the command-line interface:
49+
50+
```console
51+
$ poetry run python
52+
$ poetry run human-readable
53+
```
54+
55+
## How to test the project
56+
57+
Run the full test suite:
58+
59+
```console
60+
$ nox
61+
```
62+
63+
List the available Nox sessions:
64+
65+
```console
66+
$ nox --list-sessions
67+
```
68+
69+
You can also run a specific Nox session.
70+
For example, invoke the unit test suite like this:
71+
72+
```console
73+
$ nox --session=tests
74+
```
75+
76+
Unit tests are located in the `tests` directory,
77+
and are written using the [pytest] testing framework.
78+
79+
## How to add a new locale
80+
81+
Make sure you have installed a PO Editor, you can easily install that on a Debian-based system with:
82+
83+
```console
84+
apt install poedit
85+
```
86+
87+
To add a new locale you need to execute:
88+
89+
```console
90+
xgettext --from-code=UTF-8 -o human_readable.pot -k'_' -k'N_' -k'P_:1c,2' -l python src/human_readable/*.py # extract new phrases
91+
msginit -i human_readable.pot -o human_readable/locale/<locale name>/LC_MESSAGES/human_readable.po --locale <locale name>
92+
```
93+
94+
Then edit your .po file in the locale folder that got created.
95+
96+
If possible, add tests to `tests/functional/new_locale`. Run them with:
97+
98+
```console
99+
nox -s tests
100+
```
101+
102+
## How to submit changes
103+
104+
Open a [pull request] to submit changes to this project.
105+
106+
Your pull request needs to meet the following guidelines for acceptance:
107+
108+
- The Nox test suite must pass without errors and warnings.
109+
- Include unit tests. This project maintains 100% code coverage.
110+
- If your changes add functionality, update the documentation accordingly.
111+
112+
Feel free to submit early, though—we can always iterate on this.
113+
114+
To run linting and code formatting checks before commiting your change, you can install pre-commit as a Git hook by running the following command:
115+
116+
```console
117+
$ nox --session=pre-commit -- install
118+
```
119+
120+
It is recommended to open an issue before starting work on anything.
121+
This will allow a chance to talk it over with the owners and validate your approach.
122+
123+
<!-- github-only -->
124+
125+
[code of conduct]: CODE_OF_CONDUCT.md
126+
[documentation]: https://human-readable.readthedocs.io/
127+
[issue tracker]: https://github.com/staticdev/human-readable/issues
128+
[mit license]: https://opensource.org/licenses/MIT
129+
[nox]: https://nox.thea.codes/
130+
[nox-poetry]: https://nox-poetry.readthedocs.io/
131+
[poetry]: https://python-poetry.org/
132+
[pull request]: https://github.com/staticdev/human-readable/pulls
133+
[pytest]: https://pytest.readthedocs.io/
134+
[source code]: https://github.com/staticdev/human-readable

CONTRIBUTING.rst

Lines changed: 0 additions & 148 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)