Skip to content

Fix version extraction in Sphinx config #669

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

Merged
merged 14 commits into from
Oct 27, 2022

Conversation

vloncar
Copy link
Contributor

@vloncar vloncar commented Oct 26, 2022

Description

With the merging of #479 the location of __version__ changed and Sphinx config still tries to extract it from hls4ml/__init__.py. This changes the config of Sphinx to extract the version information from the new _version.py.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

@jmduarte jmduarte self-requested a review October 26, 2022 13:06
@jmduarte
Copy link
Member

jmduarte commented Oct 26, 2022

@vloncar what a nightmare trying to get the sphinx-action GitHub action to work. Let me summarize:

  • We need git available in the image because that's how setuptools_scm gets the version (through git tag etc.)
  • It turns out that because https://github.com/ammaraskar/sphinx-action is not really being maintained right now, you can't install git via apt install git as part of the pre-build-command step due to a variety of other issues (outdated image; trying to install using os.system() from python, etc. see e.g. Cannot run apt update  ammaraskar/sphinx-action#33). There are proposed solutions, but because it's not being maintained, nobody is accepting the PRs, etc.
  • I forked it and just installed git in the Dockerfile

Now it works.

@jmduarte jmduarte self-requested a review October 26, 2022 18:00
@vloncar
Copy link
Contributor Author

vloncar commented Oct 27, 2022

@jmduarte I fixed the failing test of reading h5 file. It failed in quartus for unrelated reason, due to the name of the project not being propagated. Ready to (squash and) merge now?

@jmduarte jmduarte merged commit 449f46b into fastmachinelearning:main Oct 27, 2022
@vloncar vloncar deleted the sphinx-fix branch October 27, 2022 15:50
calad0i pushed a commit to calad0i/hls4ml that referenced this pull request Jul 1, 2023
* Fix version extraction in Sphinx config

* format

* Use get_version from setuptools_scm

* minor fixes; try with reqs

* add test sphinx

* try installing git

* update reqs

* try installing git again

* apt-get

* try different action

* updated image

* custom docker image

* update tests

* Ensure the project name is propagated in Quartus writer

Co-authored-by: Javier Duarte <[email protected]>
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.

2 participants