question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

3.2rc1 Doctest failure in timeseries

See original GitHub issue

This is maybe related to the use of scipy 1.3.0rc2, I don’t see this failure on another computer with scipy 1.2.1.

===================================== test session starts =====================================
platform linux -- Python 3.7.2, pytest-4.4.2, py-1.8.0, pluggy-0.11.0

Running tests with Astropy version 4.0.dev24575.
Running tests in astropy docs.

Date: 2019-05-10T10:13:56

Platform: Linux-5.0.13-arch1-1-ARCH-x86_64-with-arch

Executable: /home/simon/.pyenv/versions/3.7.2/bin/python

Full Python Version: 
3.7.2 (default, Jan 18 2019, 23:38:59) 
[GCC 8.2.1 20181127]

encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Numpy: 1.16.3
Scipy: 1.3.0rc2
Matplotlib: 3.0.3
h5py: 2.9.0
Pandas: 0.24.2
Cython: 0.29.7
Scikit-image: 0.15.0
astropy_helpers: 3.1rc1
Using Astropy options: remote_data: any.

_____________________________ [doctest] docs/timeseries/index.rst _____________________________
[gw2] linux -- Python 3.7.2 /home/simon/.pyenv/versions/3.7.2/bin/python
263    from astropy.stats import sigma_clipped_stats
264    mean, median, stddev = sigma_clipped_stats(ts_folded['sap_flux'])
265    ts_folded['sap_flux_norm'] = ts_folded['sap_flux'] / median
266 
267 and we can downsample the time series by binning the points into bins of equal
268 time - this returns a |BinnedTimeSeries|::
269 
270     >>> from astropy.timeseries import aggregate_downsample
271     >>> ts_binned = aggregate_downsample(ts_folded, time_bin_size=0.03 * u.day)  # doctest: +REMOTE_DATA
272     >>> ts_binned  # doctest: +FLOAT_CMP +REMOTE_DATA
Differences (unified diff with -expected +actual):
    @@ -1,25 +1,48 @@
     <BinnedTimeSeries length=74>
    -   time_bin_start     time_bin_size    ...   sap_flux_norm
    -                            s          ...
    -       object            float64       ...       float64
    -------------------- ------------------ ... ------------------
    --1.1022116370482966             2592.0 ... 0.9998741745948792
    --1.0722116370482966             2592.0 ... 0.9999074339866638
    --1.0422116370482966             2592.0 ...  0.999972939491272
    --1.0122116370482965             2592.0 ... 1.0000077486038208
    --0.9822116370482965             2592.0 ... 0.9999921917915344
    --0.9522116370482965             2592.0 ... 1.0000101327896118
    --0.9222116370482966             2592.0 ... 1.0000121593475342
    --0.8922116370482965             2592.0 ... 0.9999905228614807
    --0.8622116370482965 2592.0000000000023 ... 1.0000263452529907
    -                ...                ... ...                ...
    - 0.8177883629517035 2591.9999999999977 ... 1.0000624656677246
    - 0.8477883629517035 2592.0000000000014 ... 1.0000633001327515
    - 0.8777883629517035  2592.000000000019 ... 1.0000433921813965
    - 0.9077883629517037 2591.9999999999814 ...  1.000024676322937
    - 0.9377883629517034   2592.00000000002 ... 1.0000224113464355
    - 0.9677883629517037  2591.999999999981 ... 1.0000698566436768
    - 0.9977883629517035             2592.0 ... 0.9999606013298035
    - 1.0277883629517035             2592.0 ... 0.9999635815620422
    - 1.0577883629517035             2592.0 ... 0.9999105930328369
    - 1.0877883629517036 2592.0000000000095 ... 0.9998687505722046
    +   time_bin_start     time_bin_size    ...        pos_corr2          sap_flux_norm
    +                            s          ...           pix
    +       object            float64       ...         float64              float64
    +------------------- ------------------ ... ----------------------- ------------------
    +-1.1022116370482966             2592.0 ...  0.00031207725987769663 0.9998741745948792
    +-1.0722116370482966             2592.0 ...  0.00041217938996851444 0.9999074339866638
    +-1.0422116370482966             2592.0 ...  0.00039273229776881635  0.999972939491272
    +-1.0122116370482965             2592.0 ...   0.0002928022004198283 1.0000077486038208
    +-0.9822116370482965             2592.0 ...   0.0003891147789545357 0.9999921917915344
    +-0.9522116370482965             2592.0 ...   0.0003491091774776578 1.0000101327896118
    +-0.9222116370482966             2592.0 ...   0.0002824827388394624 1.0000121593475342
    +-0.8922116370482965             2592.0 ...  0.00016335179680027068 0.9999905228614807
    +-0.8622116370482965 2592.0000000000023 ...   0.0001397567830281332 1.0000263452529907
    +-0.8322116370482965 2591.9999999999977 ... -0.00014221783203538507  1.000070333480835
    +-0.8022116370482966 2592.0000000000023 ...  -9.427832264918834e-05 1.0000371932983398
    +-0.7722116370482965             2592.0 ... -0.00017664248298387975 1.0000463724136353
    +-0.7422116370482965 2592.0000000000023 ... -0.00012228667037561536 1.0000810623168945
    +-0.7122116370482965 2591.9999999999927 ...  -0.0001244118611793965 1.0000311136245728
    +-0.6822116370482966 2592.0000000000023 ...  -8.055769285419956e-05 1.0000026226043701
    +-0.6522116370482965 2592.0000000000023 ...  -0.0001010842970572412  1.000022530555725
    +-0.6222116370482965 2592.0000000000023 ...   -7.21014293958433e-06  1.000044822692871
    +-0.5922116370482965 2591.9999999999927 ...   8.348121627932414e-05 0.9999921917915344
    +-0.5622116370482966 2592.0000000000023 ...   9.918524301610887e-05 0.9999784827232361
    +-0.5322116370482965 2592.0000000000023 ...    6.90473461872898e-05 1.0000337362289429
    +-0.5022116370482965 2592.0000000000023 ...  0.00013223491259850562 1.0000052452087402
    +                ...                ... ...                     ...                ...
    +0.48778836295170347 2592.0000000000023 ...  0.00011087083112215623 1.0000249147415161
    + 0.5177883629517035 2592.0000000000023 ...   0.0001466787070967257 1.0000004768371582
    + 0.5477883629517035 2591.9999999999927 ...  0.00022175510821398348 1.0000418424606323
    + 0.5777883629517034 2592.0000000000023 ...   0.0001385248324368149 1.0000243186950684
    + 0.6077883629517035 2592.0000000000023 ...   7.515603647334501e-05 1.0000287294387817
    + 0.6377883629517035 2591.9999999999977 ...   0.0001684143499005586 1.0000258684158325
    + 0.6677883629517034 2591.9999999999977 ...  0.00011036244541173801 1.0000230073928833
    + 0.6977883629517034 2592.0000000000023 ...  0.00012551579857245088 1.0000182390213013
    + 0.7277883629517035             2592.0 ...   0.0002313474251423031 1.0000282526016235
    + 0.7577883629517035             2592.0 ...  0.00027140387101098895 1.0000109672546387
    + 0.7877883629517035 2592.0000000000023 ...  0.00011987287871306762 1.0000824928283691
    + 0.8177883629517035 2591.9999999999977 ... -2.2798192730988376e-05 1.0000624656677246
    + 0.8477883629517035 2592.0000000000014 ...  0.00022221534163691103 1.0000633001327515
    + 0.8777883629517035  2592.000000000019 ...  0.00019213277846574783 1.0000433921813965
    + 0.9077883629517037 2591.9999999999814 ...   0.0002187517675338313  1.000024676322937
    + 0.9377883629517034   2592.00000000002 ...  0.00016979355132207274 1.0000224113464355
    + 0.9677883629517037  2591.999999999981 ...  0.00014231358363758773 1.0000698566436768
    + 0.9977883629517035             2592.0 ...   0.0001224415173055604 0.9999606013298035
    + 1.0277883629517035             2592.0 ...  0.00027701034559868276 0.9999635815620422
    + 1.0577883629517035             2592.0 ...   0.0003093520936090499 0.9999105930328369
    + 1.0877883629517036 2592.0000000000095 ...  0.00022884277859702706 0.9998687505722046

