• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hgrecco / pint / 1705
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 02 Apr 2020 05:16AM UTC
Jobs 16
Files 18
Run time 7min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1705

push

travis-ci

web-flow
Merge #1041

1041: Return expected empty type for parse_pattern function r=hgrecco a=abmyii

N.B. Pardon me if I didn't follow convention by opening an issue before making this PR.

Whilst using the `parse_pattern` function with `pandas` I realised the `return self.Quantity(1)` returned a dimensionless quantity which would be out of place compared to all of the other returned values causing parsing issues. The error I was getting was:
```
  File "/usr/lib/python3.6/site-packages/pandas/core/frame.py", line 1598, in from_records
    arrays, arr_columns = to_arrays(data, columns, coerce_float=coerce_float)
  File "/usr/lib/python3.6/site-packages/pandas/core/internals/construction.py", line 464, in to_arrays
    return _list_to_arrays(data, columns, coerce_float=coerce_float, dtype=dtype)
  File "/usr/lib/python3.6/site-packages/pandas/core/internals/construction.py", line 496, in _list_to_arrays
    content = list(lib.to_object_array(data).T)
  File "pandas/_libs/lib.pyx", line 2275, in pandas._libs.lib.to_object_array
  File "/usr/lib/python3.6/site-packages/pint/quantity.py", line 1693, in __len__
    return len(self._magnitude)
TypeError: object of type 'int' has no len()
```

This simple fix returns a value which conforms with the expected output type.

Co-authored-by: Abdurrahmaan Iqbal <abdurrahmaaniqbal@hotmail.com>

3575 of 3977 relevant lines covered (89.89%)

11.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1705.1 (PKGS="python=3.7 flake8 black isort") 02 Apr 2020 05:16AM UTC 0
Travis Job 1705.1
2 1705.2 (PKGS="python=3.7 ipython matplotlib nbsphinx numpy sphinx Pygments==2.3.1 docutils==0.14 alabaster commonmark==0.8.1 recommonmark==0.5.0") 02 Apr 2020 05:18AM UTC 0
Travis Job 1705.2
3 1705.3 (PKGS="python=3.6") 02 Apr 2020 05:17AM UTC 0
75.47
Travis Job 1705.3
4 1705.4 (PKGS="python=3.7") 02 Apr 2020 05:18AM UTC 0
75.47
Travis Job 1705.4
5 1705.5 (PKGS="python=3.8") 02 Apr 2020 05:19AM UTC 0
75.84
Travis Job 1705.5
6 1705.6 (PKGS="python=3.6 uncertainties=3.0") 02 Apr 2020 05:19AM UTC 0
88.21
Travis Job 1705.6
7 1705.7 (PKGS="python=3.7 uncertainties=3.0") 02 Apr 2020 05:20AM UTC 0
88.29
Travis Job 1705.7
8 1705.8 (PKGS="python=3.6 numpy=1.14 matplotlib") 02 Apr 2020 05:21AM UTC 0
85.07
Travis Job 1705.8
9 1705.9 (PKGS="python=3.7 numpy=1.14 matplotlib") 02 Apr 2020 05:21AM UTC 0
84.99
Travis Job 1705.9
10 1705.10 (PKGS="python=3.8 numpy=1.17 matplotlib") 02 Apr 2020 05:21AM UTC 0
87.57
Travis Job 1705.10
11 1705.11 (PKGS="python=3.6 numpy=1.14 uncertainties=3.0") 02 Apr 2020 05:22AM UTC 0
86.1
Travis Job 1705.11
12 1705.12 (PKGS="python=3.7 numpy=1.14 uncertainties=3.0") 02 Apr 2020 05:22AM UTC 0
86.1
Travis Job 1705.12
13 1705.13 (PKGS="python=3.6 numpy uncertainties") 02 Apr 2020 05:23AM UTC 0
88.29
Travis Job 1705.13
14 1705.14 (PKGS="python=3.7 numpy uncertainties") 02 Apr 2020 05:23AM UTC 0
88.21
Travis Job 1705.14
15 1705.15 (PKGS="python=3.8 numpy uncertainties") 02 Apr 2020 05:23AM UTC 0
88.48
Travis Job 1705.15
16 1705.16 (PKGS="python=3.8 numpy uncertainties sparse xarray netCDF4") 02 Apr 2020 05:24AM UTC 0
88.58
Travis Job 1705.16
Source Files on build 1705
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1705
  • 4a8ca9c0 on github
  • Prev Build on staging (#1703)
  • Next Build on staging (#1712)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc