Skip to content

Python package namespace support (#8) #16

Python package namespace support (#8)

Python package namespace support (#8) #16

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
self-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: install cookiecutter
run: python -m pip install cookiecutter
- name: run template (default)
run: |
cookiecutter --no-input -o /tmp .
[[ -d /tmp/python-project/python_project ]] || { >&2 echo "not generated?"; exit 1; }
cd /tmp/python-project
make dev
make reformat
make lint
make test
make package
make doc
cd .. && rm -rf /tmp/python-project
- name: run template (no entry point)
run: |
cookiecutter --no-input -o /tmp . entry_point=''
[[ ! -f /tmp/python-project/python_project/__main__.py ]] || { >&2 echo "not expecting main"; exit 1; }
cd /tmp/python-project
make dev
make reformat
make lint
make test
make package
make doc
cd .. && rm -rf /tmp/python-project
- name: run template (namespace)
run: |
cookiecutter --no-input -o /tmp . project_namespace_import=tob.r_and_e
[[ -d /tmp/tob-r-and-e-python-project/tob/r_and_e/python_project ]] || { >&2 echo "not generated?"; exit 1; }
cd /tmp/tob-r-and-e-python-project
make dev
make reformat
make lint
make test
make package
make doc
cd .. && rm -rf /tmp/tob-r-and-e-python-project
- name: run template (namespace, short slug)
run: |
cookiecutter --no-input -o /tmp . project_namespace_import=tob.r_and_e "project_name=Bit Trails" project_slug=bit-trails
[[ -d /tmp/bit-trails/tob/r_and_e/bit_trails ]] || { >&2 echo "not generated?"; exit 1; }
cd /tmp/bit-trails
make dev
make reformat
make lint
make test
make package
make doc
cd .. && rm -rf /tmp/bit-trails