/tmp/simon/astropy-test-beh0dhqh/lib/python3.7/site-packages/docs/timeseries/index.rst:272: DocTestFailure

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
aarchibacommented, Oct 18, 2019

I believe I’m seeing the same error. On a wide terminal I see:

====================================================== FAILURES =======================================================
__________________________________________ [doctest] docs/timeseries/io.rst ___________________________________________
091 :download:`binned.csv <binned.csv>` and with a column ``time_start`` giving the start time
092 and ``bin_size`` giving the size of each bin, you can do::
093 
094     >>> from astropy import units as u
095     >>> from astropy.timeseries import BinnedTimeSeries
096     >>> ts = BinnedTimeSeries.read('docs/timeseries/binned.csv', format='ascii.csv',
097     ...                            time_bin_start_column='time_start',
098     ...                            time_bin_size_column='bin_size',
099     ...                            time_bin_size_unit=u.s)
100     >>> ts[:3]
Differences (unified diff with -expected +actual):
    @@ -1,8 +1,8 @@
     <BinnedTimeSeries length=3>
    -     time_bin_start     time_bin_size ...    E       F
    -                              s       ...
    -         object            float64    ... float64 float64
    ------------------------ ------------- ... ------- -------
    -2016-03-22T12:30:31.000           3.0 ...   28.87   63.44
    -2016-03-22T12:30:34.000           3.0 ...   27.76   59.98
    -2016-03-22T12:30:37.000           3.0 ...   27.04   59.61
    +     time_bin_start     time_bin_size         time_end           A       B       C       D       E       F   
    +                              s                                                                              
    +         object            float64             str23          float64 float64 float64 float64 float64 float64
    +----------------------- ------------- ----------------------- ------- ------- ------- ------- ------- -------
    +2016-03-22T12:30:31.000           3.0 2016-03-22T12:30:34.000  164.93  114.73   26.27   19.21   28.87   63.44
    +2016-03-22T12:30:34.000           3.0 2016-03-22T12:30:37.000  164.89  114.75   26.22   19.07   27.76   59.98
    +2016-03-22T12:30:37.000           3.0 2016-03-22T12:30:40.000  164.63  115.04   25.78   19.01   27.04   59.61

