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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup-env should check that Python version is a valid semantic version #167

Open
jsf9k opened this issue Feb 7, 2024 · 3 comments 路 May be fixed by #176
Open

setup-env should check that Python version is a valid semantic version #167

jsf9k opened this issue Feb 7, 2024 · 3 comments 路 May be fixed by #176
Assignees
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use

Comments

@jsf9k
Copy link
Member

jsf9k commented Feb 7, 2024

馃挕 Summary

When the user specifies a Python version via -v or --version, setup-env should verify that the specified version is a valid semantic version.

Motivation and context

Python uses semantic versioning, so it makes sense to perform this additional check.

Implementation notes

One of these regexes should do the trick.

@jsf9k jsf9k added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Feb 7, 2024
@michaelsaki michaelsaki self-assigned this Feb 12, 2024
@michaelsaki
Copy link
Collaborator

@jsf9k I have the fix for this here https://github.com/cisagov/skeleton-generic/tree/improvement/correct-semantic-python-version-checks. I am waiting for PR: #166 to get approved and merged before opening the PR since it is based off of that branch.

@michaelsaki michaelsaki added the blocked This issue or pull request is awaiting the outcome of another issue or pull request label Feb 20, 2024
@michaelsaki michaelsaki removed the blocked This issue or pull request is awaiting the outcome of another issue or pull request label Mar 18, 2024
@michaelsaki
Copy link
Collaborator

@cisagov/team-ois Going to open a PR for this shortly but one thing I wanted to check was how do we want the error message to look for an invalid semantic version of Python?

Right now I have it set to Error: The specified Python version: {invalid_sematic_version}, does not follow the semantic versioning standard.

Are we ok with this? I was also considering providing them with an example of a valid semantic version but wasn't sure if that might be overkill.

@jsf9k
Copy link
Member Author

jsf9k commented Mar 20, 2024

Just state that it is an invalid version of Python. Python follows semantic versioning, so any version string that is not a valid semantic version is an invalid version of Python.

@michaelsaki michaelsaki linked a pull request Mar 20, 2024 that will close this issue
9 tasks
@michaelsaki michaelsaki linked a pull request Mar 20, 2024 that will close this issue
9 tasks
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
Projects
Status: Review in progress
Development

Successfully merging a pull request may close this issue.

2 participants