cisagov / skeleton-generic

A generic skeleton project for quickly getting a new cisagov project started.
Creative Commons Zero v1.0 Universal
13 stars 11 forks source link

Detecting virtualenv installation successfully #134

Closed arcsector closed 1 year ago

arcsector commented 1 year ago

๐Ÿ—ฃ Description

Fixing #243

๐Ÿ’ญ Motivation and context

See #243 for context

๐Ÿงช Testing

Tested using pyenv in WSL2 without a pyenv-virtualenv binary in immediate path, despite having it installed properly and pyenv virtualenvs command working fine

โœ… Pre-approval checklist

arcsector commented 1 year ago

@mcdonnnj

mcdonnnj commented 1 year ago

@arcsector Please refer to the contributing guide and ensure the pre-commit checks run successfully. Feel free to either commit the changes or rebase your existing commit to fix the issue.

arcsector commented 1 year ago

You guys need to bump your accepted python versions on your other repos - pre-commit's latest accepted version is 3.8: https://github.com/pre-commit/pre-commit/blob/main/setup.cfg

My pre-commit only shows this error:

Validate docker-compose files........................(no files to check)Skipped
Packer Validate..........................................................Failed
- hook id: packer_validate
- exit code: 1

packer is required

Packer Format........................................(no files to check)Skipped

I'm not sure where you get or need this config - any info on how to resolve this would be appreciated

mcdonnnj commented 1 year ago

You guys need to bump your accepted python versions on your other repos - pre-commit's latest accepted version is 3.8: https://github.com/pre-commit/pre-commit/blob/main/setup.cfg

My pre-commit only shows this error:

Validate docker-compose files........................(no files to check)Skipped
Packer Validate..........................................................Failed
- hook id: packer_validate
- exit code: 1

packer is required

Packer Format........................................(no files to check)Skipped

I'm not sure where you get or need this config - any info on how to resolve this would be appreciated

The pre-commit configuration only specifies python3 so I'm not sure what you're referencing. If you are referring to the GitHub Actions workflow for cisagov/pshtt then that is because Python 3.7 is the latest version of Python the package currently supports. All our other repos should generally be using Python 3.11 for the job that runs pre-commit.

The error you are seeing is because there are some tool binaries our pre-commit configuration relies upon (because of the configured hooks). Based on the error message you are missing Packer.

jsf9k commented 1 year ago

I'm glad to see this finally get fixed! Thank you @arcsector!

arcsector commented 1 year ago

Thanks for the help @jsf9k - looks good to go.

jsf9k commented 1 year ago

Thanks for the help @jsf9k - looks good to go.

We have a process (cisagov/action-lineage) that walks through our repos and propagates upstream changes. To avoid a constant barrage of small PRs in every repo that inherits from this one (which is most of the repos in cisagov), we tend wait until we have several pending PRs before kicking that process off. This PR will definitely get merged the next time we kick off that process.