eregs / regulations-parser

Parser for U.S. federal regulations and other regulatory information
Creative Commons Zero v1.0 Universal
36 stars 40 forks source link

Use FR volume/page instead of publication date when sorting #354

Closed cmc333333 closed 7 years ago

cmc333333 commented 7 years ago

We have been using effective date + publication date (falling back to document id) to determine the order of CFR versions. Unfortunately, as @meriouma discovered, multiple changes to a regulation can be published with the same effective date on the same day and be out of order with regards to the document id.

This modifies the version identifiers to account for federal register volume/page number in place of publication date. Along the way, it rewrites several tests to use py.test style.

Thanks for kicking this off @meriouma!

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.009%) to 91.922% when pulling 4d74ea5605ddbdd98f6b3143c607ed29fe1004ae on cmc333333:320-ordered-versions into 2d71aba81225fde1141c6790e83f003c49f8aea5 on eregs:master.