-
Notifications
You must be signed in to change notification settings - Fork 200
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
Document how to work on this project #151
Comments
Suggestion: Having something like What I did on a different sphinx theme that I was working on: https://github.com/pradyunsg/materialism/blob/39590acf83e97b825da619ec1aca0336ccd8297f/noxfile.py#L55 |
sigh Looks like I can't use sphinx-autobuild with this theme as-is, since it recompiles the scss file immediately upon importing conf.py -- which results in the theme constantly getting reloaded on the browser since the folder it is watching gets modified. Sphinx also doesn't detect that the css file has been changed, and does not copy it over to the build directory which means that the page does reload but loads the same assets as before, even though the .css file in the source directory has changed. >.< I'm gonna step away for today now. I've already made a lot of noise in this repository, and this feels like a workflow clash so I'll wait until I get some inputs on how others iterate on the HTML/CSS for this project before trying again. :) |
@pradyunsg I will write up more content in the contributing guide today (https://sphinx-book-theme.readthedocs.io/en/latest/contributing.html but right now it is very sparse). Could you explain more your sphinx-autobuild process to me? I suspect that you are more advanced at Sphinx than I am 😅. The SCSS -> compilation is not particularly sophisticated here, I'm just building it from within the |
Make sure this is integrated with https://github.com/executablebooks/.github/blob/master/CONTRIBUTING.md (@pradyunsg have you looked at this?) |
yeah I agree - this is just a carry-over from before that file existed and we haven't updated it. I'll plan to update that contributing file so that it links to the EBP one, and also adds sections that are SBT-specific. Alternatively I could add a little script to automatically pull the latest |
There isn't much really. IMO sphinx-autobuild is a really useful tool for when you're working on themes/documentation and don't want to constantly jump between 3 apps (browser, editor, terminal). Change The issue with this project is that building it regenerates the file, which triggers a rebuild, which regenerates the file, which triggers a rebuild... you get it. :)
No! Otherwise I would've jumped at the chance, given the license to use emoji in commit messages! >.< |
IMO the easiest way might be to decouple "build with the theme" from "compile the scss files" and perform the compilation elsewhere. Depending on how you want to do things, we could commit the generated css file, or have it get built when generating the sdist/wheel. That'll also let us use compilers for scss that have a CLI + additional features (like auto-rebuild). We can also separate the source "scss" from the destination -- i.e. not have *.scss end up in the built site's Note to self about what a noxfile could look like
|
I agree that a live build is desirable; essentially replicating the common workflow for working with JS/HTML/CSS projects using webpack/parceljs. But the SCSS compilation should be integrated, as it is for these two tools. I'd note that sphinx-autobuild is essentially a dead project, having received its last commit 3 years ago (with unanswered issues/PRs since then). I would suggest forking it into this org and implementing sphinx-doc/sphinx-autobuild#70, which should allow for built-in scss compilation. |
Maybe we could just add the SCSS compilation as a I'm always a bit worried about adding more webdev-specific infrastructure because it is another barrier for people who aren't familiar with it (e.g. webpack, yarn, etc). I feel similarly to |
Nox is a much lower barrier to entry IMO, given that it's pure Python and even the configuration is pure Python. |
I gave a stab at this in #163 but we can definitely continue to iterate here. @pradyunsg wanna write up a short brief on what |
Sound like a plan, for something I'll do in the weekend. |
Is your feature request related to a problem? Please describe.
It is currently unclear to me (someone new to the project!) what I should do to work on this theme, and what workflows are for the various tasks related to the project.
A link to the documentation page where you see an issue.
N/A
Describe the solution you'd like
A clear "Development/Getting Started" guide (like https://pip.pypa.io/en/latest/development/getting-started/) that describes how to setup a development environment, and how to do common development workflow tasks -- namely running the code, generating the documentation, running linters, running the tests.
I suggest using something like nox, to simplify the workflow tasks even further, to be "run
nox -s <name>
". Being able to donox -s lint
/nox -s docs
/nox -s tests
and having it manage setting up the environments, would be great. Once I figure out what the setups look like, I'd be happy to file a PR adding a nox configuration for this project, if it would be welcome. :)The text was updated successfully, but these errors were encountered: