Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port CHANGELOG.md -> CHANGELOG.rst #254

Merged
merged 2 commits into from
Apr 20, 2020

Conversation

ErlendHaa
Copy link
Contributor

The release of sphinx 3.0.0 removed some functions that's been
deprecated since v1.4. This made the sphinx-extension 'm2r' break. We
use m2r to include .md files in the sphinx-docs. Although a PR that
seemingly solves the problem is proposed [1], the sole developer of m2r
has not been active in a while. It's unknown when and if this fix will
be merge and even if, having a dependency on a unmaintained project like
m2r makes me feel a bit uneasy.

The ideal action would be to use 'recommonmark' for our .md files.
However, sphinx and recommonmark does not play nice when the .md files
is out of directory, i.e. outside python/docs [2].

That leaves us with two options, either pinning the sphinx version <
3.0.0 and wait for better days, with regards better sphinx/recommonmarks
support, or port the CHANGELOG to rst. As it's unknown whether [2] will
actually see the day of light or not, porting seems most reasonable at
this point in time.

To mention it, there is a bias against using .rst for CHANGELOGs and
READMEs in the community, with the main points being; 'people are
generally more familiar. md' and '.md is easier and faster to write'.
But with a already well-defined structure to our CHANGELOG, the overhead
is minimal.

[1] miyakogi/m2r#55
[2] sphinx-doc/sphinx#7000

@ErlendHaa ErlendHaa force-pushed the port-changelog-to-rst branch 2 times, most recently from b9f7018 to 2977525 Compare April 17, 2020 08:45
Copy link
Contributor

@achaikou achaikou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

python/docs/conf.py Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
The release of sphinx 3.0.0 removed some functions that's been
deprecated since v1.4. This made the sphinx-extension 'm2r' break. We
use m2r to include .md files in the sphinx-docs. Although a PR that
seemingly solves the problem is proposed [1], the sole developer of m2r
has not been active in a while. It's unknown when and if this fix will
be merge and even if, having a dependency on a unmaintained project like
m2r makes me feel a bit uneasy.

The ideal action would be to use 'recommonmark' for our .md files.
However, sphinx and recommonmark does not play nice when the .md files
is out of directory, i.e. outside python/docs [2].

That leaves us with two options, either pinning the sphinx version to
<v3.0.0 and wait for better days, with regards to better
sphinx/recommonmarks support, or port the CHANGELOG to rst. As it's
unknown whether [2] will actually see the day of light or not, porting
seems most reasonable at this point in time.

To mention it, there is a bias against using .rst for CHANGELOGs and
READMEs in the community, with the main points being that people are
generally more familiar with .md and that .md is easier and faster to
write.  But with a already well-defined structure to our CHANGELOG, the
overhead is minimal.

[1] miyakogi/m2r#55
[2] sphinx-doc/sphinx#7000
These properties were documented first in the class-docstring under the
section Attributes, and then again with a property docstring. According
to the numpy styleguide [1] which we try to follow, this is good
practice. However, it turns out that prior to sphinx v3.0.0 these are
rendered twice, and from v3.0.0 an warning is issued. We deliberately
fail out CI-pipeline on any warnings, hence we caught this now.

[1] https://numpydoc.readthedocs.io/en/latest/format.html#class-docstring
@ErlendHaa ErlendHaa force-pushed the port-changelog-to-rst branch 2 times, most recently from 7853214 to 82b1ee7 Compare April 20, 2020 06:17
@ErlendHaa ErlendHaa merged commit beb24f5 into equinor:master Apr 20, 2020
@ErlendHaa ErlendHaa deleted the port-changelog-to-rst branch May 15, 2020 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants