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

LibraryOfCongress / bagit-python / 295
84%
master: 83%

Build:
Build:
LAST BUILD BRANCH: dependabot/pip/py-1.10.0
DEFAULT BRANCH: master
Ran 05 Feb 2019 10:08PM UTC
Jobs 5
Files 1
Run time 2min
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
295

Pull #129

travis-ci

web-flow
Add support for --wrap option

The previous behavior of `bagit.py` was asymmetrical with respect to how
it treated long tag lines: it would handle folded lines when reading
the `bag-info.txt` file, but it would not fold long lines when writing
long tag values into `bag-info.txt`.  This was hardwired into the
function `_make_tag_file()`, which explicitly stripped line endings from
tag values before writing them.

Section 2.2.2 of the BagIt spec (https://tools.ietf.org/html/rfc8493)
states the following:

   It is RECOMMENDED that lines not exceed 79 characters in length.
   Long values MAY be continued onto the next line by inserting a LF,
   CR, or CRLF, and then indenting the next line with one or more linear
   white space characters (spaces or tabs).  Except for linebreaks, such
   padding does not form part of the value.

This commit adds a new command-line option, `--wrap`, and a new
parameter named `line_width` to the functions `make_bag()` and
`save()`, to make it possible to follow the recommendation. The
default value is 0, which means don't wrap (which is the original
behavior).  An integer value greater than 0 causes line-wrapping to be
performed on a best-effort basis to limit line lengths to the given
value.
Pull Request #129: Add support for --wrap option

298 of 365 branches covered (81.64%)

Branch coverage included in aggregate %.

11 of 11 new or added lines in 1 file covered. (100.0%)

615 of 731 relevant lines covered (84.13%)

4.13 hits per line

Jobs
ID Job ID Ran Files Coverage
1 295.1 05 Feb 2019 10:08PM UTC 0
82.82
Travis Job 295.1
2 295.2 05 Feb 2019 10:08PM UTC 0
82.15
Travis Job 295.2
3 295.3 05 Feb 2019 10:09PM UTC 0
82.15
Travis Job 295.3
4 295.4 05 Feb 2019 10:10PM UTC 0
82.15
Travis Job 295.4
5 295.5 05 Feb 2019 10:11PM UTC 0
82.33
Travis Job 295.5
Source Files on build 295
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #295
  • Pull Request #129
  • PR Base - master (#289)
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

© 2026 Coveralls, Inc