Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Final touch ups for the modernization effort #25

Merged
merged 30 commits into from
Feb 15, 2023

Conversation

mcdonnnj
Copy link
Member

🗣 Description

💭 Motivation and context

This pull request is a final "clean up" for the project modernization effort. It includes the following:

  • Integrate the latest from cisagov/skeleton-docker.
  • Update the dependabot configuration to check our pipenv dependencies.
  • Bump the version of Python used from 3.11.1 to 3.11.2.
  • Bump the versions of the following packages:

🧪 Testing

Automated tests pass. I verified that the output of this prerelease matches the currently in production output.

✅ 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.

mcdonnnj and others added 28 commits January 31, 2023 12:09
Add another `pip` package ecosystem for the `src/` directory so the
`pipenv` configuration is seen and maintained by dependabot.
Update pre-commit hooks using `pre-commit autoupdate`. The `ansible-lint` hook
is intentionally held back to be updated independently to v6.
Lineage pull request for: skeleton
When Dependabot creates a PR it requires this permission in order to
push Docker images to ghcr.io.
Update wheel along with pip and setuptools
In this case it doesn't matter because we are starting from a
Python3-specific base container, but other projects that use this
skeleton may not be.  Specifying pip3 ensures that the Python 2
version of pip is not called by mistake.
Specify the default group to run under in the Dockerfile
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
…/build-push-action-4

Bump docker/build-push-action from 3 to 4
Specify pip3 in the file where it got blown away by a rebase
- Bump pip from 22.3.1 to 23.0
- Bump setuptools from 65.7.0 to 67.3.1
- Bump pipenv from 2022.12.19 to 2023.2.4
This was done by running `pipenv lock` in the `src/` directory.
This was missed when the version was bumped.
This includes the Docker images used as well as the version specified
in the Pipfile.
Add some additional typing packges to improve analysis. Since this is a
Docker project it doesn't make sense to install packages into the local
Python environment for analysis.
@mcdonnnj mcdonnnj added improvement This issue or pull request will add or improve functionality, maintainability, or ease of use dependencies Pull requests that update a dependency file labels Feb 15, 2023
@mcdonnnj mcdonnnj self-assigned this Feb 15, 2023
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.

This looks great to me. I made one suggestion, but even if you choose to ignore it this PR is still approved.

Dockerfile Outdated Show resolved Hide resolved
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.

Looks great - nice work! 👍

Dockerfile Outdated Show resolved Hide resolved
Update the Docker configuration to use environment variables to house
the versions of pip, pipenv, setuptools, and wheel that are installed
directly in the Dockerfile. This will DRY out the configuration a bit
as well as ensuring that the same versions are used for packages that
are installed multiple times.

The environment variable name format is cribbed from the official
Python Docker image configuration:
https://github.com/docker-library/python/blob/0a56f04a07495e0ed61663c73bc0c2e175773ddc/3.11/alpine3.17/Dockerfile#L132-L135
I tested without the leading `PYTHON_` in the names and only observed a
failure for usage of `PIPENV_VERSION`. Following the above mentioned
standard seemed like a reasonable approach as a result.

Co-authored-by: Shane Frasier <[email protected]>
Dockerfile Outdated Show resolved Hide resolved
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.

Approval intensifies!!!

Since we regularly beat the drum about alphabetizing such things unless
there are technical constraints we should definitely be alphabetizing
these variables.

Co-authored-by: dav3r <[email protected]>
@mcdonnnj mcdonnnj merged commit 863ae7f into improvement/modernize_project Feb 15, 2023
@mcdonnnj mcdonnnj deleted the improvement/last_touchups branch February 15, 2023 20:17
@mcdonnnj mcdonnnj mentioned this pull request Feb 15, 2023
10 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants