diff --git a/template/.github/workflows/build.yml.jinja b/template/.github/workflows/build.yml.jinja index 08df76c..5542e1d 100644 --- a/template/.github/workflows/build.yml.jinja +++ b/template/.github/workflows/build.yml.jinja @@ -25,7 +25,7 @@ jobs: set -eux jlpm jlpm run lint:check -{% if test.lower().startswith('y') %} +{% if test %} - name: Test the extension run: | set -eux diff --git a/template/.github/workflows/prep-release.yml b/template/.github/workflows/prep-release.yml index a959203..7a2a18d 100644 --- a/template/.github/workflows/prep-release.yml +++ b/template/.github/workflows/prep-release.yml @@ -25,7 +25,6 @@ jobs: steps: - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 -{% raw %} - name: Prep Release id: prep-release uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2 @@ -41,4 +40,3 @@ jobs: - name: "** Next Step **" run: | echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}" -{% endraw %} diff --git a/template/.github/workflows/publish-release.yml b/template/.github/workflows/publish-release.yml index 2b48d06..dbaaeaa 100644 --- a/template/.github/workflows/publish-release.yml +++ b/template/.github/workflows/publish-release.yml @@ -18,7 +18,6 @@ jobs: steps: - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 -{% raw %} - name: Populate Release id: populate-release uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2 @@ -53,4 +52,3 @@ jobs: run: | echo "Failed to Publish the Draft Release Url:" echo ${{ steps.populate-release.outputs.release_url }} -{% endraw %} diff --git a/template/.gitignore.jinja b/template/.gitignore.jinja index be83552..fcbfa93 100644 --- a/template/.gitignore.jinja +++ b/template/.gitignore.jinja @@ -9,8 +9,8 @@ node_modules/ *.tsbuildinfo {{python_name}}/labextension # Version file is handled by hatchling -{{cookiecutter.python_name}}/_version.py -{% if cookiecutter.test.lower().startswith('y') %} +{{python_name}}/_version.py +{% if test %} # Integration tests ui-tests/test-results/ ui-tests/playwright-report/ diff --git a/template/package.json.jinja b/template/package.json.jinja index 9c6d8a4..392375e 100644 --- a/template/package.json.jinja +++ b/template/package.json.jinja @@ -27,7 +27,7 @@ "repository": { "type": "git", "url": "{{ repository }}.git" - },{% if test.lower().startswith('y') %} + },{% if test %} "workspaces": [ "ui-tests" ],{% endif %} @@ -60,13 +60,13 @@ }, "dependencies": { "@jupyterlab/application": "^4.0.0-beta.0"{% if kind.lower() == 'theme' %}, - "@jupyterlab/apputils": "^4.0.0-beta.0"{% endif %}{% if has_settings.lower().startswith('y') %}, + "@jupyterlab/apputils": "^4.0.0-beta.0"{% endif %}{% if has_settings %}, "@jupyterlab/settingregistry": "^4.0.0-beta.0"{% endif %}{% if kind.lower() == 'server' %}, "@jupyterlab/coreutils": "^6.0.0-beta.0", "@jupyterlab/services": "^7.0.0-beta.0"{% endif %} }, "devDependencies": { - "@jupyterlab/builder": "^4.0.0-beta.0",{% if test.lower().startswith('y') %} + "@jupyterlab/builder": "^4.0.0-beta.0",{% if test %} "@jupyterlab/testutils": "^4.0.0-beta.0", "@types/jest": "^29.2.0",{% endif %} "@types/json-schema": "^7.0.11", @@ -76,7 +76,7 @@ "css-loader": "^6.7.1", "eslint": "^8.36.0", "eslint-config-prettier": "^8.7.0", - "eslint-plugin-prettier": "^4.2.1",{% if test.lower().startswith('y') %} + "eslint-plugin-prettier": "^4.2.1",{% if test %} "jest": "^29.2.0",{% endif %}{% if kind.lower() == 'server' %} "mkdirp": "^1.0.3",{% endif %} "npm-run-all": "^4.1.5", @@ -121,7 +121,7 @@ "node_modules", "dist", "coverage", - "**/*.d.ts"{% if test.lower().startswith('y') %}, + "**/*.d.ts"{% if test %}, "tests", "**/__tests__", "ui-tests"{% endif %} diff --git a/template/{{python_name}}/.gitignore.jinja2 b/template/{{python_name}}/.gitignore.jinja2 deleted file mode 100644 index be83552..0000000 --- a/template/{{python_name}}/.gitignore.jinja2 +++ /dev/null @@ -1,125 +0,0 @@ -*.bundle.* -lib/ -node_modules/ -*.log -.eslintcache -.stylelintcache -*.egg-info/ -.ipynb_checkpoints -*.tsbuildinfo -{{python_name}}/labextension -# Version file is handled by hatchling -{{cookiecutter.python_name}}/_version.py -{% if cookiecutter.test.lower().startswith('y') %} -# Integration tests -ui-tests/test-results/ -ui-tests/playwright-report/ -{% endif %} -# Created by https://www.gitignore.io/api/python -# Edit at https://www.gitignore.io/?templates=python - -### Python ### -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -pip-wheel-metadata/ -share/python-wheels/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage/ -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# End of https://www.gitignore.io/api/python - -# OSX files -.DS_Store - -# Yarn cache -.yarn/