Skip to content

Commit

Permalink
doc: use BuildTheDocs, add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Sep 24, 2021
1 parent be7cdab commit d952c3e
Show file tree
Hide file tree
Showing 22 changed files with 493 additions and 747 deletions.
5 changes: 5 additions & 0 deletions .btd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
input: doc
output: _build
target: gh-pages
formats: [ html ]
theme: https://codeload.github.com/buildthedocs/sphinx.theme/tar.gz/v1
28 changes: 28 additions & 0 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Doc

on:
push:
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:

jobs:

BTD:
name: '📓 Docs'
runs-on: ubuntu-latest
steps:

- name: '🧰 Checkout'
uses: actions/checkout@v2

- name: '📓 BuildTheDocs (BTD)'
uses: buildthedocs/btd@v0
with:
token: ${{ github.token }}

- name: '📤 Upload artifact: HTML'
uses: actions/upload-artifact@master
with:
name: doc
path: doc/_build/html
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.pyc
/doc/_build
/doc/_theme
47 changes: 29 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,46 @@

========
Hdlparse
========
########

Hdlparse is a simple package implementing a rudimentary parser for VHDL and Verilog. It is not capable of fully parsing the entire language. Rather, it is meant to extract enough key information from a source file to create generated documentation.
Hdlparse is a simple package implementing a rudimentary parser for VHDL and Verilog.
It is not capable of fully parsing the entire language.
Rather, it is meant to extract enough key information from a source file to create generated documentation.

This library is used by the `Symbolator <https://github.com/kevinpt/symbolator>`_ diagram generator.
This library is used by the `Symbolator <https://github.com/hdl/symbolator>`_ diagram generator.

For VHDL this library can extract component, subprogram, type, subtype, and constant declarations from a package. For Verilog it can extract module declarations (both 1995 and 2001 syntax).
For VHDL this library can extract component, subprogram, type, subtype, and constant declarations from a package.
For Verilog it can extract module declarations (both 1995 and 2001 syntax).


Requirements
------------

Hdlparse requires either Python 2.7 or Python 3.x and no additional libraries.

The installation script depends on setuptools. The source is written in
Python 2.7 syntax but will convert cleanly to Python 3 when the installer
passes it through 2to3.
The installation script depends on setuptools.
The source is written in Python 2.7 syntax but will convert cleanly to Python 3 when the installer passes it through 2to3.


Download
--------

You can access the Hdlparse Git repository from `Github
<https://github.com/kevinpt/hdlparse>`_. You can install direct from PyPI with the "pip"
command if you have it available.
You can access the Hdlparse Git repository from `Github <https://github.com/hdl/pyHDLParser>`_.
You can install direct from PyPI with the "pip" command if you have it available.


Installation
------------

Hdlparse is a Python library. You must have Python installed first to use it. Most modern Linux distributions and OS/X have it available by default. There are a number of options available for Windows. If you don't already have a favorite, I recommend getting one of the `"full-stack" Python distros <http://www.scipy.org/install.html>`_ that are geared toward scientific computing such as Anaconda or Python(x,y).
Hdlparse is a Python library.
You must have Python installed first to use it.
Most modern Linux distributions and OS/X have it available by default.
There are a number of options available for Windows.
If you don't already have a favorite, I recommend getting one of the
`"full-stack" Python distros <http://www.scipy.org/install.html>`_
that are geared toward scientific computing such as Anaconda or Python(x,y).

You need to have the Python setuptools installed first. If your OS has a package manager, it may be preferable to install setuptools through that tool. Otherwise you can use Pip:
You need to have the Python setuptools installed first.
If your OS has a package manager, it may be preferable to install setuptools through that tool.
Otherwise you can use Pip:

.. code-block:: sh
Expand All @@ -44,7 +52,9 @@ The easiest way to install Hdlparse is from `PyPI <https://pypi.python.org/pypi/
> pip install --upgrade hdlparse
This will download and install the latest release, upgrading if you already have it installed. If you don't have ``pip`` you may have the ``easy_install`` command available which can be used to install ``pip`` on your system:
This will download and install the latest release, upgrading if you already have it installed.
If you don't have ``pip`` you may have the ``easy_install`` command available which can be used to install ``pip`` on
your system:

.. code-block:: sh
Expand All @@ -55,9 +65,10 @@ You can also use ``pip`` to get the latest development code from Github:

.. code-block:: sh
> pip install --upgrade https://github.com/kevinpt/hdlparse/tarball/master
> pip install --upgrade https://github.com/hdl/pyHDLParser/tarball/master
If you manually downloaded a source package or created a clone with Git you can install with the following command run from the base Hdlparse directory:
If you manually downloaded a source package or created a clone with Git you can install with the following command run
from the base Hdlparse directory:

.. code-block:: sh
Expand All @@ -72,5 +83,5 @@ Documentation
-------------

The full documentation is available online at the `main Hdlparse site
<http://kevinpt.github.io/hdlparse/>`_.
<http://hdl.github.io/pyHDLParser/>`_.

Empty file removed doc/.nojekyll
Empty file.
35 changes: 26 additions & 9 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
# Sphinx options.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = HdlParse
SOURCEDIR = .
SPHINXBUILD = sphinx-build
SPHINXPROJ = pyHDLParser
PAPER =
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
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) .

help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

#---

man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man

#---

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

#---

latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex

#---

.PHONY: help Makefile

# 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)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file removed doc/_static/Kreon-Bold.woff2
Binary file not shown.
Binary file removed doc/_static/Kreon-Light.woff2
Binary file not shown.
Binary file removed doc/_static/Kreon-Regular.woff2
Binary file not shown.
143 changes: 0 additions & 143 deletions doc/_static/project.css

This file was deleted.

10 changes: 0 additions & 10 deletions doc/_templates/download.html

This file was deleted.

21 changes: 0 additions & 21 deletions doc/_templates/layout.html

This file was deleted.

5 changes: 0 additions & 5 deletions doc/_templates/page.html

This file was deleted.

Loading

0 comments on commit d952c3e

Please sign in to comment.