Skip to content

Commit 82bd5e2

Browse files
author
Chris Cho
authored
Merge pull request #142 from kennethdyer/DOCSP-25995-version
DOCSP-25995 version reference guidelines
2 parents 41a8218 + ecbbb7e commit 82bd5e2

File tree

3 files changed

+121
-3
lines changed

3 files changed

+121
-3
lines changed

source/style-guide/style/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ instructions for applying style conventions.
3737
/style-guide/style/plurals
3838
/style-guide/style/prepositions
3939
/style-guide/style/product-names-version-numbers
40+
/style-guide/style/version
4041
/style-guide/style/punctuation
4142
/style-guide/style/symbols
4243
/style-guide/style/tables

source/style-guide/style/product-names-version-numbers.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _product-names-version-numbers:
22

3-
=================================
4-
Product Names and Version Numbers
5-
=================================
3+
=============
4+
Product Names
5+
=============
66

77
.. default-domain:: mongodb
88

source/style-guide/style/version.txt

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
.. _version-numbers:
2+
3+
===============
4+
Version Numbers
5+
===============
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 2
13+
:class: singlecol
14+
15+
.. |add| replace:: `versionadded <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-versionadded>`__
16+
.. |change| replace:: `versionchanged <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-versionchanged>`__
17+
.. |deprecated| replace:: `deprecated <https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-deprecated>`__
18+
19+
Versions are unique names assigned to product releases that are packaged
20+
with a set of features at a specific point in time.
21+
MongoDB products follow `semantic versioning
22+
<https://en.wikipedia.org/w/index.php?title=Software_versioning&oldid=1147438049>`__
23+
Use version numbers or names to refer to a particular release of a product,
24+
such as identifying when a new feature was introduced or removed.
25+
26+
General Guidelines
27+
------------------
28+
29+
With the exception of release notes and changelogs, which serve as historical
30+
documents, avoid referencing product release versions that we no longer support.
31+
For example, when a release of MongoDB Server reaches End of Life (EOL),
32+
remove references to that release.
33+
34+
You can omit the following release-specific references:
35+
36+
* Features introduced in an EOL release are outdated.
37+
38+
* Features removed in an EOL release are unavailable in all supported releases.
39+
40+
* Features changed in an EOL release represent preexisting behavior in all
41+
supported releases.
42+
43+
44+
Use the following guidelines to reference product versions so that
45+
you can more easily find these references when the release reaches EOL:
46+
47+
* Use version directives whenever possible. The version directives make it
48+
easier to locate on the page and in the {+rst+}:
49+
50+
.. code-block:: rst
51+
52+
.. versionadded:: 6.0
53+
54+
If a version reference needs more explanation, add the content
55+
to the directive block:
56+
57+
.. code-block:: rst
58+
59+
.. versionchanged:: 4.4
60+
61+
This command returns the following output:
62+
63+
If you need to call out multiple versions, set the most recent version
64+
first, then reference the others in a phrase afterwards.
65+
66+
.. code-block:: rst
67+
68+
.. versionadded:: 6.0 *(Also available in MongoDB 5.0.)*
69+
70+
The italics marker matches the directive output.
71+
72+
Snooty supports the following version directives:
73+
74+
.. hlist::
75+
:columns: 3
76+
77+
* |add|
78+
* |change|
79+
* |deprecated|
80+
81+
* To refer to a version inline, include the product
82+
name before the version number, (for example, ``MongoDB 5.0``). This ensures
83+
that a search for version numbers correctly matches product and release.
84+
85+
* Do **not** reference versions freeform or with the phrase ``version X.X``.
86+
These references are much harder to identify programmatically as references
87+
to a specific product version.
88+
89+
Identify EOL Releases
90+
---------------------
91+
92+
You can find references to EOL releases of MonogDB using grep:
93+
94+
.. code-block:: shell
95+
96+
$ grep -nRI \
97+
-e ".. versionadded:: [0-9]" \
98+
-e ".. versionchanged:: [0-9]" \
99+
-e ".. deprecated:: [0-9]" \
100+
-e "MongoDB [0-9]" \
101+
source | \
102+
grep -v "6\.2" | \
103+
grep -v "6\.1" | \
104+
grep -v "6\.0" | \
105+
grep -v "5\.3" | \
106+
grep -v "5\.1" | \
107+
grep -v "5\.0" | \
108+
grep -v "4\.4" | \
109+
grep -v "4\.2" | \
110+
grep -v "source/release-notes"
111+
source/sharding.txt:128:- In MongoDB 4.0 and earlier, a document's shard key field value is
112+
source/sharding.txt:351: Starting in MongoDB 4.0.3, setting up zones and zone ranges *before*
113+
source/sharding.txt:379:Starting in MongoDB 3.6, :doc:`change streams </changeStreams>` are
114+
...
115+
116+
Whenever a release goes EOL, remove the relevant ``grep -v`` line to ensure that
117+
its version references begin to appear in the results.

0 commit comments

Comments
 (0)