Skip to content

Commit

Permalink
Generate from template
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Dec 21, 2023
0 parents commit 4bde76c
Show file tree
Hide file tree
Showing 16 changed files with 648 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"template": "https://github.com/sphinx-notes/template",
"commit": "93c85ed7fe6dc87e11ffd024b762a3c8c9a83a1b",
"checkout": null,
"context": {
"cookiecutter": {
"namespace": "sphinxnotes",
"name": "comboroles",
"full_name": "sphinxnotes-comboroles",
"author": "Shengyu Zhang",
"description": "Sphinx extension for composing multiple roles",
"version": "0.1.0",
"github_owner": "sphinx-notes",
"github_repo": "comboroles",
"pypi_name": "sphinxnotes-comboroles",
"pypi_owner": "SilverRainZ",
"_template": "https://github.com/sphinx-notes/template"
}
},
"directory": null
}
25 changes: 25 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy Sphinx documentation to Pages

# Runs on pushes targeting the default branch
on:
push:
branches: [master]

# Cancel any in-progress job or run
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
pages:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: sphinx-notes/pages@v3
135 changes: 135 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# 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/
*.egg-info/
.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.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Poetry
poetry.lock

# Sphinx
docs/_build/
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2023, Shengyu Zhang
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11 changes: 11 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is generated from sphinx-notes/template.
# You need to consider modifying the TEMPLATE or modifying THIS FILE.

include LICENSE
include README.rst

recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
58 changes: 58 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This file is generated from sphinx-notes/template.
# You need to consider modifying the TEMPLATE or modifying THIS FILE.

LANG = en_US.UTF-8

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 $</*

# 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/template.
.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\" }"
30 changes: 30 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. This file is generated from sphinx-notes/template.
You need to consider modifying the TEMPLATE or modifying THIS FILE.
======================
sphinxnotes-comboroles
======================

.. image:: https://img.shields.io/github/actions/workflow/status/sphinx-notes/comboroles/pages.yml
:target: https://sphinx.silverrainz.me/comboroles
:alt: Documentation Status

.. image:: https://img.shields.io/github/license/sphinx-notes/comboroles
:target: https://github.com/sphinx-notes/comboroles/LICENSE
:alt: Open Source License

.. image:: https://img.shields.io/pypi/v/sphinxnotes-comboroles.svg
:target: https://pypi.python.org/pypi/sphinxnotes-comboroles
:alt: PyPI Package

.. image:: https://img.shields.io/pypi/dw/sphinxnotes-comboroles
:target: https://pypi.python.org/pypi/sphinxnotes-comboroles
:alt: PyPI Package Downloads

Sphinx extension for composing multiple roles.

* Documentation: https://sphinx.silverrainz.me/comboroles
* Source: https://github.com/sphinx-notes/comboroles
* Changelog: https://sphinx.silverrainz.me/comboroles/changelog.html
* Tracker: https://github.com/sphinx-notes/comboroles/issues
* Download: https://pypi.org/project/sphinxnotes-comboroles/#files
23 changes: 23 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file is generated from sphinx-notes/template.
# You need to consider modifying the TEMPLATE or modifying THIS FILE.

# Minimal makefile for Sphinx documentation

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python3 -msphinx
SOURCEDIR = .
BUILDDIR = _build

default: html

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile default

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_images/sphinx-notes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/_static/.gitkeep
Empty file.
11 changes: 11 additions & 0 deletions docs/_templates/version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. list-table::
:align: left

* - :ref:`📅 {{ date }} <any-version.date>`
- :tag:`{{ title }}`


{% for line in content %}
{{ line }}
{% endfor %}

16 changes: 16 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. This file is generated from sphinx-notes/template.
You need to consider modifying the TEMPLATE or modifying THIS FILE.
==========
Change Log
==========

.. Example:
1.0.0
=====
.. version:: _
:date: yyyy-mm-dd
Change log here.
Loading

0 comments on commit 4bde76c

Please sign in to comment.