Skip to content

Latest commit

 

History

History
798 lines (695 loc) · 38.9 KB

CHANGELOG.md

File metadata and controls

798 lines (695 loc) · 38.9 KB

PrettyTables.jl Changelog

Version 2.3.1

  • Bugfix hline suffix decoration is now handled properly in the text back end when the lines are cropped. (#228)
  • Bugfix We now redirect stdout to devnull during precompilation to avoid hanging in some scenarios. (#231)

Version 2.3.0

  • Bugfix The function ft_round was broken on Julia 1.11.
  • Feature PrettyTables.jl now have a true Markdown back end.
  • Enhancement Custom types can now dispatch easier in pretty_table. (#219)
  • Enhancement We now use PrecompileTools.jl to generate the precompilation statements.
  • Enhancement We improved how we handle Tables.jl objects. (#220)
  • Info We improved the internal code style. The line width was changed from 80 characters to 92 characters, and internal function naming was modified to enhance the readability.

Version 2.2.8

  • Bugfix The print function was passing the wrong cell reference for formatters and highlighters after the middle cropping in HTML back end.

Version 2.2.7

  • Bugfix We were not able to overwrite the header when printing dictionaries that are not Tables.jl. (#212)
  • Enhancement PrettyTables.jl switched from Formatting.jl to Printf to print formatted text. The former was providing wrong output in some scenarios as it can be seen here. (#211)

Version 2.2.6

  • Bugfix Fix the algorithm that obtains the cell data type when showing the row number. (#208)

Version 2.2.5

  • Bugfix Fix the algorithm that obtains the cell data type and alignment when using middle vertical crop mode. (#207)

Version 2.2.4

  • Bugfix Add <head> block in standalone HTML printing. (#198, #199)

Version 2.2.3

  • Bugfix Fix the horizontal lines when the header is omitted. (#201)

Version 2.2.2

  • Bugfix pretty_table was locking when using a regex with key 0 together with row labels in text backend.

Version 2.2.1

  • Bugfix The algorithm to check whether io is stdout in HTML backend was not working in Jupyter after the commit that implemented circular reference check. This commit fixed this bug.

Version 2.2.0

  • Bugfix The rendered show was not escaping the newline character when the object was not a string. ([#194][gh-issue-194])
  • Enhancement PrettyTables.jl can now handle tables with no row or column. In this case, it shows only the header or the row label, if available. (#156)
  • Enhancement PrettyTables.jl can now detect circular dependency when showing an object.
  • Feature PrettyTables.jl now supports LaTexStrings. (#186)

Version 2.1.2

  • Bugfix The first row when accessing a Table.jl table with row access must be obtained using first instead of assuming that the first row state is 1. (PR #182)

Version 2.1.1

  • Bugfix The header must always be printed regardless of the display size. This bug was leading to access of undefined memory if the number of rows in the display was smaller than that in the header. (Issue #179)

Version 2.1.0

  • Bugfix The minimum Julia version was bumped to v1.6. Notice that this is not breaking because StringManipulation.jl already requires Julia 1.6.
  • Feature The table style (CSS) can be customized in HTML output using the keyword table_style.

Version 2.0.0

  • BREAKING The default option of standalone in HTML backend is new false instead of true.
  • BREAKING The filters were removed to improve the code maintainability. Table filtering must be done now before calling pretty_table.
  • BREAKING The cells with undefined reference is now handled differently to avoid confusion with cells that contains undef. (Issue #170)
  • BREAKING The support of Julia 1.0 was dropped.
  • Deprecation The following options and structures were renamed (the old versions are now deprecated):
    • HTMLDecoration => HtmlDecoration
    • HTMLHighlighter => HtmlHighlighter
    • HTMLTableFormat => HtmlTableFormat
    • URLTextCell => UrlTextCell
    • crop_num_lines_at_beginning => reserved_display_lines
    • noheader => show_header
    • nosubheader => show_subheader
    • row_name* => row_label*
    • rownum_header_crayon => row_number_header_crayon
  • Bugfix Many bugs in LaTeX escaping were fixed.
  • Feature Two new options were added to limit the number of rows and columns that will be printed in all backends: max_num_of_columns and max_num_of_rows.
  • Feature The HTML backend now shows the omitted cell summary.
  • Feature The HTML backend now have vertical cropping.
  • Feature The HTML backend now have a top bar where the user can print information.
  • Feature The HTML highlight now has an option to change the font style.
  • Feature The type HtmlCell can now be used to add raw HTML code to a table cell. (Issue #166)
  • Feature The row number and label can now be decorated in HTML.
  • Feature The option maximum_columns_width can be used in HTML to limit the maximum width of the cells.
  • Feature The option title can now be customized for the header cells in HTML (header_cell_titles).
  • Enhancement Many internal changes allowed to drastically increase the performance. The input tables are now wrapped in a new structure that is responsible to merge the data to be printed (header, additional columns, etc.).
  • Enhancement The algorithm to obtain the cells from tables with row access (Tables.jl) were improved. (Issue #174)
  • Enhancement OffsetArrays.jl is now supported. (Issue #110)

Version 1.3.1

  • Bugfix The function pretty_table was returning an error when the alignment regex anchor contained a columns that does not exists. (Issue #154)

Version 1.3.0

  • Bugfix The alignment anchor regex algorithm was not computing the alignment row correctly in lines with UTF-8 symbols. (Issue #147)
  • Feature Two predefined formatters were added: ft_nomissing and ft_nonothing. They can be used to transform, respectively, missing and nothing into an empty string. (Issue #150)

Version 1.2.3

  • Bugfix We were not considering the column width configuration (maximum_columns_width, minimum_columns_width, etc.) when computing the number of columns we can display in the available size. This behavior was leading to incorrect cropping in many situation. (Issue #149)

Version 1.2.2

  • Bugfix Newlines must be kept in AnsiTextCell. Otherwise, it will be impossible to align text between those cells.

Version 1.2.1

  • Deprecation The deprecations removed in v1.2.0 were added again so that this new version is not breaking. (Issue #146)

Version 1.2.0

  • Deprecation All deprecations introduced in v0.12 are now removed.
  • Feature The HTML decoration can now used any custom style. (PR #135)
  • Feature The HTML backend now has an option to minify the output.
  • Feature The HTML backend now has the option allow_html_in_cells so that the user can use HTML code inside the table.
  • Feature The alignment option in HTML backend can now be set to :n so that no alignment annotation is added.
  • Feature The option HTML can be passed to pretty_table so that an HTML object is returned. (Issue #130)
  • Feature The text backend has now a new custom cell called AnsiTextCell, which allows adding a cell with ANSI escape sequences inside the table. (Issue #142) (PR #143)
  • Feature The keyword color can now be used when converting a table to string to render the ANSI escape sequences.
  • Enhancement The HTML rendering now uses the section thead and tbody.
  • Enhancement Some special characters in HTML are now escaped to ensure a correct rendering.
  • Enhancement The vectors related to filtering are now set to UnitRange if filtering is not present. Hence, the performance when printing huge tables cropped to the display size is highly improved by avoiding allocating big vectors. (Issue #140) (PR [#144][gh-issue-144])
  • Bugfix The horizontal line selection is now consistent if the vertical cropping is set to :middle. (Issue #133)

Version 1.1.0

  • Feature The text backend now supports custom text cells that can have escape characters to apply, for example, decorations. The custom cell URLTextCell is bundled with PrettyTables.jl to add hyperlinks to text using the escape sequence \e]8. (Issue #129)
  • Bugfix The character % is now escaped in LaTeX. (Issue #125)

Version 1.0.1

  • Bugfix The alignment regex keys are now sorted before processing. This introduces a slight delay, but avoid a huge wait time for very large tables. (Ref: JuliaData/DataFrames.jl#2739)

Version 1.0.0

In this version, the API of text backend is stabilized. It means that current functionality will always work during the lifespan of v1. There can be new features, but none will be breaking. The only exception is if Julia printing system has a breaking change, which is allowed.

The HTML and LaTeX APIs are not stabilized. They can and will likely change during the lifespan of v1. However, any breaking change will only occur when the minor version is bumped. Those two backend must be considered beta.

  • Enhancement Any AbstractDict can now be printed.

Verison 0.12.1

  • Bugfix The minimum column width must be 1, otherwise pretty_table will crash when cropping an empty column in text backend. (Issue #118)
  • Enhancement Some despecializations were performed and type instabilities were fixed, leading to a slightly performance increase.

Version 0.12.0

  • DeprecationEnhancement The backend selection is not handled by a Symbol anymore. It is now selected using a Val. Hence, backend = :text must be replaced by backend = Val(:text). The old API still works but it is marked as deprecated and will be removed in the next version. This drastically reduced the time to print the first table in LaTeX and HTML backends.
  • DeprecationEnhancement The header is not selected by an argument anymore, but by a keyword called header. The format has also changed. It must be now a tuple of vectors instead of a matrix. The first vector is the header whereas the others are the subheaders. The old API still works but it is marked as deprecated and will be removed in the next version.
  • Enhancement Many internal code enhancements allowed to improve a lot the performance (despecializations, type instabilities fixes, code refactoring to avoid unnecessary allocations, tweaking @inline annotations, etc.). (Issue #116)
  • Enhancement The package now has a precompilation script that reduced a lot the time to print the first table in all backends.
  • Info End of support of Julia 1.5. The supported versions are 1.0 and 1.6.

Version 0.11.1

  • Bugfix In specific situations, the algorithm that aligns columns based on regexes was trying to align columns that were not printed, leading to segmentation fault. (Issue #112)

Version 0.11.0

  • BREAKING By default, all the cells are now rendered using the option :limit => true of IOContext. To return to the old behavior, use limit_printing = false.
  • Feature HTML backend now supports row names.
  • Feature LaTeX backend now supports row names.
  • Feature A new LaTeX pre-defined format was added: tf_latex_modern.
  • Feature A new LaTeX pre-defined format was added: tf_latex_booktabs.
  • Feature The wrap table environment of LaTeX backend can now be changed using the keyword wrap_table_environment.
  • Feature A new table type of LaTeX backend was added: :array.
  • Feature In Text backend, it is now possible to align the column cells using regexes (see alignment_regex_anchor).
  • Feature It is now possible to select the table label in LaTeX backend. (Issue #103)
  • Enhancement LaTeX tables can now control whether to use the table environment or not.
  • Enhancement HTML classes in CSS are now surrounded by quotes.
  • Enhancement An unnecessary space in HTML tags was removed.
  • Enhancement The color of omitted cell text in Text backend was changed from red to cyan. (Issue [#94])
  • Enhancement The compat bounds of Reexport.jl was updated. (Issue #105)
  • Bugfix PrettyTables.jl now support Tables.jl that returns tuples as columns. (Issue #90)
  • Bugfix The option sortkeys can now be used when printing dictionaries using HTML backend.
  • Bugfix The first header is now correctly set when using longtable in LaTeX backend, avoiding multiple entries in list of tables. (Issue #95)
  • Bugfix The formatter ft_latex_sn now only modifies Number.
  • Bugfix The arguments of @ptconf was not being escaped. (Issue #107)

Version 0.10.1

  • Bugfix The cell width computation when the column has a maximum allowed size was fixed. (Issue [#93][gh-issue-93])

Version 0.10.0

  • BREAKING same_column_size was renamed to equal_columns_width.
  • BREAKING Remove dependency Parameters.jl. This reduced the loading time in 30% but some features related to structure copying are now missing. (Issue #79)
  • BREAKING All table format variables now has the prefix tf_. This was required to avoid naming conflicts since some variables like matrix have common names.
  • BREAKING screen_size was renamed to display_size.
  • BREAKINGFeature If a table is cropped in text back-end, then a summary indicating the number of omitted rows and columns is now printed. This can be disable by the option show_omitted_cell_summary.
  • BREAKINGEnhancement PrettyTables.jl now uses compact printing by default.
  • BREAKINGEnhancement LaTeX tables when using tabular is now wrapped inside a table environment.
  • BREAKING PrettyTables.jl does not print trailing spaces anymore.
  • Feature Option crop_subheader in text back-end. If this option is true, PrettyTables.jl neglects the subheader length when computing the row size, cropping it if necessary.
  • Feature Option minimum_columns_width in text back-end. This option allows the user the specify the minimum allowed size of each column.
  • Feature Option maximum_columns_width in text back-end. This option allows the user the specify the maximum allowed size of each column.
  • Feature Option title. It is now possible to define the table title in all back-ends. (Issue #32)
  • Feature Header cells can now be aligned independently from the column alignment. (Issue #66)
  • Feature Option hlines in LaTeX back-end. The user can now define where they want horizontal lines in the LaTeX back-end. (Issue #70)
  • Feature Option cell_first_line_only. If true, then only the first line of the cells are printed.
  • Feature Option row_number_alignment in text back-end. This option can be used to select the alignment of the row number column in text back-end.
  • Feature PrettyTables.jl can now render Markdown cells in all back-ends. (PR #63 and other commits)
  • Feature Option crop_num_lines_at_beginning in text back-end. This option defines how many lines are skipped at the beginning when cropping the table.
  • Feature Option newline_at_end in text back-end. If false, then the table is printed without a newline character at end.
  • Feature Option continuation_row_alignment in text back-end. This option allows the user to select the alignment of the continuation row.
  • Feature Option row_number_column_title. This selects the title of the row number column.
  • Feature A new configuration system is added so that the user can create structures storing printing configurations to be reused.
  • Feature PrettyTables.jl can now use the function print or show to render the cells. This is selected by the keyword renderer.
  • Feature Option ellipsis_line_skip in text back-end. This option configures how many lines are skipped when showing ellipsis to indicate that the lines were cropped.
  • Feature Text back-end can now crop a table in the middle. The behavior can be selected by the keyword vcrop_mode.
  • Enhancement PrettyTables.jl can now handle UTF-8 strings with variable character size.
  • Enhancement PrettyTables.jl now supports #undef cells.
  • Enhancement A lot of optimizations were performed to decrease the time to print the first table, which is now almost 45% less.
  • Enhancement LaTeX output is now indented.
  • Enhancement HTML output is now indented.
  • Enhancement The types when printing Tables.jl now has a compact representation.
  • Enhancement show_row_number is now available in all back-ends.
  • Enhancement Revamp of internal mechanism of text back-end, leading to a much more organized code base.
  • Bugfix The original data is now passed to highlighters and filters when the table complies with Tables.jl API. (Issue #65)
  • Bugfix LaTeX alignment was wrong in filtered columns.
  • Bugfix Fix row name crayons in text back-end. (Issue #68)
  • Bugfix Do not throw an error is a table is empty.
  • Info End of support of Julia 1.4. The supported versions are 1.0 and 1.5.

Version 0.9.1

  • Feature The option overwrite was added to the text back-end. It deletes the same amount of lines that will be printed. This can be used to provide a way to display a table that updates with time. (PR #56)
  • Enhancement The object that complies with Table.jl API can now return any AbstractVector as column or row names. (PR #53 and #54)

Version 0.9.0

  • BREAKINGFeature The table format of the text back-end now has the variable vlines which defines the vertical lines that should be drawn by default. In this case, the variables left_border and right_border were removed because they were not necessary anymore.
  • BREAKINGFeature The compatibility with Tables.jl API was improved. Now, tables without a schema can be printed. Furthermore, if a table has a schema but the user pass a header, then the user's header will be used instead. Thus, this can be breaking. (Issue #45)
  • BREAKINGEnhancement The behavior of the keyword hlines was modified in text back-end. Now, it can be used to draw any horizontal line, including the bottom, header, and top lines. A variable also named hlines was added to the structure TextFormat to defined which horizontal lines should be drawn by default. Thus, the variables top_line, header_line, and bottom_line of the same structure were removed since they were not necessary anymore. Furthermore, the old behavior of hlines and hlines_format can be replicated in this version using body_hlines and body_hlines_format, respectively.
  • BREAKINGEnhancement The vertical lines behavior in LaTeX back-end was modified to match the behavior selected for the text back-end. Thus, the keyword row_number_vline was removed, since it was not necessary anymore.
  • DeprecationEnhancement The API of formatters was drastically change to improve the consistency of the package. Now, as we have in highlighters, the formatters are composed of a function or a tuple of functions with the signature f(value,i,j), where value is the cell value that must be formatted, i is the row number, and j is the column number. These function must return the formatted value for the cell (i,j). Since it is now possible to define multiple formatters, the keyword name was changed from formatter to formatters. The old API still works, but it marked as deprecated.
  • Feature The vertical lines in text back-end can now be controlled by the keyword vlines. (Issue #46)
  • Feature The option row_names can be used to append a column to the left of the table with the names of the columns.
  • Enhancement The highlighters format of text back-end was improved. The user can now create highlighters that will dynamically apply crayons depending on the data value and the cell coordinate, as it was possible with the LaTeX and HTML back-ends.
  • Enhancement The API of cell_alignment was changed to improve the consistency of the package. Now, as we have in highlighters, the cell_alignment must be a function or a tuple of functions with the signature f(data,i,j), where data is the matrix that is being printed, i is the row number, and j is the column number. These function must return the alignment symbol for the cell (i,j). For convenience, the old API using dictionaries is still available for the simple cases.
  • Info End of support of Julia 1.3. The supported versions are 1.0 and 1.4.

Version 0.8.4

  • Enhancement Improvements in the documentation of functions and macros.

Version 0.8.3

  • Feature The method pretty_table(String, ...) can be used to return the printed table as a string. Furthermore, all the tests were modified to use this function instead of sprint. (Issue #29)

Version 0.8.2

  • Feature The table format matrix was added to the text and HTML back-ends. Thanks @DhruvaSambrani. (PR #39, Issue #33)

Version 0.8.1

  • Feature The back-end is now automatically inferred from the table type keyword (tf). Thanks @DhruvaSambrani. (PRs #41 and #42, Issue #40)
  • Bugfix LaTeX back-end was failing when printing a table with an UTF-8 character on it. (Issue #38)
  • Enhancement Tables.jl API is now the priority when printing tables. This means that if an object complies with this API, then it will be used, even if the object is also derived from a supported type like AbstractVecOrMat. (Issue #28)

Version 0.8.0

  • Feature The keyword standalone = false can be used with HTML back-end to print only the table.
  • Feature An experimental version of a LaTeX back-end is now available. Notice that it still lacks tests and many bugs are expected.
  • Feature A table can now be added to a text file using the function include_pt_to_file. You can define marks that will be used to place the table in the file. It works with all back-ends.
  • Bugfix The support for Tables.jl API were fixed for cases in which Tables.columns did not return a matrix. Thanks @pdeffebach for the PR! (Issue #24) (PR #25)
  • Info End of support of Julia 1.2. The supported versions are 1.0 and 1.3.

Version 0.7.0

  • Feature The keyword columns_width can be used to select the desired width for each column.
  • Feature Add the possibility to automatically wrap the table cells when using the text back-end and the column size is fixed. This can be triggered by the keyword autowrap. (Issue #21)
  • Feature Initial version of HTML back-end. Notice that this is the first version with a minimal set of features. This implementation should be considered beta.
  • Bugfix The character " is not escaped anymore when printing cells of type AbstractString. (Issue #22)
  • Deprecation When using the text back-end, passing the table format as an option to pretty_table function is now deprecated. The table format in all back-ends must be passed using the keyword tf. Thus, for example, pretty_table(data, unicode_rounded) must be converted to pretty_table(data, tf = unicode_rounded).

Version 0.6.0

  • Feature The format of the horizontal line in the table, which are drawn using the option hlines, can now be selected using the keyword hlines_format.
  • Feature The alignment of a single cell can now be changed regardless of the column alignment. This can be achieve by the keyword cell_alignment.
  • Feature The line between the header and the data can now be hide using the variable header_line of the structure PrettyTableFormat. (Issue #15)
  • Feature New predefined highlighters: hl_cell, hl_col, hl_row, which can be used to apply highlights to single cells or to entire columns or rows, respectively.
  • Bugfix The formatter ft_printf is now only applied to cells that are of type Number. (Issue #19)
  • Enhancement The formatter ft_printf can now receive one integer if the user wants to format only a single column.
  • Info End of support of Julia 1.1. The supported versions are 1.0 and 1.2.

Version 0.5.1

  • Bugfix DataFrames with strings were being printed surrounded by quotes, which were leading to a wrong escaping. (Issue #16)

Version 0.5.0

  • Feature The macro @pt can be used to print tables with global configurations. Those configurations can be set by the macro @ptconf.
  • Feature There is now the option nosubheader to suppress printing sub-headers. This can be useful when printing DataFrame or Dict and it is desired to hide the types of the columns. (Issue #14)
  • Enhancement PrettyTables.jl is now compatible with Tables.jl 0.2. It means that if an elements that is passed to pretty_table is not one of those natively supported, then it will call Tables.columns to automatically convert it. If it fails, than Tables.jl will throw an error instead of PrettyTables.jl. (Issue #13)
  • Enhancement If only one highlighter is wanted, then an instance of Highlighter can now be directly passed to the keyword highlighters, i.e. it does not must be a Tuple anymore.

Version 0.4.2

Version 0.4.1

  • Enhancement If the user wants to crop the output, then the printing function does not need to process the entire matrix. Thus, now it will only process the columns and rows that will be actually printed, which yielded a huge performance gain when big matrices are printed with crop on.
  • Bugfix Matrices with nothing and missing are now correctly printed.

Version 0.4.0

  • BREAKINGFeature The text can now be horizontally and / or vertically cropped to fit the available screen size. Notice that, by default, the screen size is obtained and the text is cropped, which is a breaking change compared to the previous version. This behavior can be modified by the keywords crop and screen_size.
  • Feature Vector can now be printed natively.
  • Feature The user can now specify filters for the data using the keywords filters_col and filters_row, so that only a partial subset of the input is printed.
  • Feature Dict can now be printed natively. (Issue #6)
  • Bugfix The formatting was wrong when printing a table with sub-headers and the row number column. (Issue #9)
  • Bugfix The row number column size is now correctly computed when the header is omitted. (Issue #10)

Version 0.3.1

  • Enhancement Vector was replaced by AbstractVector in predefined formatters. Hence, it is now possible to use range notation. Thus, for example ft_printf("%4.2f", [2,3,4,5,6,7,8,9,10]) can now be rewritten as ft_printf("%4.2f", 2:10). (PR #8)

Version 0.3.0

  • BREAKINGFeature Every styling option is now handled by Crayons.jl.
  • Bugfix Strings are escaped before printing the header. This avoids problems in formatting if escape sequences are present. (Issue #4)
  • Feature The text inside the cells can have multiple lines.
  • Feature The header can be suppressed when printing the table. (Issue #3)
  • Enhancement Many performance improvements.
  • Enhancement The hlines keywords can accept ranges. (PR #5)
  • Enhancement The pre-defined formatter ft_printf uses the function sprintf1 from the package Formatting.jl instead of the macro @sprintf, leading to a huge performance gain. (Issue #7)

Version 0.2.1

  • Bugfix The version of the package was not updated on Project.toml in the last release.

Version 0.2.0

  • BREAKING The header is not assumed to be on the data anymore. It is now specified by a new parameter called header.
  • Bugfix Only Matrix{Any} was allowed to be printed.
  • Feature Support for highlighters.
  • Feature Some pre-defined highlighters were added.
  • Feature Some pre-defined formatters were added.
  • Feature Initial support for Tables.jl API.
  • Feature New package documentation using Documenter.jl.
  • Feature Support for sub-headers.
  • Feature There is now an option called hlines to draw horizontal lines between selected rows.
  • Enhancement New pre-defined formats: unicode_rounded and borderless.

Version 0.1.0

  • Initial version.