File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
{{cookiecutter.project_slug}} Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 7878 make package
7979 make doc
8080 cd .. && rm -rf /tmp/bit-trails
81+
82+ - name : run template (no docs)
83+ run : |
84+ cookiecutter --no-input -o /tmp . documentation='none'
85+
86+ [[ -d /tmp/python-project/src/python_project ]] || { >&2 echo "not generated?"; exit 1; }
87+ [[ ! -f /tmp/python-project/.github/workflows/docs.yml ]] || { >&2 echo "not expecting docs.yml"; exit 1; }
88+
89+ cd /tmp/python-project
90+ make dev
91+ make reformat
92+ make lint
93+ make test
94+ make package
95+ make doc
96+ cd .. && rm -rf /tmp/python-project
Original file line number Diff line number Diff line change 55 # We delete _cli.py and __main__.py if we're not generating a CLI.
66 "{% if cookiecutter.entry_point == '' %} {{ cookiecutter.__project_src_path }}/_cli.py {% endif %}" ,
77 "{% if cookiecutter.entry_point == '' %} {{ cookiecutter.__project_src_path }}/__main__.py {% endif %}" ,
8+ # We delete the docs GH workflow if the project has no documentation
9+ "{% if cookiecutter.documentation == 'none' %} .github/workflows/docs.yml {% endif %}" ,
810]
911
1012for path in REMOVE_PATHS :
Original file line number Diff line number Diff line change @@ -82,9 +82,14 @@ test tests: $(VENV)/pyvenv.cfg
8282 python -m coverage report -m $(COV_ARGS )
8383
8484.PHONY : doc
85+ {%- if cookiecutter.documentation == 'pdoc' %}
8586doc : $(VENV ) /pyvenv.cfg
8687 . $(VENV_BIN ) /activate && \
8788 pdoc -o html $(PY_IMPORT )
89+ {%- elif cookiecutter.documentation == 'none' %}
90+ doc :
91+ @echo " No documentation set up"
92+ {%- endif %}
8893
8994.PHONY : package
9095package : $(VENV ) /pyvenv.cfg
You can’t perform that action at this time.
0 commit comments