Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in upstream updates #8

Merged
merged 552 commits into from
Jun 13, 2022
Merged

Pull in upstream updates #8

merged 552 commits into from
Jun 13, 2022

Conversation

mcdonnnj
Copy link
Member

πŸ—£ Description

This pull request pulls in upstream updates from cisagov/skeleton-python-library which effectively re-skeletonizes the project at this point.

πŸ’­ Motivation and context

This project does not currently receive automatic updates from our Lineage process and no longer follows our current Python library development style as laid down in cisagov/skeleton-python-library. Being up to date and staying that way semi-automatically is always the best way for our actively used repositories to be.

πŸ§ͺ Testing

Automates tests pass.

βœ… 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 relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

βœ… Pre-merge checklist

  • Finalize version.

βœ… Post-merge checklist

  • Add a tag or create a release.

mcdonnnj and others added 30 commits October 22, 2020 10:48
Per prettier/prettier#9459 and specifically
prettier/prettier#9459 (comment)
the prettier hook for pre-commit is being broken out into its own repo.
Change repo for the prettier pre-commit hook
⚠️ CONFLICT! Lineage pull request for: skeleton
This additional clause must remain at the _end_ of the CODEOWNERS file
so that it cannot be overridden by a later clause.

We want to make it so that all the .github files including CODEOWNERS
are protected so only code owners (the dev team) can approve
modifications to them.

This will prevent configuration changes from breaking Actions and
other management-type functions that the files in this directory
control. By setting the .github files/folder to require code owner
approval for changes, workflow and management changes will require dev
team review and checking.

Resolves #56.
Thanks to @dav3r and @mcdonnnj for the suggestion.
There is no need to run python code to determine the python version.
Resolves #58.

See here for details:
https://github.com/actions/setup-python/blob/main/action.yml#L14-L16
Sort the install_requires and extras_require["test"] arguments by key.
Group related pre-commit hooks together. Make sure that hooks are
alphabetically sorted within those groups.
Switch to the file line reading version of extracting the version from
https://packaging.python.org/guides/single-sourcing-package-version/
instead of the exec method on the same page. The exec method required us to use
a "# nosec" to manually disable Bandit checking on that line. Although that
method is more straightforward, I do not feel that it is worth using an exec in
the codebase when another option is available.
…gihub-dir

Ensure that the cisagov devs are the owners of the .github directory
…re-simply

Use the python version output by actions/setup-python
Also updated the test and build jobs in the build workflow to mirror cache key
format changes in the lint job.
⚠️ CONFLICT! Lineage pull request for: skeleton
Sort the Package Requirements in setup.py
Remove or Explain Manual Testing Check Disables
Removed name because it was not more informative than the default. Swapped out
a hardcoded job reference for the github.job context value. Switch the base
cache key to a step environment value so we can set it once and reuse. Removed
additional restore-key value that might have undesirable results.
Use the full semver for the installed Python version in cache keys.
Update the comments to better mirror the current documentation for
github/codeql-action. Switch to block style for the map of languages.
Clean up the commenting while we're here.
Also clean up the commenting while we're here.
Lineage pull request for: skeleton
Add dist/ to the .gitignore file to better support local building.
Modernize the build process by using the build package instead of the
now deprecated setup.py install method. Remove installing the package
requirements as it is unnecessary for this build process. Upgrade the
setuptools package as part of the initial dependency installation.
Modernize the `build` step in the `build` workflow
As part of this the import statements are moved from the function level
to the module level. This is generally considered better practice
unless there is a specific reason it cannot be done at the module
level.
Add some basic functionality testing for the module. Switch to
importing the pymongo package directly instead of using import from to
import specific objects to the module namespace.
@mcdonnnj mcdonnnj added improvement This issue or pull request will add or improve functionality, maintainability, or ease of use upstream update This issue or pull request pulls in upstream updates labels Jun 13, 2022
@mcdonnnj mcdonnnj self-assigned this Jun 13, 2022
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.

Strong work!

@jsf9k jsf9k requested a review from dav3r June 13, 2022 13:47
@jsf9k jsf9k added this to In progress in BOD 18-01 via automation Jun 13, 2022
BOD 18-01 automation moved this from In progress to Reviewer approved Jun 13, 2022
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.

Nice work here! 🐲

I noted a few small items for you consideration.

tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Show resolved Hide resolved
tests/test_mongo_db_from_config.py Outdated Show resolved Hide resolved
mcdonnnj and others added 2 commits June 13, 2022 14:11
Fix some typos and capitalization that were found during review.

Co-authored-by: dav3r <david.redmin@trio.dhs.gov>
Clearly explain what each configuration file that is created is
supposed to test.

Co-authored-by: dav3r <david.redmin@trio.dhs.gov>
@mcdonnnj mcdonnnj added this to In progress in Cyber Hygiene (CyHy) via automation Jun 13, 2022
@mcdonnnj mcdonnnj moved this from In progress to Reviewer approved in Cyber Hygiene (CyHy) Jun 13, 2022
@mcdonnnj mcdonnnj merged commit 93a32f8 into develop Jun 13, 2022
BOD 18-01 automation moved this from Reviewer approved to Done Jun 13, 2022
@mcdonnnj mcdonnnj deleted the skeletonize branch June 13, 2022 18:54
Cyber Hygiene (CyHy) automation moved this from Reviewer approved to Done Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use upstream update This issue or pull request pulls in upstream updates
Projects
Status: Done
Status: Done
BOD 18-01
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants