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: en/next/_sources/contributing.md.txt
+17-9Lines changed: 17 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Third party pull requests help expand pyinfra's functionality and are essential
13
13
14
14
## Branches
15
15
16
-
+ There is a branch per major version, ie `2.x`, that tracks the latest release of that version
16
+
+ There is a branch per major version, ie `3.x`, that tracks the latest release of that version
17
17
+ Changes should generally be based off the latest major branch, unless fixing an old version
18
18
19
19
## Dev Setup
@@ -30,15 +30,27 @@ cd pyinfra
30
30
pip install -e '.[dev]'
31
31
```
32
32
33
-
## Tests
33
+
### Code Style & Type Checking
34
34
35
-
GitHub will run all the test suites as part of any pull requests, here's how you can run them locally:
35
+
Code style is enforced via Black, isort and flake8. Types are checked with mypy currently, and pyright is recommended for local development though currently optional. There is a script to run the linting & type-checking:
36
36
37
-
### Unit Tests
37
+
```sh
38
+
scripts/dev-lint.sh
39
+
```
40
+
41
+
### Tests
42
+
43
+
GitHub will run all the test suites as part of any pull requests. There's a handy script that runs the unit tests:
44
+
45
+
```sh
46
+
scripts/dev-test.sh
47
+
```
48
+
49
+
#### Unit Tests
38
50
39
51
Use `pytest` to run the unit tests, or `pytest --cov` to run with coverage. Pull requests are expected to be tested and not drop overall project coverage by >1%.
40
52
41
-
### End to End Tests
53
+
#### End to End Tests
42
54
43
55
The end to end tests are also executed via `pytest` but not selected by default, options/usage:
44
56
@@ -64,7 +76,3 @@ To view ([localhost:8000](http://localhost:8000)):
64
76
```sh
65
77
python -m http.server -d docs/build/
66
78
```
67
-
68
-
## Code Style
69
-
70
-
Code is linted using `flake8` and uses the `black` / `isort` codestyles. To check you can just run `flake8` from the root directory.
<p>Operations can also call other operations using <codeclass="docutils literal notranslate"><spanclass="pre">yield</span><spanclass="pre">from</span></code> syntax:</p>
@@ -161,7 +159,7 @@ <h2>Guides<a class="headerlink" href="#guides" title="Permalink to this heading"
161
159
<divclass="section" id="branches">
162
160
<h2>Branches<aclass="headerlink" href="#branches" title="Permalink to this heading">¶</a></h2>
163
161
<ulclass="simple">
164
-
<li>There is a branch per major version, ie <codeclass="docutils literal notranslate"><spanclass="pre">2.x</span></code>, that tracks the latest release of that version</li>
162
+
<li>There is a branch per major version, ie <codeclass="docutils literal notranslate"><spanclass="pre">3.x</span></code>, that tracks the latest release of that version</li>
165
163
<li>Changes should generally be based off the latest major branch, unless fixing an old version</li>
166
164
</ul>
167
165
</div>
@@ -178,16 +176,25 @@ <h2>Dev Setup<a class="headerlink" href="#dev-setup" title="Permalink to this he
<h3>Code Style & Type Checking<aclass="headerlink" href="#code-style-type-checking" title="Permalink to this heading">¶</a></h3>
181
+
<p>Code style is enforced via Black, isort and flake8. Types are checked with mypy currently, and pyright is recommended for local development though currently optional. There is a script to run the linting & type-checking:</p>
<h3>Unit Tests<aclass="headerlink" href="#unit-tests" title="Permalink to this heading">¶</a></h3>
193
+
<h4>Unit Tests<aclass="headerlink" href="#unit-tests" title="Permalink to this heading">¶</a></h4>
187
194
<p>Use <codeclass="docutils literal notranslate"><spanclass="pre">pytest</span></code> to run the unit tests, or <codeclass="docutils literal notranslate"><spanclass="pre">pytest</span><spanclass="pre">--cov</span></code> to run with coverage. Pull requests are expected to be tested and not drop overall project coverage by >1%.</p>
188
195
</div>
189
196
<divclass="section" id="end-to-end-tests">
190
-
<h3>End to End Tests<aclass="headerlink" href="#end-to-end-tests" title="Permalink to this heading">¶</a></h3>
197
+
<h4>End to End Tests<aclass="headerlink" href="#end-to-end-tests" title="Permalink to this heading">¶</a></h4>
191
198
<p>The end to end tests are also executed via <codeclass="docutils literal notranslate"><spanclass="pre">pytest</span></code> but not selected by default, options/usage:</p>
192
199
<divclass="highlight-sh notranslate"><divclass="highlight"><pre><span></span><spanclass="c1"># Run local e2e tests (works on Linux / MacOS, no Windows yet)</span>
@@ -199,6 +206,7 @@ <h3>End to End Tests<a class="headerlink" href="#end-to-end-tests" title="Permal
199
206
</div>
200
207
</div>
201
208
</div>
209
+
</div>
202
210
<divclass="section" id="generate-documentation">
203
211
<h2>Generate Documentation<aclass="headerlink" href="#generate-documentation" title="Permalink to this heading">¶</a></h2>
204
212
<p>To generate:</p>
@@ -210,10 +218,6 @@ <h2>Generate Documentation<a class="headerlink" href="#generate-documentation" t
210
218
</pre></div>
211
219
</div>
212
220
</div>
213
-
<divclass="section" id="code-style">
214
-
<h2>Code Style<aclass="headerlink" href="#code-style" title="Permalink to this heading">¶</a></h2>
215
-
<p>Code is linted using <codeclass="docutils literal notranslate"><spanclass="pre">flake8</span></code> and uses the <codeclass="docutils literal notranslate"><spanclass="pre">black</span></code> / <codeclass="docutils literal notranslate"><spanclass="pre">isort</span></code> codestyles. To check you can just run <codeclass="docutils literal notranslate"><spanclass="pre">flake8</span></code> from the root directory.</p>
Copy file name to clipboardExpand all lines: en/next/getting-started.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ <h3>Navigation</h3>
141
141
<divclass="section" id="getting-started">
142
142
<h1>Getting Started<aclass="headerlink" href="#getting-started" title="Permalink to this heading">¶</a></h1>
143
143
<p>This guide should help describe the basics of deploying stuff with pyinfra. Start by installing pyinfra with <codeclass="docutils literal notranslate"><spanclass="pre">pip</span></code> (see <aclass="reference internal" href="install.html"><spanclass="doc">full install instructions</span></a>):</p>
0 commit comments