File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed
src/afterpython/templates Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 3333 - name : Install dependencies
3434 # Install the package with uv in system mode
3535 # This installs ruff and other tools defined in dependencies
36- run : uv pip install --system .
36+ run : uv pip install --system . --group dev
3737
3838 - name : Run ruff check
3939 run : ruff check --config ./afterpython/ruff.toml .
@@ -189,9 +189,18 @@ jobs:
189189 run : uv pip install --system dist/*.whl
190190
191191 - name : Verify installation
192- # Confirm the CLI entry point works
193- # This ensures the package is usable after installation
194- run : ap --help
192+ # Generic verification: assume project.name maps to import name
193+ # by replacing '-' with '_'. If a project breaks this rule, CI fails.
194+ run : |
195+ PROJECT_NAME="$(python - <<'PY'
196+ import tomllib
197+ with open("pyproject.toml", "rb") as f:
198+ data = tomllib.load(f)
199+ print(data["project"]["name"])
200+ PY
201+ )"
202+ IMPORT_NAME="${PROJECT_NAME//-/_}"
203+ python -c "import ${IMPORT_NAME}"
195204
196205 # Job 5: Type Check
197206 # typecheck:
Original file line number Diff line number Diff line change 3333 - name : Install dependencies
3434 # Install the package with uv in system mode
3535 # This installs ruff and other tools defined in dependencies
36- run : uv pip install --system .
36+ run : uv pip install --system . --group dev
3737
3838 - name : Run ruff check
3939 run : ruff check --config ./afterpython/ruff.toml .
@@ -189,9 +189,18 @@ jobs:
189189 run : uv pip install --system dist/*.whl
190190
191191 - name : Verify installation
192- # Confirm the CLI entry point works
193- # This ensures the package is usable after installation
194- run : ap --help
192+ # Generic verification: assume project.name maps to import name
193+ # by replacing '-' with '_'. If a project breaks this rule, CI fails.
194+ run : |
195+ PROJECT_NAME="$(python - <<'PY'
196+ import tomllib
197+ with open("pyproject.toml", "rb") as f:
198+ data = tomllib.load(f)
199+ print(data["project"]["name"])
200+ PY
201+ )"
202+ IMPORT_NAME="${PROJECT_NAME//-/_}"
203+ python -c "import ${IMPORT_NAME}"
195204
196205 # Job 5: Type Check
197206 # typecheck:
You can’t perform that action at this time.
0 commit comments