vberlier / mudkip Goto Github PK
View Code? Open in Web Editor NEWA friendly Sphinx wrapper.
Home Page: https://vberlier.github.io/mudkip/
License: MIT License
A friendly Sphinx wrapper.
Home Page: https://vberlier.github.io/mudkip/
License: MIT License
mudkip build --update-gh-pages
fails with following trace:
Traceback (most recent call last):
File "/opt/python/3.10.4/lib/python3.10/site-packages/mudkip/cli.py", line 22, in exception_handler
yield
File "/opt/python/3.10.4/lib/python3.10/site-packages/mudkip/cli.py", line 135, in build
application.build(
File "/opt/python/3.10.4/lib/python3.10/site-packages/mudkip/application.py", line 313, in build
GitHubPagesUpdater(self.sphinx.outdir, self.config.repository).update()
File "/opt/python/3.10.4/lib/python3.10/site-packages/mudkip/github.py", line 23, in update
run(["git", "remote", "add", "origin", self.repository])
File "/opt/python/3.10.4/lib/python3.10/subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "/opt/python/3.10.4/lib/python3.10/subprocess.py", line 966, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/python/3.10.4/lib/python3.10/subprocess.py", line 1775, in _execute_child
self.pid = _posixsubprocess.fork_exec(
TypeError: expected str, bytes or os.PathLike object, not NoneType
Currently preset flag seems a combination of builders and themes - if there is both -t | --theme
and -b | --builder
flag, then presets can be defined in their terms: -p rtd
is -t rtd -b html
and -p xml
is -b xml
-p, --preset [xml|latex|dirhtml|alabaster|rtd|furo|pydata|vitepress]
Documentation preset.
Users for quickstart could use -p and later refine their pipelines with -t / -b.
In Q:\chaos-mirror (main -> origin)
these two commands result in different outputs:
a)
λ mudkip develop --source-dir Q:\chaos-mirror\docs
b)
λ mudkip develop
Controlling for environments:
Seems some an old version is being shown by mudkip develop
without full explicit path.
Hi! Currently playing around with mudkip with the hope of using the tool for documenting my projects going forward.
I was wondering how to invoke the autodoc extension using mudkip. In my current sphinx setup, I run the sphinx-apidoc
command, which automatically generates the .rst
files for my modules and I would like to recover this behavior with mudkip.
I tried running sphinx-apidoc
separately before mudkip develop
, but then I get some import errors (those are fixed in my current setup by modifying the sys.path
variable in conf.py
).
Thanks!
Lines 1 to 24 in e0740e9
I tried to relay something I needed for conf.py in mudkip and it worked:
[mudkip.override]
myst_enable_extensions = ["smartquotes", "tasklist"]
Maybe describe in a bit more detail in the documentation the powers of override, also tell it can be a separate section in TOML like [mudkip.override]
or [tool.mudkip.override]
I tried building latex with sphinx-build - but for that I miss conf.py
λ sphinx-build -b latex docs/ docs/_latex/
Running Sphinx v4.5.0
Configuration error:
missing conf.py file (q:\chaos\docs)
Should mudkip be able to write temporary conf.py or there is a different way to invoke labex build without conf.py?
Found that jupyterbook in addition to latex+pdflatex builder has a lightweight builder for PDF using puppeteer, a headleass browser that can emulate printing, and puppeteer port is available as python package.
So on jupyterbook lightweight pdf generation will look like:
pip install pyppeteer
jupyter-book build mybookname/ --builder pdfhtml
Possible mudkip version is, with new builder flag:
mudkip build -b pdfhtml
mudkip build --builder pdfhtml
This is not a big pain, but takes few tries to get used to - on Windows mudkip develop
starts with error message:
Watching "docs"...
Server running on http://localhost:5500
q:\chaos\docs\index.rst:4: WARNING: toctree contains reference to nonexisting document 'README'
q:\chaos\docs\link.md: WARNING: document isn't included in any toctree
Process Process-1:
Traceback (most recent call last):
File "c:\users\epogr\anaconda3\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "c:\users\epogr\anaconda3\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "c:\users\epogr\anaconda3\lib\site-packages\mudkip\server.py", line 32, in serve_directory
server.serve(port=port, host=host, root=directory)
File "c:\users\epogr\anaconda3\lib\site-packages\livereload\server.py", line 339, in serve
self.application(
File "c:\users\epogr\anaconda3\lib\site-packages\livereload\server.py", line 291, in application
app.listen(port, address=host)
File "c:\users\epogr\anaconda3\lib\site-packages\tornado\web.py", line 2116, in listen
server.listen(port, address)
File "c:\users\epogr\anaconda3\lib\site-packages\tornado\tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "c:\users\epogr\anaconda3\lib\site-packages\tornado\netutil.py", line 174, in bind_sockets
sock.bind(sockaddr)
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
npx prettier
Aspect: new user of sphinx who would like a jump start with pshinx and would like to start using mudkip quickly
Here is a list of tags one can use to enhance Mudkip visibility on Github
python
documentation
documentation-tool
sphinx
sphinx-doc
sphinx-theme
sphinxcontrib
sphinx-extension
mudkip
The list is from sphinx itself and projects around it.
Since mudkip creates a git
repo in a temp directory, it only listens to the --global
git config. This means any values in the repo specific (or local) git config don't work which is either unexpected behavior or forces the command to fail (mostly when using it locally).
@ mudkip build --update-gh-pages
Updating GitHub Pages with "docs"...
Initialized empty Git repository in /private/var/folders/6q/ybrmmgj52znd2g6xrm4w68sw0000gn/T/tmp10jw9dl6/.git/
Switched to a new branch 'gh-pages'
Author identity unknown
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
Even though the message indicates that you can "omit" --global
, it's incorrectly show since the git repo's location is in a different location.
I just installed mudkip and opened an empty index.rst - but so impressed by ease of use mudkip
. Thank you for developing it!
My initial reaction is to suggest adding https://github.com/executablebooks/sphinx-book-theme to presets, but would need prioritize ideas on how to make mudkip even more usable (below).
It seems to me that setting some values for the override (aka the conf.py
file) don't override theme set options. Example:
[tool.mudkip]
preset = "furo"
title = "my-epic-docs"
[tool.mudkip.override]
...
pygments_style = "material"
Here, I wish to change the code highlighting style for pygments to material
as furo uses a different theme. Removing preset = "furo"
enables for my code highlighting theme to work while enabling furo
causes my option to effectively get ignored. It seems to me that my overrides get set first, and then the furo preset gets set, but I can't be too certain.
Edit: furo
has pygments_dark_style
but it seems to me that mudkip isn't recognizing or letting sphinx recognize this field based on how the config is getting parsed or something.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.