Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-gridtables for openSUSE:Factory checked in at 2023-04-04 21:20:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-gridtables (Old) and /work/SRC/openSUSE:Factory/.ghc-gridtables.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-gridtables" Tue Apr 4 21:20:12 2023 rev:2 rq:1075887 version:0.1.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-gridtables/ghc-gridtables.changes 2022-10-13 15:44:18.370991037 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-gridtables.new.19717/ghc-gridtables.changes 2023-04-04 21:20:24.657186785 +0200 @@ -1,0 +2,15 @@ +Thu Mar 30 17:06:54 UTC 2023 - Peter Simons <[email protected]> + +- Updated spec file to conform with ghc-rpm-macros-2.5.2. + +------------------------------------------------------------------- +Fri Sep 30 16:29:12 UTC 2022 - Peter Simons <[email protected]> + +- Update gridtables to version 0.1.0.0. + ## gridtables-0.1.0.0 + + Release pending. + + - Added support for table foots. + +------------------------------------------------------------------- Old: ---- gridtables-0.0.3.0.tar.gz gridtables.cabal New: ---- gridtables-0.1.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-gridtables.spec ++++++ --- /var/tmp/diff_new_pack.q1RYed/_old 2023-04-04 21:20:25.701193441 +0200 +++ /var/tmp/diff_new_pack.q1RYed/_new 2023-04-04 21:20:25.705193467 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-gridtables # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,26 +17,35 @@ %global pkg_name gridtables +%global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.0.3.0 +Version: 0.1.0.0 Release: 0 Summary: Parser for reStructuredText-style grid tables License: MIT URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-array-devel +BuildRequires: ghc-array-prof +BuildRequires: ghc-base-devel +BuildRequires: ghc-base-prof BuildRequires: ghc-containers-devel +BuildRequires: ghc-containers-prof BuildRequires: ghc-doclayout-devel +BuildRequires: ghc-doclayout-prof BuildRequires: ghc-parsec-devel +BuildRequires: ghc-parsec-prof BuildRequires: ghc-rpm-macros BuildRequires: ghc-text-devel +BuildRequires: ghc-text-prof ExcludeArch: %{ix86} %if %{with tests} BuildRequires: ghc-tasty-devel BuildRequires: ghc-tasty-hunit-devel +BuildRequires: ghc-tasty-hunit-prof +BuildRequires: ghc-tasty-prof %endif %description @@ -54,9 +63,24 @@ %description devel This package provides the Haskell %{pkg_name} library development files. +%package -n ghc-%{pkg_name}-doc +Summary: Haskell %{pkg_name} library documentation +Requires: ghc-filesystem +BuildArch: noarch + +%description -n ghc-%{pkg_name}-doc +This package provides the Haskell %{pkg_name} library documentation. + +%package -n ghc-%{pkg_name}-prof +Summary: Haskell %{pkg_name} profiling library +Requires: ghc-%{pkg_name}-devel = %{version}-%{release} +Supplements: (ghc-%{pkg_name}-devel and ghc-prof) + +%description -n ghc-%{pkg_name}-prof +This package provides the Haskell %{pkg_name} profiling library. + %prep %autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build @@ -79,4 +103,9 @@ %files devel -f %{name}-devel.files %doc CHANGELOG.md README.md +%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files +%license LICENSE + +%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files + %changelog ++++++ gridtables-0.0.3.0.tar.gz -> gridtables-0.1.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gridtables-0.0.3.0/CHANGELOG.md new/gridtables-0.1.0.0/CHANGELOG.md --- old/gridtables-0.0.3.0/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/gridtables-0.1.0.0/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -2,6 +2,12 @@ `gridtables` uses [PVP Versioning][]. +## gridtables-0.1.0.0 + +Release pending. + +- Added support for table foots. + ## gridtables-0.0.3.0 Released 2022-08-18. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gridtables-0.0.3.0/LICENSE new/gridtables-0.1.0.0/LICENSE --- old/gridtables-0.0.3.0/LICENSE 2001-09-09 03:46:40.000000000 +0200 +++ new/gridtables-0.1.0.0/LICENSE 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Albert Krewinkel +Copyright © 2022 RStudio, PBC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gridtables-0.0.3.0/README.md new/gridtables-0.1.0.0/README.md --- old/gridtables-0.0.3.0/README.md 2001-09-09 03:46:40.000000000 +0200 +++ new/gridtables-0.1.0.0/README.md 2001-09-09 03:46:40.000000000 +0200 @@ -22,7 +22,8 @@ The tables are intended to look good when viewed in a monospace font. Therefore, wide and full-width characters, as those in East -Asian scripts, are counted as two characters. +Asian scripts, are counted as two characters, while zero-width and +combining characters are treated as if they have no width. ## Column alignments @@ -45,6 +46,29 @@ | a 1 | b 2 | c 3 | +------+--------+-------+ +## Table Foot + +This library implements an extension that enables to create tables +with table foots: If the *last* separator line is a part +separator, i.e., if it consists of `=` instead of `-`, then all +rows after the *second-to-last* part separator are treated as the +table foot. + +E.g., consider the following table: + + +------+-------+ + | Item | Price | + +======+=======+ + | Eggs | 5£ | + +------+-------+ + | Spam | 3£ | + +======+=======+ + | Sum | 8£ | + +======+=======+ + +Here, the last row, containing "Sum" and "8£", would be the table +foot. + ## Algorithm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gridtables-0.0.3.0/gridtables.cabal new/gridtables-0.1.0.0/gridtables.cabal --- old/gridtables-0.0.3.0/gridtables.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/gridtables-0.1.0.0/gridtables.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ cabal-version: 2.4 name: gridtables -version: 0.0.3.0 +version: 0.1.0.0 synopsis: Parser for reStructuredText-style grid tables. description: Provides a parser for plain-text representations of tables. This package supports table headers, cells @@ -12,7 +12,7 @@ license-file: LICENSE author: Albert Krewinkel maintainer: Albert Krewinkel <[email protected]> -copyright: © 2022 Albert Krewinkel +copyright: © 2022 RStudio, PBC category: Text extra-doc-files: README.md , CHANGELOG.md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gridtables-0.0.3.0/src/Text/GridTable/ArrayTable.hs new/gridtables-0.1.0.0/src/Text/GridTable/ArrayTable.hs --- old/gridtables-0.0.3.0/src/Text/GridTable/ArrayTable.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/gridtables-0.1.0.0/src/Text/GridTable/ArrayTable.hs 2001-09-09 03:46:40.000000000 +0200 @@ -3,7 +3,7 @@ {-# LANGUAGE LambdaCase #-} {- | Module : Text.GridTable.ArrayTable -Copyright : © 2022 Albert Krewinkel +Copyright : © 2022 RStudio, PBC License : MIT Maintainer : Albert Krewinkel <[email protected]> @@ -32,6 +32,7 @@ data ArrayTable a = ArrayTable { arrayTableCells :: Array CellIndex (GridCell a) , arrayTableHead :: Maybe RowIndex + , arrayTableFoot :: Maybe RowIndex , arrayTableColSpecs :: Array ColIndex (Alignment, Int) } deriving stock (Eq, Show) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gridtables-0.0.3.0/src/Text/GridTable/Trace.hs new/gridtables-0.1.0.0/src/Text/GridTable/Trace.hs --- old/gridtables-0.0.3.0/src/Text/GridTable/Trace.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/gridtables-0.1.0.0/src/Text/GridTable/Trace.hs 2001-09-09 03:46:40.000000000 +0200 @@ -43,6 +43,9 @@ let charGrid = toCharGrid lines specs1 = colSpecsInLine '-' charGrid 1 partSeps = findSeparators charGrid + -- The first separator can never be a part separator line (with + -- =), but it can contain column alignment markers, so it is + -- always normalized it as well. charGrid' = convertToNormalLines (1:map partSepLine partSeps) charGrid traceInfo = traceCharGrid charGrid' initialTraceInfo in if Set.null (gridCells traceInfo) @@ -416,13 +419,19 @@ ++ repeat AlignDefault) (map fromCharCol colwidths) lastCol = ColIndex (length colwidths) - tableHead = subtract 1 <$> - foldr ((<|>) . (`Map.lookup` rowindex) . partSepLine) - Nothing - partSeps + mlastLine = Set.lookupMax (gridRowSeps traceInfo) + tableHead = case partSeps of + ps:_ -> subtract 1 <$> partSepLine ps `Map.lookup` rowindex + [] -> Nothing + tableFoot = case reverse partSeps of + rps:rps':_ | Just (partSepLine rps) == mlastLine -> + partSepLine rps' `Map.lookup` rowindex + _ -> + Nothing in ArrayTable { arrayTableCells = runSTArray (toMutableArray traceInfo rowindex colindex) , arrayTableHead = tableHead + , arrayTableFoot = tableFoot , arrayTableColSpecs = listArray (1, lastCol) colSpecs } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gridtables-0.0.3.0/test/test-gridtables.hs new/gridtables-0.1.0.0/test/test-gridtables.hs --- old/gridtables-0.0.3.0/test/test-gridtables.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/gridtables-0.1.0.0/test/test-gridtables.hs 2001-09-09 03:46:40.000000000 +0200 @@ -59,6 +59,7 @@ Right (ArrayTable { arrayTableCells = listArray gbounds [ContentCell 1 1 [" one "]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [5] }) @@ -78,6 +79,7 @@ , ContentCell 1 1 [" two "] ] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [5, 5] }) @@ -98,6 +100,7 @@ , ContentCell 1 1 [" fish "] ] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [4, 6] }) @@ -119,6 +122,7 @@ , ContentCell 1 1 [" two "] ] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [5] }) @@ -142,6 +146,7 @@ , ContentCell 1 1 [" three "] ] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [5, 7] }) @@ -166,6 +171,7 @@ , ContentCell 1 1 [" 2 "] ] , arrayTableHead = Just 1 + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [5, 5] }) @@ -188,6 +194,7 @@ , ContentCell 1 1 [" 3 "] ] , arrayTableHead = Just 1 + , arrayTableFoot = Nothing , arrayTableColSpecs = listArray (1, 3) [ (AlignLeft, 6) , (AlignCenter, 8) @@ -195,6 +202,57 @@ ] }) ] + , testGroup "table foot" + [ testCase "simple foot" $ + let gt = T.unlines + [ "+------+-------+" + , "| Item | Price |" + , "+======+=======+" + , "| Eggs | 5£ |" + , "+------+-------+" + , "| Spam | 3£ |" + , "+======+=======+" + , "| Sum | 8£ |" + , "+======+=======+" + ] + in parse' gridTable gt @?= + Right (ArrayTable + { arrayTableCells = listArray ((1,1), (4, 2)) + [ ContentCell 1 1 [" Item "] + , ContentCell 1 1 [" Price "] + , ContentCell 1 1 [" Eggs "] + , ContentCell 1 1 [" 5£ "] + , ContentCell 1 1 [" Spam "] + , ContentCell 1 1 [" 3£ "] + , ContentCell 1 1 [" Sum "] + , ContentCell 1 1 [" 8£ "] + ] + , arrayTableHead = Just 1 + , arrayTableFoot = Just 4 + , arrayTableColSpecs = defaultAlign [6, 7] + }) + + , testCase "table without body" $ + let gt = T.unlines + [ "+------+-------+" + , "| Item | Price |" + , "+======+=======+" + , "| Sum | 8£ |" + , "+======+=======+" + ] + in parse' gridTable gt @?= + Right (ArrayTable + { arrayTableCells = listArray ((1,1), (2, 2)) + [ ContentCell 1 1 [" Item "] + , ContentCell 1 1 [" Price "] + , ContentCell 1 1 [" Sum "] + , ContentCell 1 1 [" 8£ "] + ] + , arrayTableHead = Just 1 + , arrayTableFoot = Just 2 + , arrayTableColSpecs = defaultAlign [6, 7] + }) + ] , testCase "marker in first line" $ let gt = T.unlines @@ -215,6 +273,7 @@ , ContentCell 1 1 [" c 3 "] ] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = listArray (1, 3) [ (AlignLeft, 6) , (AlignCenter, 8) @@ -234,6 +293,7 @@ { arrayTableCells = listArray ((1,1), (1, 2)) [ ContentCell 1 1 ["é"] , ContentCell 1 1 [" x "]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [2, 3] }) @@ -248,6 +308,7 @@ { arrayTableCells = listArray ((1,1), (1, 2)) [ ContentCell 1 1 ["x\8203y"] , ContentCell 1 1 [" z "]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [2, 3] }) @@ -262,6 +323,7 @@ { arrayTableCells = listArray ((1,1), (1, 2)) [ ContentCell 1 1 ["é\8203y"] , ContentCell 1 1 [" z "]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [3, 3] }) @@ -276,6 +338,7 @@ { arrayTableCells = listArray ((1,1), (1, 2)) [ ContentCell 1 1 ["y\8203é"] , ContentCell 1 1 [" z "]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [3, 3] }) @@ -290,6 +353,7 @@ { arrayTableCells = listArray ((1,1), (1, 2)) [ ContentCell 1 1 ["a\8204\8205b"] , ContentCell 1 1 [" c "]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [2, 3] }) @@ -304,6 +368,7 @@ { arrayTableCells = listArray ((1,1), (1, 2)) [ ContentCell 1 1 ["ï¼ï¼ï¼ï¼ï¼"] , ContentCell 1 1 ["a"]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [10, 1] }) @@ -323,6 +388,7 @@ { arrayTableCells = listArray gbounds [ ContentCell 1 1 [" one"]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [5] }) @@ -337,6 +403,7 @@ { arrayTableCells = listArray ((1,1), (1,1)) [ ContentCell 1 1 [" 1 "]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [3] }) @@ -356,6 +423,7 @@ , ContentCell 1 1 ["one"] , ContentCell 1 1 ["two"]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [3, 3] }) @@ -380,6 +448,7 @@ , ContentCell 1 1 ["more text"] ] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [4, 9] }) @@ -399,6 +468,7 @@ , ContentCell 1 1 ["one"] , ContentCell 1 1 ["two"]] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [3, 3] }) @@ -433,6 +503,7 @@ , ContentCell 1 1 "3" ] , arrayTableHead = Nothing + , arrayTableFoot = Nothing , arrayTableColSpecs = defaultAlign [5, 7] } :: ArrayTable Text in rows gt @?= [ [Cell "1" 2 1, Cell "2" 1 1]
