Good news on that test failure: it's not related to your skin problem, and
it's not your machine computing anything wrong.  That test compares my moon
magnitude against the locally installed PyEphem, and PyEphem's lunar
magnitude model was quite crude before version 4.2 — yours (likely Debian's
python3-ephem 4.1.x) says -10.9, modern PyEphem 4.2 says -8.4, agreeing with
my value.  I'll make that test tolerant of older PyEphem versions.
  
The 427 tests that *passed* are actually the interesting part: they show the
Python environment you ran them in computes these durations correctly.  That
makes the answers to the questions in my previous comment — especially
`weectl extension list` and which Python environment weewxd itself runs in — 
the most likely place the answer is hiding.

I answered your first post here on the github issue you filed, but repeating here so others can follow.  The leading hypothesis is that you also have weewx-skyfield-almanac installed; but I’m awaiting your answers to these questions.

Thanks for the report — and for the link to your live page, which helped a lot.

Here is what I can see from your page: everything is being computed correctly
except the durations. Rise, set and transit times, altitudes, azimuths, the
constellations, even the widths of the bars in the day-timeline panel (which
are drawn from the same rise/set times) are all right. Only the durations
derived from the almanac's visible tag — the Daylight line, the "Up for"
column, and the timeline tooltips — show 0h 00m.

I have not been able to reproduce it. I ran the v1.13 code at your
coordinates for July 28/29 under every Skyfield release the extension supports
(1.47 through 1.54, including Debian trixie's Skyfield 1.53 + NumPy 2.2
combination), and visible comes out correct in every case (about 14h56m for
the sun). So the difference must be something about your system, and I'd like
to ask for a few details:

  1. WeeWX version and Python version, and how WeeWX and Skyfield were
    installed (Debian apt packages, or pip into a virtual environment)?
  2. The output of
    python3 -c "import skyfield, numpy; print(skyfield.VERSION, numpy.__version__)"
    using the same Python that runs WeeWX (if pip-installed, activate the venv
    first).
  3. The output of weectl extension list — in particular, is
    weewx-skyfield-almanac or weewx-celestial also installed? Another
    extension that registers its own almanac could be the one actually
    answering these tags.
  4. The weewxd startup log lines that mention Skyfield, e.g.
    sudo journalctl -u weewx | grep -i skyfield
    (the extension logs its own version and the Skyfield version at startup).
  5. Which files you changed or added for your French translation — did you add
    a lang/fr.conf, or edit the template or wxskyfield_sky.py directly?

If you're up for one more test, temporarily add this line anywhere in
skins/Skyfield/index.html.tmpl and report what it prints:

  <p>$almanac.sun.visible.raw</p>

That is the raw number of seconds behind the Daylight line; today it should
print about 53800.

One request in return: the next release will ship a French translation of the
Sky page and of the almanac's body and constellation names (marked Beta —
the words await native-speaker review). Since you know the material and have
already translated the page for yourself, would you be willing to look it
over? I've attached the proposed lang/fr.conf (you will need to unzip it); corrections from a native
speaker would be very welcome, and it should also spare you maintaining your
own translation going forward.

Thanks,
John


On Jul 29, 2026, at 9:40 AM, Jacques Terrettaz <[email protected]> wrote:

John,
I don't know if it is related to my problems with the skin, , but I have a failed comparison when running your test scripts :

====================================================================================================== test session starts =======================================================================================================

platform linux -- Python 3.11.2, pytest-9.1.1, pluggy-1.6.0

rootdir: /home/meteo/weewx-skyfield-main

collected 428 items                                                                                                                                                                                                              


tests/test_almanac.py .........................................................F.......................................................................................................................................... [ 45%]

...........................................................................................................................................................................................                                [ 89%]

tests/test_sky_page.py .............................................                                                                                                                                                       [100%]


============================================================================================================ FAILURES ============================================================================================================

___________________________________________________________________________________ TestPhysicalAttributes.test_magnitudes_agree_with_pyephem ____________________________________________________________________________________


self = <test_almanac.TestPhysicalAttributes object at 0x7fff290fb0d0>, almanac = <weewx.almanac.Almanac object at 0x7fff28c7cd10>


    def test_magnitudes_agree_with_pyephem(self, almanac):

        ephem = pytest.importorskip('ephem')

        observer = pyephem_observer()

        for planet in ('mercury', 'venus', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune',

                       'sun', 'moon', 'pluto'):

            body = getattr(ephem, planet.title())()

            body.compute(observer)

            # PyEphem uses older magnitude models, so agreement is loose.

>           assert getattr(almanac, planet).mag == pytest.approx(body.mag, abs=0.6), planet

E           AssertionError: moon

E           assert np.float64(-8.420329067365575) == -10.9 ± 0.6

E             

E             comparison failed

E             Obtained: -8.420329067365575

E             Expected: -10.9 ± 0.6


tests/test_almanac.py:656: AssertionError

======================================================================================================== warnings summary ========================================================================================================



--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/C72B29DD-F726-4F21-87C8-7E55EF6A63B2%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/A3457398-1DFB-4604-8544-8DA1045326C8%40johnkline.com.

Reply via email to