Skip to content

html_theme_path docs out of sync #186

@svenevs

Description

@svenevs

As of #173 doing

html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()

is not necessary (since you also added the entry points to setup.py). Removing that in the demo's conf.py though, since it's not actually using a proper install (just inserting path), you'll get a build failure.

I started playing with the Makefile, just gonna include a patch view and then explain

diff --git a/Makefile b/Makefile
index 193d50b..b8af352 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 # Makefile: For Python3 development.
 # Because fabric doesn't work in Py3 :(

-.PHONY: clean demo demo_server
+.PHONY: clean demo demo_server dist env realclean

 clean:
        rm -rf "dist" \
@@ -9,8 +9,21 @@ clean:
                "demo/build" \
                "sphinx_bootstrap_theme.egg-info" \

-demo:
-       cd demo && make html
+realclean: clean
+       rm -rf venv
+
+dist:
+       python3 setup.py sdist
+       python3 setup.py bdist_wheel --universal
+
+# make an editable install for development
+env:
+       virtualenv venv
+       source venv/bin/activate && pip install -r requirements.txt
+       source venv/bin/activate && pip install -e .
+
+demo: dist env
+       source venv/bin/activate && (cd demo && make html)

 # PORT allows you to specify a different port if say
 # port 8000 is currently in use

Pretty dirty, but the idea is you need to legitimately install this in order to actually make use of the entry point.

What exactly is requirements.txt here for? Is it related to this fabfile.py thing?

I was going to update the docs, but if we can't lead by example in our own conf.py, well shame on us lol. So I just threw it in a virtual environment for shiggles, and it worked fine.

  1. Can we just omit html_theme_path documentation? Users should not need it anymore, better to remove so we don't get confusion about whether it's a list or string.
  2. Should we go as far as to raise an exception in that method indicating it is no longer used / deprecated?
  3. For "lead-by-example", even though we don't have any unit tests, can we setup tox? It's really quite wonderful, it works on top of virtualenv, so you could do say tox -e flake8 to run lint checks or tox -e demo to build the demo (and probably server too, though I'd have to double check).
    • Is the requirements.txt for this theme or the fab stuff?
    • I can also add a tox -e dist that will create the dist/ folder for uploading files.

Let me know what you want to do here (even if it's just remove outdated docs pr and nothing else xD).

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions