Skip to content

Commit de606cd

Browse files
Merge pull request #557 from aai-institute/doc/version-added-documentation
Add section to contributing guide about adding notes for new features…
2 parents 04076cd + 49bfa1d commit de606cd

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
[PR #543](https://github.com/aai-institute/pyDVL/pull/543)
1414
- Glossary of data valuation and influence terms in the documentation
1515
[PR #537](https://github.com/aai-institute/pyDVL/pull/537
16+
- Documentation about writing notes for new features, changes or deprecations.
17+
[PR #557](https://github.com/aai-institute/pyDVL/pull/557)
1618

1719
### Fixed
1820

CONTRIBUTING.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,58 @@ that a link will remain valid, add a custom anchor to the section title:
314314
(note the space after the opening brace). You can then refer to it within
315315
another markdown file with `[Some section][permanent-anchor-to-some-section]`.
316316

317+
### Adding notes about new features, changes or deprecations
318+
319+
We use the admonition extension of
320+
[Mkdocs Material](https://squidfunk.github.io/mkdocs-material/reference/admonitions/)
321+
to create admonitions, also known as call-outs, that hold information
322+
about when a certain feature was added, changed or deprecated and optionally
323+
a description with more details. We put the admonition directly
324+
in a module's, a function's or class' docstring.
325+
326+
We use the following syntax:
327+
328+
```
329+
!!! tip "<Event Type> in version <Version Number>"
330+
331+
<Optional Description>
332+
```
333+
334+
The description is useful when the note is about a smaller change
335+
such as a parameter.
336+
337+
- For a new feature, we use:
338+
339+
```
340+
!!! tip "New in version <Version Number>"
341+
342+
<Optional Description>
343+
```
344+
345+
- For a change to an existing feature we use:
346+
347+
```
348+
!!! tip "Changed in version <Version Number>"
349+
350+
<Optional Description>
351+
```
352+
353+
For example, for a change in version `1.2.3` that adds kwargs
354+
to a class' constructor we would write:
355+
356+
```
357+
!!! tip "Changed in version 1.2.3"
358+
359+
Added kwargs to the constructor.
360+
```
361+
362+
- For a deprecation we use:
363+
364+
```
365+
!!! tip "Deprecated in version <Version Number>"
366+
367+
<Optional Description>
368+
```
317369

318370
### Using bibliography
319371

0 commit comments

Comments
 (0)