| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 |
|
| 23 | (define-module (gnu packages wireservice)
|
| 24 | #:use-module ((guix licenses) #:prefix license:)
|
| 25 | #:use-module (guix build-system pyproject)
|
| 26 | #:use-module (guix download)
|
| 27 | #:use-module (guix gexp)
|
| 28 | #:use-module (guix git-download)
|
| 29 | #:use-module (guix packages)
|
| 30 | #:use-module (gnu packages)
|
| 31 | #:use-module (gnu packages base)
|
| 32 | #:use-module (gnu packages check)
|
| 33 | #:use-module (gnu packages databases)
|
| 34 | #:use-module (gnu packages python-build)
|
| 35 | #:use-module (gnu packages python-web)
|
| 36 | #:use-module (gnu packages python-xyz)
|
| 37 | #:use-module (gnu packages sphinx)
|
| 38 | #:use-module (gnu packages time)
|
| 39 | #:use-module (gnu packages xml))
|
| 40 |
|
| 41 | (define-public python-leather
|
| 42 | (package
|
| 43 | (name "python-leather")
|
| 44 | (version "0.4.0")
|
| 45 | (source
|
| 46 | (origin
|
| 47 | (method git-fetch)
|
| 48 | (uri (git-reference
|
| 49 | (url "https://github.com/wireservice/leather")
|
| 50 | (commit version)))
|
| 51 | (file-name (git-file-name name version))
|
| 52 | (sha256
|
| 53 | (base32 "193hchrcrh5zyj0xlfs839h25jwzxvzjpbniqjd18mgnip5mk0zn"))))
|
| 54 | (build-system pyproject-build-system)
|
| 55 | |
| 56 | |
| 57 | (native-inputs
|
| 58 | (list python-cssselect
|
| 59 | python-lxml
|
| 60 | python-pytest
|
| 61 | python-setuptools
|
| 62 | python-sphinx
|
| 63 | python-sphinx-design
|
| 64 | python-wheel))
|
| 65 | (home-page "https://leather.rtfd.org")
|
| 66 | (synopsis "Python charting for 80% of humans")
|
| 67 | (description
|
| 68 | "Leather is a Python charting library for those who need charts now and
|
| 69 | don't care if they're perfect.")
|
| 70 | (license license:expat)))
|
| 71 |
|
| 72 | (define python-agate-locales
|
| 73 | (make-glibc-utf8-locales
|
| 74 | glibc
|
| 75 | #:locales (list "ko_KR")
|
| 76 | #:name "python-agate-locales"))
|
| 77 |
|
| 78 | (define-public python-agate
|
| 79 | (package
|
| 80 | (name "python-agate")
|
| 81 | (version "1.12.0")
|
| 82 | (source
|
| 83 | (origin
|
| 84 | (method git-fetch)
|
| 85 | (uri (git-reference
|
| 86 | (url "https://github.com/wireservice/agate")
|
| 87 | (commit version)))
|
| 88 | (file-name (git-file-name name version))
|
| 89 | (sha256
|
| 90 | (base32 "1qvjlcbv42pjphz5i7vvd5p25barqmglhdzksaspg66n83gps8gv"))))
|
| 91 | (build-system pyproject-build-system)
|
| 92 | |
| 93 | |
| 94 | (native-inputs
|
| 95 | (list (libc-utf8-locales-for-target)
|
| 96 | python-agate-locales
|
| 97 | python-cssselect
|
| 98 | python-lxml
|
| 99 | python-pytest
|
| 100 | python-setuptools
|
| 101 | python-wheel))
|
| 102 | (propagated-inputs
|
| 103 | (list python-babel
|
| 104 | python-isodate
|
| 105 | python-leather
|
| 106 | python-parsedatetime
|
| 107 | python-pytimeparse
|
| 108 | python-slugify
|
| 109 | python-tzdata))
|
| 110 | (home-page "https://agate.rtfd.org")
|
| 111 | (synopsis "Data analysis library")
|
| 112 | (description
|
| 113 | "Agate is a Python data analysis library. It is an alternative to numpy
|
| 114 | and pandas that solves real-world problems with readable code. Agate was
|
| 115 | previously known as journalism.")
|
| 116 | (license license:expat)))
|
| 117 |
|
| 118 | (define-public python-agate-sql
|
| 119 | (package
|
| 120 | (name "python-agate-sql")
|
| 121 | (version "0.7.3")
|
| 122 | (source
|
| 123 | (origin
|
| 124 | (method git-fetch)
|
| 125 | (uri (git-reference
|
| 126 | (url "https://github.com/wireservice/agate-sql")
|
| 127 | (commit version)))
|
| 128 | (file-name (git-file-name name version))
|
| 129 | (sha256
|
| 130 | (base32 "04rcrcv57wdbkg90k1s0rwhlw223nm9fhw9x6xkl8nwxr0n6zyk0"))))
|
| 131 | (build-system pyproject-build-system)
|
| 132 | |
| 133 | |
| 134 | (arguments
|
| 135 | (list
|
| 136 | #:test-flags
|
| 137 | |
| 138 | |
| 139 | #~(list "-k" "not test_to_sql_create_statement_with_dialects")))
|
| 140 | (native-inputs
|
| 141 | (list python-pytest
|
| 142 | |
| 143 | python-setuptools))
|
| 144 | (propagated-inputs
|
| 145 | (list python-agate
|
| 146 | python-sqlalchemy))
|
| 147 | (home-page "https://agate-sql.rtfd.org")
|
| 148 | (synopsis "SQL read/write support to agate")
|
| 149 | (description
|
| 150 | "@code{agatesql} uses a monkey patching pattern to add SQL support to all
|
| 151 | @code{agate.Table} instances.")
|
| 152 | (license license:expat)))
|
| 153 |
|
| 154 | (define-public python-agate-dbf
|
| 155 | (package
|
| 156 | (name "python-agate-dbf")
|
| 157 | (version "0.2.3")
|
| 158 | (source
|
| 159 | (origin
|
| 160 | (method git-fetch)
|
| 161 | (uri (git-reference
|
| 162 | (url "https://github.com/wireservice/agate-dbf")
|
| 163 | (commit version)))
|
| 164 | (file-name (git-file-name name version))
|
| 165 | (sha256
|
| 166 | (base32 "0z9zmc05sjxw02xl9ygjsdyp32nb3m2qrig0pmvhvf5hj1faigxi"))))
|
| 167 | (build-system pyproject-build-system)
|
| 168 | |
| 169 | |
| 170 | (native-inputs
|
| 171 | (list python-pytest
|
| 172 | python-setuptools
|
| 173 | python-wheel))
|
| 174 | (propagated-inputs
|
| 175 | (list python-agate
|
| 176 | python-dbfread))
|
| 177 | (home-page "https://agate-dbf.rtfd.org")
|
| 178 | (synopsis "Add read support for dbf files to agate")
|
| 179 | (description
|
| 180 | "@code{agatedbf} uses a monkey patching pattern to add read for dbf files
|
| 181 | support to all @code{agate.Table} instances.")
|
| 182 | (license license:expat)))
|
| 183 |
|
| 184 | (define-public python-agate-excel
|
| 185 | (package
|
| 186 | (name "python-agate-excel")
|
| 187 | (version "0.4.1")
|
| 188 | (source
|
| 189 | (origin
|
| 190 | (method git-fetch)
|
| 191 | (uri (git-reference
|
| 192 | (url "https://github.com/wireservice/agate-excel")
|
| 193 | (commit version)))
|
| 194 | (file-name (git-file-name name version))
|
| 195 | (sha256
|
| 196 | (base32 "0mg5ldnyc72yllwl8x2gpb142l43wss5f4sgp610db1v2w12rzhj"))))
|
| 197 | (build-system pyproject-build-system)
|
| 198 | |
| 199 | |
| 200 | (native-inputs
|
| 201 | (list python-pytest
|
| 202 | python-setuptools
|
| 203 | python-wheel))
|
| 204 | (propagated-inputs
|
| 205 | (list python-agate
|
| 206 | python-olefile
|
| 207 | python-openpyxl
|
| 208 | python-xlrd))
|
| 209 | (home-page "https://agate-excel.rtfd.org")
|
| 210 | (synopsis "Add read support for Excel files (xls and xlsx) to agate")
|
| 211 | (description
|
| 212 | "@code{agateexcel} uses a monkey patching pattern to add read for xls and
|
| 213 | xlsx files support to all @code{agate.Table} instances.")
|
| 214 | (license license:expat)))
|
| 215 |
|
| 216 | (define-public csvkit
|
| 217 | (package
|
| 218 | (name "csvkit")
|
| 219 | (version "2.0.1")
|
| 220 | (source
|
| 221 | (origin
|
| 222 | (method url-fetch)
|
| 223 | (uri (pypi-uri "csvkit" version))
|
| 224 | (sha256
|
| 225 | (base32 "1lbd2khkyr75rdc2fblvv8qkl33fv3nx6kj158qzy4spdlk6155a"))
|
| 226 | (patches
|
| 227 | (search-patches "csvkit-set-locale-for-tests.patch"))))
|
| 228 | (outputs (list "out" "doc"))
|
| 229 | (build-system pyproject-build-system)
|
| 230 | (arguments
|
| 231 | (list
|
| 232 | |
| 233 | #:test-flags #~(list "-k" "not test_decimal_format")
|
| 234 | #:phases
|
| 235 | #~(modify-phases %standard-phases
|
| 236 | (add-after 'install 'install-docs
|
| 237 | (lambda _
|
| 238 | (let* ((man1 (string-append #$output:doc "/share/man/man1")))
|
| 239 | (with-directory-excursion "docs"
|
| 240 | (invoke "make" "man")
|
| 241 | (copy-recursively "_build/man" man1))))))))
|
| 242 | (native-inputs
|
| 243 | (list (libc-utf8-locales-for-target)
|
| 244 | python-psycopg2 |
| 245 | python-pytest
|
| 246 | python-setuptools
|
| 247 | python-sphinx
|
| 248 | python-sphinx-rtd-theme
|
| 249 | python-wheel))
|
| 250 | (inputs
|
| 251 | (list python-agate-dbf
|
| 252 | python-agate-excel
|
| 253 | python-agate-sql
|
| 254 | python-text-unidecode))
|
| 255 | (home-page "https://csvkit.rtfd.org")
|
| 256 | (synopsis "Command-line tools for working with CSV")
|
| 257 | (description "csvkit is a suite of command-line tools for converting to
|
| 258 | and working with CSV. It provides the following commands:
|
| 259 | @itemize
|
| 260 | @item Input:
|
| 261 | @itemize
|
| 262 | @item @command{in2csv}: Convert various formats to CSV.
|
| 263 | @item @command{sql2csv}: Execute SQL commands on a database and return the
|
| 264 | data as CSV.
|
| 265 | @end itemize
|
| 266 | @item Processing:
|
| 267 | @itemize
|
| 268 | @item @command{csvclean}: Remove common syntax errors.
|
| 269 | @item @command{csvcut}: Filter and truncate CSV files.
|
| 270 | @item @command{csvgrep}: Filter tabular data to only those rows where
|
| 271 | certain columns contain a given value or match a regular expression.
|
| 272 | @item @command{csvjoin}: Merges two or more CSV tables together using a
|
| 273 | method analogous to SQL JOIN operation.
|
| 274 | @item @command{csvsort}: Sort CSV files.
|
| 275 | @item @command{csvstack}: Stack up the rows from multiple CSV files,
|
| 276 | optionally adding a grouping value to each row.
|
| 277 | @end itemize
|
| 278 | @item Output and analysis:
|
| 279 | @itemize
|
| 280 | @item @command{csvformat}: Convert a CSV file to a custom output format.
|
| 281 | @item @command{csvjson}: Converts a CSV file into JSON or GeoJSON.
|
| 282 | @item @command{csvlook}: Renders a CSV to the command line in a
|
| 283 | Markdown-compatible, fixed-width format.
|
| 284 | @item @command{csvpy}: Loads a CSV file into a @code{agate.csv.Reader}
|
| 285 | object and then drops into a Python shell so the user can inspect the data
|
| 286 | however they see fit.
|
| 287 | @item @command{csvsql}: Generate SQL statements for a CSV file or execute
|
| 288 | those statements directly on a database.
|
| 289 | @item @command{csvstat}: Prints descriptive statistics for all columns in a
|
| 290 | CSV file.
|
| 291 | @end itemize
|
| 292 | @end itemize")
|
| 293 | (license license:expat)))
|