Skip to content
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 9 commits into from
Sep 15, 2020
Merged

Conversation

rw1nkler
Copy link
Contributor

@rw1nkler rw1nkler commented Sep 8, 2020

This PR creates the package with the sphinx-verilog-domain and adds the ability to deploy it to PyPI using Travis CI.

Additionally, the following changes were introduced:

  • Added make-env for environment management
  • Added basic Sphinx documentation structure
  • All the tests have been moved to Sphinx documentation

The PR requires proper token setup for PyPI

Resolves #6


sphinx
symbolator
sphinxcontrib-verilog-diagrams
Copy link
Member

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?

Suggested change
sphinxcontrib-verilog-diagrams
-e ../

Copy link
Contributor Author

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 about sphinx-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:

Pip subprocess error:
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /mnt/hdd1//verilog_domain_ws

The repository is placed in:

/mnt/hdd1/verilog_domain_ws/sphinx-verilog-domain

The sphinx-verilog-domain package is installed in the environment.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 the docs/requirements.txt

Copy link
Contributor Author

@rw1nkler rw1nkler Sep 14, 2020

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 for sphinxcontrib-verilog-diagrams.

Copy link
Member

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...

Copy link
Member

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

Copy link
Contributor Author

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):

As 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.

Copy link
Member

@mithro mithro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment.

Poke me after merging and I'll add the token needed to upload to PyPi.

Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
Signed-off-by: Robert Winkler <rwinkler@antmicro.com>
@rw1nkler
Copy link
Contributor Author

@mithro It seems that the problem with the editable packages installed within nested requirements.txt files is still unresolved. However, it should not affect documentation building and package development unless somebody will decide not to use make-env for this repository and install packages manually.

@rw1nkler
Copy link
Contributor Author

@mithro Can we merge this PR?

@kgugala kgugala merged commit 0845d55 into SymbiFlow:master Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create python package with the domain
3 participants