-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from sphinx-notes/template-2023-12-updates
chore: Update cookiecutter template
- Loading branch information
Showing
16 changed files
with
169 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,58 @@ | ||
# This file is generated from sphinx-notes/template. | ||
# This file is generated from sphinx-notes/cookiecutter. | ||
# You need to consider modifying the TEMPLATE or modifying THIS FILE. | ||
|
||
LANG = en_US.UTF-8 | ||
|
||
MAKE = make | ||
PY = python3 | ||
RM = rm -rf | ||
MAKE = make | ||
PY = python3 | ||
RM = rm -rf | ||
|
||
# Build sphinx documentation. | ||
.PHONY: docs | ||
docs: | ||
$(MAKE) -C docs/ | ||
|
||
# Run unittest. | ||
.PHONY: test | ||
test: | ||
$(PY) -m unittest discover -s tests -v | ||
|
||
# Build distribution package, for "install" or "upload". | ||
.PHONY: dist | ||
dist: pyproject.toml | ||
$(RM) dist/ # clean up old dist | ||
$(PY) -m build | ||
|
||
# Install distribution package to user directory. | ||
# | ||
# NOTE: It may breaks your system-level packages, use at your own risk. | ||
.PHONY: install | ||
install: dist | ||
export PIP_BREAK_SYSTEM_PACKAGES=1 # required by Python 3.11+, see PEP-668 | ||
$(PY) -m pip install --user --no-deps --force-reinstall dist/*.whl | ||
|
||
# Publish wheel to PyPI offical server <https://pypi.org/> when you want to | ||
# You should have a PyPI account and have PyPI token configured. | ||
# | ||
# See also https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives | ||
.PHONY: upload | ||
upload: dist | ||
$(PY) -m twine upload --repository pypi $</* | ||
|
||
.PHONY: test-upload | ||
test-upload: dist | ||
# Same to the aboved "upload" target, but this publishs to PyPI test server | ||
# <https://test.pypi.org/>. | ||
.PHONY: upload-test | ||
upload-test: dist | ||
$(PY) -m twine upload --repository testpypi $</* | ||
|
||
# Keep up to date with the latest template. | ||
# See also https://github.com/sphinx-notes/cookiecutter. | ||
.PHONY: update-template | ||
update-template: | ||
$(PY) -m cruft update | ||
|
||
# Update project version. | ||
.PHONY: bump-version | ||
bump-version: | ||
@echo -n "Please enter the version to bump: " | ||
@read version && $(PY) -m cruft update --variables-to-update "{ \"version\" : \"$$version\" }" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
:Type: :py:class:`{{ type }}` | ||
:Default: ``{{ default }}`` | ||
{% if choice %}:Choices: {% for c in choice %}``{{ c }}`` {% endfor %}{% endif %} | ||
{% if versionadded %}:Version added: :version:`{{ versionadded }}`{% endif %} | ||
{% if versionchanged %}:Version changed:{% for i in range(0, versionchanged|count -1, 2) %} | ||
:version:`{{ versionchanged[i] }}` | ||
{{ versionchanged[i+1] }}{% endfor %}{% endif %} | ||
|
||
{{ content }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,32 @@ | ||
|
||
{% if style is not defined or style == 'tab' %} | ||
.. tab-set:: | ||
|
||
.. tab-item:: Score | ||
.. tab-item:: Result | ||
|
||
{% for line in content %}{{ line }} | ||
{% endfor %} | ||
|
||
.. tab-item:: Source | ||
.. tab-item:: reStructuredText | ||
|
||
.. code:: rst | ||
{% for line in content %}{{ line }} | ||
{% endfor %} | ||
{% elif style == 'grid' %} | ||
.. grid:: 2 | ||
|
||
.. grid-item-card:: reStructuredText | ||
|
||
.. code:: rst | ||
{% for line in content %}{{ line }} | ||
{% endfor %} | ||
.. grid-item-card:: Result | ||
|
||
{% for line in content %}{{ line }} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.