-
Notifications
You must be signed in to change notification settings - Fork 4
docs based on BTD and deployed with CI #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
rodrigomelo9
wants to merge
4
commits into
VUnit:master
Choose a base branch
from
rodrigomelo9:tutorial-restructured
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+194
−0
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7f0823c
docs: add infrastructure taken from the Vunit main project
rodrigomelo9 9809344
ci: add a workflow for docs based on the BTD action
rodrigomelo9 dabd278
docs: add btd.yml and Makefile
rodrigomelo9 9271d28
docs: copy rst instructions into the sphinx scope
umarcor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,6 @@ | ||
input: docs | ||
output: _build | ||
requirements: requirements.txt | ||
target: gh-pages | ||
formats: [ html ] | ||
theme: https://codeload.github.com/buildthedocs/sphinx.theme/tar.gz/v1 |
This file contains hidden or 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,28 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
BuildTheDocs: | ||
name: BuildTheDocs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: 'Checkout' | ||
uses: actions/checkout@v2 | ||
|
||
- name: 'Run BuildTheDocs and publish to GitHub Pages' | ||
uses: buildthedocs/btd@v0 | ||
with: | ||
token: ${{ github.token }} | ||
|
||
- name: 'Upload artifacts' | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: doc | ||
path: docs/_build/html |
This file contains hidden or 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,2 +1,6 @@ | ||
__pycache__/ | ||
vunit_out/ | ||
/docs/_build | ||
/docs/_theme | ||
/docs/tutorial | ||
*.tgz |
This file contains hidden or 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,23 @@ | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
PAPER = | ||
BUILDDIR = _build | ||
|
||
PAPEROPT_a4 = -D latex_paper_size=a4 | ||
PAPEROPT_letter = -D latex_paper_size=letter | ||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -T -D language=en $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . | ||
|
||
#--- | ||
|
||
man: | ||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man | ||
|
||
#--- | ||
|
||
html: | ||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | ||
|
||
#--- | ||
|
||
latex: | ||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains hidden or 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,100 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import sys | ||
from json import loads | ||
from pathlib import Path | ||
from shutil import copyfile | ||
|
||
ROOT = Path(__file__).resolve().parent | ||
|
||
TUTORIAL = ROOT / "tutorial" | ||
|
||
if not TUTORIAL.exists(): | ||
TUTORIAL.mkdir(exist_ok=True) | ||
|
||
for idx in range(1,8): | ||
instructions = ROOT.parent / "tutorial/exercise_0{}/instructions.rst".format(idx) | ||
if instructions.exists(): | ||
copyfile(instructions, TUTORIAL / "ex0{}.rst".format(idx)) | ||
|
||
# -- Sphinx Options ----------------------------------------------------------- | ||
|
||
# If your project needs a minimal Sphinx version, state it here. | ||
needs_sphinx = "3.0" | ||
|
||
extensions = [ | ||
"sphinx.ext.extlinks", | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.todo" | ||
] | ||
|
||
# The suffix(es) of source filenames. | ||
source_suffix = { | ||
".rst": "restructuredtext" | ||
} | ||
|
||
master_doc = "index" | ||
|
||
project = u"VUnit: Introduction to TDD and CI" | ||
copyright = u"2014-2021, Lars Asplund" | ||
author = u"LarsAsplund and contributors" | ||
|
||
version = "" | ||
release = "" | ||
|
||
language = None | ||
|
||
exclude_patterns = [] | ||
|
||
pygments_style = "sphinx" | ||
|
||
todo_include_todos = False | ||
|
||
# -- Options for HTML output ---------------------------------------------- | ||
|
||
html_theme_path = ["."] | ||
html_theme = "_theme" | ||
|
||
html_theme_options = { | ||
"analytics_id": "UA-abcdefghi-j", | ||
"logo_only": True, | ||
"vcs_pageview_mode": "blob", | ||
"style_nav_header_background": "#0c479d", | ||
"home_breadcrumbs": False, | ||
} | ||
|
||
html_context = {} | ||
ctx = Path(__file__).resolve().parent / 'context.json' | ||
if ctx.is_file(): | ||
html_context.update(loads(ctx.open('r').read())) | ||
|
||
|
||
html_static_path = ["_static"] | ||
|
||
html_logo = str(Path(html_static_path[0]) / "VUnit_logo_175x175.png") | ||
|
||
html_favicon = str(Path(html_static_path[0]) / "vunit.ico") | ||
|
||
# Output file base name for HTML help builder. | ||
htmlhelp_basename = "VUnitDoc" | ||
|
||
# -- InterSphinx ---------------------------------------------------------- | ||
|
||
intersphinx_mapping = { | ||
"ghdl": ("https://ghdl.github.io/ghdl", None), | ||
"python": ("https://docs.python.org/3.8/", None), | ||
rodrigomelo9 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"vunit": ("https://vunit.github.io", None), | ||
} | ||
|
||
# -- ExtLinks ------------------------------------------------------------- | ||
|
||
extlinks = { | ||
"vunit_example": ("https://github.com/VUnit/vunit/tree/master/examples/%s/", ""), | ||
"vunit_file": ("https://github.com/VUnit/vunit/tree/master/%s/", ""), | ||
rodrigomelo9 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"vunit_commit": ("https://github.com/VUnit/vunit/tree/%s/", "@"), | ||
"vunit_issue": ("https://github.com/VUnit/vunit/issues/%s/", "#"), | ||
"tdd_file": ("https://github.com/VUnit/tdd-intro/tree/master/%s/", ""), | ||
"tdd_commit": ("https://github.com/VUnit/tdd-intro/tree/%s/", "@"), | ||
"tdd_issue": ("https://github.com/VUnit/tdd-intro/issues/%s/", "#"), | ||
} |
This file contains hidden or 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,25 @@ | ||
.. VUnit:TDDIntro: | ||
|
||
.. centered:: |shieldTdd|_ |shieldVunit|_ |shieldGitter|_ |shieldTwitter|_ | ||
|
||
.. |shieldTdd| image:: https://img.shields.io/badge/VUnit/tdd--intro-0c479d.svg?longCache=true&style=flat-square&logo=github | ||
.. _shieldTdd: https://github.com/VUnit/tdd-intro | ||
|
||
.. |shieldVunit| image:: https://img.shields.io/badge/VUnit/vunit-0c479d.svg?longCache=true&style=flat-square&logo=github | ||
.. _shieldVunit: https://github.com/VUnit/vunit | ||
|
||
.. |shieldGitter| image:: https://img.shields.io/gitter/room/VUnit/vunit.svg?longCache=true&style=flat-square&logo=gitter&logoColor=4db797&color=4db797 | ||
.. _shieldGitter: https://gitter.im/VUnit/vunit | ||
|
||
.. |shieldTwitter| image:: https://img.shields.io/twitter/follow/VUnitFramework.svg?longCache=true&style=flat-square&color=1DA1F2&label=%40VUnitFramework&logo=twitter&logoColor=fff | ||
.. _shieldTwitter: https://www.twitter.com/VUnitFramework | ||
|
||
Introduction to Test-Driven Development and Continuous Integration with VUnit | ||
============================================================================= | ||
|
||
.. toctree:: | ||
rodrigomelo9 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
:caption: Tutorial | ||
:hidden: | ||
|
||
tutorial/ex01.rst | ||
tutorial/ex02.rst |
This file contains hidden or 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,4 @@ | ||
.. VUnit:Tutorial:Exercise01: | ||
|
||
Exercise 01 | ||
########### |
This file contains hidden or 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,4 @@ | ||
.. VUnit:Tutorial:Exercise02: | ||
|
||
Exercise 02 | ||
########### |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.