chrisimcevoy / pyoda-time

A better date and time API for Python
https://pyodatime.org/
Apache License 2.0
1 stars 0 forks source link

docs: misc sphinx docs tidy-ups #165

Closed chrisimcevoy closed 1 month ago

chrisimcevoy commented 1 month ago

closes #164

This looks much better.

<dl class="py property">
<dt class="sig sig-object py" id="pyoda_time.CalendarSystem.gregorian">
<em class="property"><span class="pre">class</span><span class="w"> </span><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">gregorian</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="#pyoda_time.CalendarSystem" title="pyoda_time.CalendarSystem"><span class="pre">CalendarSystem</span></a></em><a class="headerlink" href="#pyoda_time.CalendarSystem.gregorian" title="Link to this definition">¶</a></dt>
<dd><blockquote>
<div><p>The Gregorian calendar system defines every fourth year as leap, unless the year is divisible by 100 and not by 400. This improves upon the Julian calendar leap year rule.</p>
<p>Although the Gregorian calendar did not exist before 1582 CE, this calendar system assumes it did, thus it is proleptic. This implementation also fixes the start of the year at January 1.</p>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The Gregorian calendar system.</p>
</dd>
</dl>
</dd></dl>

image


While I was in here, I also fixed a sphinx warning that field lists didn't end in an empty line for LocalDateTimePattern.

This was because the :returns: part of the docstring for metaclass properties spanned multiple lines, and each line was getting added as a field in its own right. Fixed now.


I reverted a lot of the sphinx-autodoc and sphinx-apidoc customisation that I'd done previously. The out of the box style just looks better.


I set a sphinx flag to treat warnings as errors, so we should see a build failure in CI now if anything weird happens.


codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.47%. Comparing base (cbb04af) to head (6cc3ab1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #165 +/- ## ========================================== - Coverage 95.47% 95.47% -0.01% ========================================== Files 257 257 Lines 19560 19559 -1 ========================================== - Hits 18675 18674 -1 Misses 885 885 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.