/tmp/astropy-test-5a03ndy4/lib/python3.7/site-packages/docs/timeseries/io.rst:100: DocTestFailure
======================== 1 failed, 13810 passed, 311 skipped, 58 xfailed in 209.08s (0:03:29) =========================

The version actually observed is different depending on the width of my terminal when I run python setup.py test.

1reaction
astrofrogcommented, May 11, 2019

@saimn - in the past, some of your test failures have been due to custom config in the astropy config file. Could you check whether there is anything in there related to terminal width?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bountysource
3.2rc1 Doctest failure in timeseries.
Read more >
2011-January.txt - Python mailing list
I would propose a dynamic test: check how many POSIX > semaphores the installation supports, and fail if it's less than > 200...
Read more >
Untitled
It provides a wide variety of statistical and graphical techniques (linear and nonlinear modelling, statistical tests, time series analysis, classification, ...
Read more >
March 2019 - test - Fedora Mailing-Lists
... Update Information: Fixes failure to build from source bug. ... Package: distcc-3.2rc1-22.fc31 Old package: distcc-3.2rc1-21.fc30 ...
Read more >
RPM shipped by Fedora Project - RPMFind
distcc-gnome-3.2rc1-22.el7.x86_64, Gnome frontend of distcc monitoring tool ... doctest-devel-2.4.8-2.el7.x86_64, Development files for doctest ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found