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.

TST: s390x doctest failed due to PR 13734 ( Support fixed width ASCII table with header rows for dtype, unit, format, description)

See original GitHub issue

https://github.com/astropy/astropy/pull/13734 introduced doctests that are failing in s390x job (weekly cron). cc @taldcroft @hamogu @dhomeier

Example log: https://github.com/astropy/astropy/actions/runs/3125537612/jobs/5070006396

______________________ [doctest] fixed_width_gallery.rst _______________________
475   Custom Header Rows with Fixed Width
476 
477 ::
478     >>> from astropy.table.table_helpers import simple_table
479     >>> dat = simple_table(size=3, cols=4)
480     >>> dat["a"].info.unit = "m"
481     >>> dat["d"].info.unit = "m/s"
482     >>> dat["b"].info.format = ".2f"
483     >>> dat["c"].info.description = "C column"
484     >>> ascii.write(
Differences (unified diff with -expected +actual):
    @@ -1,3 +1,3 @@
    -| int64 | float64 |      <U1 | int64 |
    +| int64 | float64 |      >U1 | int64 |
     |     a |       b |        c |     d |
     |     m |         |          | m / s |

.../astropy/docs/io/ascii/fixed_width_gallery.rst:484: DocTestFailure
______________________________ [doctest] 5.2.rst _______________________________
090 ``format``, and ``description``. This is available in the ``fixed_width`` and
091 ``fixed_width_two_line`` formats via the new ``header_rows`` keyword argument::
092 
093     >>> from astropy.io import ascii
094     >>> from astropy.table.table_helpers import simple_table
095     >>> dat = simple_table(size=3, cols=4)
096     >>> dat["b"].info.unit = "m"
097     >>> dat["d"].info.unit = "m/s"
098     >>> dat["b"].info.format = ".2f"
099     >>> ascii.write(
Differences (unified diff with -expected +actual):
    @@ -1,6 +1,6 @@
         a       b   c     d
    -int64 float64 <U1 int64
    +int64 float64 >U1 int64
                 m     m / s
    -        .2f
    +          .2f          
     ----- ------- --- -----
         1    1.00   c     4

.../astropy/docs/whatsnew/5.2.rst:99: DocTestFailure

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dhomeiercommented, Sep 28, 2022

Yes, not too surprising; but is the .4f alignment also endian? 😆

0reactions
pllimcommented, Sep 28, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Full Changelog — Astropy v5.2
... read and write a fixed width ASCII table that includes additional header rows specifying any or all of the column dtype, unit,...
Read more >
Parsing Fixed Width Text Files with Pandas | by Amy Rask
A fixed width file is similar to a csv file, but rather than using a delimiter, each field has a set number of...
Read more >
Arrow: CHANGELOG.md - Fossies
As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here...
Read more >
How do I read a fixed width format text file in pandas?
I just got my hands on pandas and am figuring out how I can read a file. The file is from the WRDS...
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