Jack Gerrits fadff4aece
Fix definition of workspace package, remove uv pin (#4830)
* Fix definition of workspace package, remove uv pin

* add  --all-packages

* pin docs uv versions for older project structure

* try old version to verify CI

* Use workflow target

* change syntax

* change check

* try with var in matrix

* add all packages to workspace

* remove project table
2024-12-27 13:11:42 -05:00

23 lines
642 B
Python

import re
import sys
from packaging import version
MODULE_REGEX = r"^[a-zA-Z][\-a-zA-Z0-9]+$"
package_name = "{{ cookiecutter.package_name }}"
at_least_one_error = False
if not re.match(MODULE_REGEX, package_name):
print(f'ERROR: "{package_name}" must use kebab case')
at_least_one_error = True
packaging_version = "{{ cookiecutter.version }}"
# Check version format using version.VERSION_PATTERN
if not re.match(version.VERSION_PATTERN, packaging_version, re.VERBOSE | re.IGNORECASE):
print(f'ERROR: "{packaging_version}" is not a valid version string')
at_least_one_error = True
if at_least_one_error:
sys.exit(1)