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

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

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

05 Feb 2019 10:07PM UTC coverage: 82.815% (+0.4%) from 82.385%
295.1

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

295 of 363 branches covered (81.27%)

Branch coverage included in aggregate %.

611 of 731 relevant lines covered (83.58%)

0.84 hits per line

Source Files on job 295.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 285
  • Travis Job 295.1
  • f79bdbab on github
  • Prev Job for on wrap-tag-lines (#289.2)
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