-
Notifications
You must be signed in to change notification settings - Fork 7
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
Package and deploy the extension #13
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
459d871
Package sphinx-verilog-domain
rw1nkler f72a790
Create basic structure of project documentation
rw1nkler 8ea71cf
Deploy sphinx-verilog-domain to PyPI
rw1nkler 4ffb6db
Add make-env as submodule
rw1nkler 4874670
Setup environment using make-env
rw1nkler 83d11ec
Update sphinx-verilog-domain version
rw1nkler 91ca59b
Add readthedocs configuration file
rw1nkler 90a7272
Test package building in Travis CI
rw1nkler 390dc62
Update extension name
rw1nkler 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 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,4 +1,26 @@ | ||
__pycache__/ | ||
build/ | ||
env/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg |
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,3 @@ | ||
[submodule "third_party/make-env"] | ||
path = third_party/make-env | ||
url = https://github.com/SymbiFlow/make-env/ |
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,16 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
formats: | ||
- htmlzip | ||
|
||
conda: | ||
environment: environment.yml |
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,26 @@ | ||
language: minimal | ||
|
||
before_install: | ||
- make env | ||
- source env/conda/bin/activate sphinx-verilog-domain | ||
|
||
stages: | ||
- name: | ||
- Build | ||
- Deploy | ||
|
||
jobs: | ||
- stage: Build | ||
name: "Build" | ||
script: | ||
- make build | ||
|
||
- stage: Deploy | ||
name: "PyPI" | ||
before_deploy: | ||
- sudo ln -sf /usr/bin/python3 /usr/bin/python | ||
deploy: | ||
provider: pypi | ||
username: __token__ | ||
distributions: sdist bdist_wheel | ||
skip_existing: true |
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,35 @@ | ||
# Copyright (C) 2020 SymbiFlow Authors. | ||
# | ||
# Use of this source code is governed by a ISC-style | ||
# license that can be found in the LICENSE file or at | ||
# https://opensource.org/licenses/ISC | ||
# | ||
# SPDX-License-Identifier: ISC | ||
|
||
# The top directory where environment will be created. | ||
TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) | ||
|
||
# A pip `requirements.txt` file. | ||
# https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format | ||
REQUIREMENTS_FILE := requirements.txt | ||
|
||
# A conda `environment.yml` file. | ||
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html | ||
ENVIRONMENT_FILE := environment.yml | ||
|
||
include third_party/make-env/conda.mk | ||
|
||
# Build the package locally | ||
|
||
build: $(CONDA_ENV_PYTHON) | ||
$(IN_CONDA_ENV) python setup.py sdist bdist_wheel && twine check dist/* | ||
|
||
build-clean: | ||
rm -rf env/downloads/conda-pkgs | ||
rm -rf build dist *.egg-info | ||
find -name *.pyc -delete | ||
find -name __pycache__ -delete | ||
|
||
.PHONY: build build-clean | ||
|
||
clean:: build-clean |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
git+https://github.com/SymbiFlow/sphinx_symbiflow_theme | ||
|
||
sphinx | ||
symbolator | ||
sphinxcontrib-verilog-diagrams | ||
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,92 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
# import sys | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'Sphinx Verilog Domain' | ||
copyright = '2020, SymbiFlow Team' | ||
author = 'SymbiFlow Team' | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = '0.1' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
'sphinx_verilog_domain', | ||
'symbolator_sphinx', | ||
'sphinxcontrib_verilog_diagrams' | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = [] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
html_theme = 'sphinx_symbiflow_theme' | ||
|
||
# Values used for configuring Sphinx SymbiFlow Theme | ||
|
||
html_theme_options = { | ||
'header_links' : [ | ||
('Home', 'index', False, 'home'), | ||
], | ||
# Customize css colors. | ||
# For details see link. | ||
# https://getmdl.io/customize/index.html | ||
# | ||
# Values: amber, blue, brown, cyan deep_orange, deep_purple, green, grey, indigo, light_blue, | ||
# light_green, lime, orange, pink, purple, red, teal, yellow(Default: indigo) | ||
'primary_color': 'red', | ||
# Values: Same as primary_color. (Default: pink) | ||
'accent_color': 'blue', | ||
|
||
# Customize layout. | ||
# For details see link. | ||
# https://getmdl.io/components/index.html#layout-section | ||
'fixed_drawer': True, | ||
'fixed_header': True, | ||
'header_waterfall': True, | ||
'header_scroll': False, | ||
|
||
# Render title in header. | ||
# Values: True, False (Default: False) | ||
'show_header_title': False, | ||
# Render title in drawer. | ||
# Values: True, False (Default: True) | ||
'show_drawer_title': True, | ||
# Render footer. | ||
# Values: True, False (Default: True) | ||
'show_footer': True | ||
} | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['_static'] |
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,20 @@ | ||
Sphinx Verilog Domain | ||
===================== | ||
|
||
.. warning:: | ||
|
||
Documentation for this Sphinx extension is under development. | ||
Below you can find basic tests for the extension. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Tests | ||
|
||
tests/index | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,19 @@ | ||
name: sphinx-verilog-domain | ||
channels: | ||
- symbiflow | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- python=3.7 | ||
- docutils | ||
- sphinx | ||
- pango | ||
- pycairo | ||
- pygobject | ||
- yosys | ||
- netlistsvg | ||
- pip | ||
- pip: | ||
- -r file:requirements.txt | ||
- -r file:docs/requirements.txt | ||
- . |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should reference the local package, otherwise it will be downloaded from PyPi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about
sphinxcontrib-verilog-diagrams
not aboutsphinx-verilog-domain
.Nevertheless, the relative dependencies are not handled properly by conda. If you add the
-e ../
to the requirements file, the main environment (created by make-env) will not be created. Conda seems to handle relative dependencies in the requirements file, as a relative to the environment.yml not to the requirements file itself:The repository is placed in:
The
sphinx-verilog-domain
package is installed in theenvironment.yml
directly.Since the RTD build also uses conda and the documentation build should happen inside this environment, I think that the
-e ../
can be omitted in thedocs/requirements.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mithro do you agree to left those files in that way? The problem with this convention will never occur unless somebody will decide to build the documentation without using
make-env
for this repository. This is exactly the same way as it is done forsphinxcontrib-verilog-diagrams
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rw1nkler - I was sure that I had solved this somewhere...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bunch of discussion at pypa/pip#328
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that this problem is not resolved for the
requirements.txt
(It will be fixed by the pipfile):-e
with a relative local path, is only installable from a specific directory pypa/pip#6112As I said before, the problem with the current settings will happen only if somebody will build the docs outside the make-env environment, which is generally wrong. I think that we should leave the requirements file as they are now.