@@ -56,9 +56,16 @@ library. Keeping new feature requests implemented as third party extensions
56
56
allows us to keep the maintenance overhead of Python-Markdown to a minimum, so
57
57
that the focus can be on continued stability, bug fixes, and documentation.
58
58
59
- Closing an issue does not necessarily mean the end of a discussion. If you
60
- believe your issue has been closed incorrectly, explain why and we'll consider
61
- if it needs to be reopened.
59
+ If you intend to submit a fix for your bug or provide an implementation of your
60
+ feature request, it is not necessary to first open an issue. You can report a
61
+ bug or make a feature request as part of a pull request. Of course, if you want
62
+ to receive feedback on how to implement a bug-fix or feature before submitting
63
+ a solution, then it would be appropriate to open an issue first and ask your
64
+ questions there.
65
+
66
+ Having your issue closed does not necessarily mean the end of a discussion. If
67
+ you believe your issue has been closed incorrectly, explain why and we'll
68
+ consider if it needs to be reopened.
62
69
63
70
## Pull Requests
64
71
@@ -99,6 +106,12 @@ GitHub interface to ensure that all tests are running as expected. If any checks
99
106
fail, you may push additional commits to your branch. GitHub will add those
100
107
commits to the pull request and rerun the checks.
101
108
109
+ It is generally best not to squash multiple commits and force-push your changes
110
+ to a pull request. Instead, the maintainers would like to be able to follow the
111
+ series of commits along with the discussion about those changes as they
112
+ progress over time. If your pull request is accepted, it will be squashed at
113
+ that time if deemed appropriate.
114
+
102
115
## Style Guides
103
116
104
117
In an effort to maintain consistency, Python-Markdown adheres to the following
@@ -224,6 +237,34 @@ Python-Markdown's [Admonition Extension]:
224
237
This is the content of the note.
225
238
```
226
239
240
+ #### Release Notes
241
+
242
+ Any commit/pull request which changes the behavior of the Markdown library in
243
+ any way must include an entry in the release notes. If a change only alters the
244
+ documentation or tooling for the project, then an entry in the release notes is
245
+ not necessary. The release notes can be found at ` docs/change_log ` .
246
+
247
+ Each release must have an entry in ` docs/change_log/index.md ` which follows the
248
+ format of the existing entries. A MAJOR release (` X.0.0 ` ) and a MINOR release
249
+ (` X.X.0 ` ) should only include a single line in ` docs/change_log/index.md ` which
250
+ links to a full document outlining all changes included in the release.
251
+ However, a PATCH release (X.X.X) should include a list of single line entries
252
+ summarizing each change directly in the file ` docs/change_log/index.md ` (see
253
+ [ Versions] ( #versions ) for an explanation of MAJOR, MINOR, and PATCH releases).
254
+ The description of each change should include a reference to the relevant
255
+ GitHub issue in the format ` #123 ` (where ` 123 ` is the issue number).
256
+
257
+ Prior to a version being released, the text ` *under development* ` should be
258
+ used as a placeholder for the release date. That text will be replaced with the
259
+ release date as part of the [ release process] ( #release-process ) .
260
+
261
+ If a change is the first since the last release, then the appropriate entries
262
+ and/or files may need to be created and included in a pull request. A pull
263
+ request should not alter an entry for an existing version which has already
264
+ been released, unless it is editing an error in the release notes for that
265
+ version, or is otherwise expressly deemed appropriate by the project
266
+ maintainers.
267
+
227
268
### Commit Message Style Guide
228
269
229
270
Use the present tense ("Add feature" not "Added feature").
@@ -280,7 +321,7 @@ working copy into the environment in [Development Mode] after activating the
280
321
virtual environment for the first time:
281
322
282
323
``` sh
283
- pip install --editable .
324
+ pip install -e .
284
325
```
285
326
286
327
Now any saved changes will immediately be available within the virtual
@@ -292,29 +333,63 @@ You can run the command line script with the following command:
292
333
python -m markdown
293
334
```
294
335
336
+ Before building the documentation for the first time, you will need to install
337
+ some optional dependencies with the command:
338
+
339
+ ``` sh
340
+ pip install -e .[docs]
341
+ ```
342
+
343
+ To build the documentation and serve it locally on a development server, run:
344
+
345
+ ``` sh
346
+ mkdocs serve
347
+ ```
348
+
349
+ Then point your browser at ` http://127.0.0.1:8000/ ` . For a complete list of
350
+ options available, view MkDocs' help with the command:
351
+
352
+ ``` sh
353
+ mkdocs --help
354
+ ```
355
+
356
+ Before running tests for the first time, you will need to install some optional
357
+ dependencies with the command:
358
+
359
+ ``` sh
360
+ pip install -e .[testing]
361
+ ```
362
+
295
363
And you can directly run the tests with:
296
364
297
365
``` sh
298
366
python -m unittest discover tests
299
367
```
300
368
369
+ To get a coverage report after running the tests, use these commands instead:
370
+
371
+ ``` sh
372
+ coverage run --source=markdown -m unittest discover tests
373
+ coverage report --show-missing
374
+ ```
375
+
301
376
!!! note
302
377
303
378
Some tests require the [PyTidyLib] library, which depends on the [HTML Tidy]
304
379
library. If you do not have PyTidyLib installed, the tests which depend upon
305
380
it will be skipped. Given the difficulty in installing the HTML Tidy library
306
381
on many systems, you may choose to leave both libraries uninstalled and
307
- depend on the Travis server to run those tests when you submit a pull
308
- request.
382
+ depend on the continuous integration server to run those tests when you
383
+ submit a pull request.
309
384
310
385
The above setup will only run tests against the code in one version of Python.
311
386
However, Python-Markdown supports multiple versions of Python. Therefore, a
312
387
[ tox] configuration is included in the repository, which includes test
313
388
environments for all supported Python versions, a [ Flake8] test environment, and
314
389
a spellchecker for the documentation. While it is generally fine to leave those
315
- tests for the Travis server to run when a pull request is submitted, for more
316
- advanced changes, you may want to run those tests locally. To do so, simply
317
- install tox:
390
+ tests for the continuous integration server to run when a pull request is
391
+ submitted, for more advanced changes, you may want to run those tests locally.
392
+ To do so, simply install tox:
318
393
319
394
``` sh
320
395
pip install tox
@@ -337,7 +412,7 @@ with no arguments. See help (`tox -h`) for more options.
337
412
338
413
!!! seealso "See Also"
339
414
340
- Python-Markdown provides [test tools] which simply testing Markdown syntax.
415
+ Python-Markdown provides [test tools] which simply test Markdown syntax.
341
416
Understanding those tools will often help in understanding why a test may be
342
417
failing.
343
418
0 commit comments