Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Merge the v1.1.1 branch #14

Merged
merged 13 commits into from
Jan 24, 2022
Merged

Merge the v1.1.1 branch #14

merged 13 commits into from
Jan 24, 2022

Conversation

mcdonnnj
Copy link
Member

@mcdonnnj mcdonnnj commented Jan 24, 2022

πŸ—£ Description

This pull request merges the v1.1.1 branch with the following changes:

πŸ’­ Motivation and context

The desired changes for v1.1.1 have been made and now need to be rolled out as a new release.

πŸ§ͺ Testing

Automated tests pass. This branch was tested in this Actions run.

βœ… Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

βœ… Pre-merge checklist

  • Finalize version.

βœ… Post-merge checklist

  • Add a tag or create a release.

The itertools.groupby() function only correctly functions if the list
it is grouping is pre-sorted in the same manner as the grouping key. If
the list is not similarly sorted it will result in lost list items. We
also switch to using `.lower()` instead of `.upper()` to be consistent
with other sorting in this project.
Fix bug in the `convert-cisagov` command
Sort the entries in each group of converted entries by vendor and then
product. Both are converted to lowercase to create a case-insensitive
sort. This will provide the most human-friendly sort.
Update the sort rules in the normalize-yml command to be consistent
with the sorting done in the convert-cisagov command. That is to sort
by vendor and then product for a human-friendly sorted output.
Since the conversion is logically one moment in time then the timestamp
used for records that do not have one should be the same.
Use the logging library to output messages when handling exceptions
instead of manually redirecting print to stderr.
Ensure that only truthy values that have been cast to str are passed to
len() checks when outputting rows. This will ensure that numeric values
are correctly handled if they were not stored as strings in the source
YAML file.
…amp_when_converting

Use the same default timestamp for converted data in `convert-cisagov`
…sion

Ensure values are `str` types when converting from YAML to Markdown
Disable the use of aliases in YAML output in this project to allow each
entry to store all the data it needs. This will ensure that no matter
how often our YAML files are run through the normalize-yml command they
will retain all information necessary regardless of entry changes.
@mcdonnnj mcdonnnj added bug This issue or pull request addresses broken functionality improvement This issue or pull request will add new or improve existing functionality labels Jan 24, 2022
@mcdonnnj mcdonnnj self-assigned this Jan 24, 2022
@coveralls
Copy link

coveralls commented Jan 24, 2022

Pull Request Test Coverage Report for Build 1741836073

  • 4 of 20 (20.0%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 30.333%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ymlmd/yml2md.py 0 2 0.0%
src/yml/normalize_yml.py 2 5 40.0%
src/mdyml/convert_cisagov.py 2 13 15.38%
Files with Coverage Reduction New Missed Lines %
src/mdyml/convert_cisagov.py 2 20.94%
Totals Coverage Status
Change from base Build 1694857759: 0.1%
Covered Lines: 107
Relevant Lines: 352

πŸ’› - Coveralls

Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:=

Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mcdonnnj mcdonnnj merged commit 8527ea0 into develop Jan 24, 2022
@mcdonnnj mcdonnnj deleted the v1.1.1 branch February 14, 2022 21:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue or pull request addresses broken functionality improvement This issue or pull request will add new or improve existing functionality
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants