-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update pull_request_template.md #357
base: master
Are you sure you want to change the base?
Conversation
While reviewing #356, the instructions of the PR template for reviewing seem to no longer work to render the site from the GHA artifact. With these changes, it seems to work again though, using python -m http.server 8887
For me, the preview still works with the described procedure (e.g. from the parent of the extracted tutorial...). Also, |
@florisvdh See issue #343. It seems the situation hasn't changed since I wrote this, so I don't know how to deal with it. (I don't have any knowledge of this kind of tools, I used to just follow the provided instructions.) |
Thanks @ElsLommelen; yeah I saw the same about Chrome OS from Chromium, so it's the same in Chrome then. Good that you made the issue.
@falkmielke yes of course, and I first tried that (as in the instructions), but there the CSS was not found (as seen from the console errors) so the website rendered without CSS: this is not the served path. However then I looked better at below output: it literally points to 0.0.0.0 and indeed that did work. But the website only works well if run it in the root of the tutorials site, not from the parent directory as prescribed (hence my changes). $ python -m http.server 8887
Serving HTTP on 0.0.0.0 port 8887 (http://0.0.0.0:8887/) ... So this is puzzling (it used to work before, the way you describe it). After reading some of the docs at https://docs.python.org/3/library/http.server.html (no docs available locally?), I tried: $ python -m http.server --bind 127.0.0.1 8887
Serving HTTP on 127.0.0.1 port 8887 (http://127.0.0.1:8887/) ... That works; for me this is required to use localhost. Using python 3.10. The Still it only works for all subpages (like 'categories', 'installation +' etc) when run directly from the tutorials directory, not from the parent directory. Would it be due to some sys config in Linux Mint 21.3, since I'm using the system's So I tried in an 'isolated' environment (actually this is just by controlling $ conda activate floris
(floris) $ which python
/home/floris/miniconda3/envs/floris/bin/python
(floris) $ python --version
Python 3.11.9
(floris) $ python -m http.server 8887
Serving HTTP on 0.0.0.0 port 8887 (http://0.0.0.0:8887/) ... More isolation, still the same: $ docker run -it -v .:/website/tutorials -p 8887:8887 rocker/tidyverse bash
root@56ac6c351a97:/# which python
root@56ac6c351a97:/# which python3
/usr/bin/python3
root@56ac6c351a97:/# ls website/tutorials/
404.html assets categories create_tutorial favicon-32x32.png favicon.png images index.xml js rmarkdown-libs search tags
articles authors code css favicon.ico html index.html installation list_of_categories robots.txt sitemap.xml tutorials
root@56ac6c351a97:/# cd website/
root@56ac6c351a97:/website# python3 -m http.server 8887
Serving HTTP on 0.0.0.0 port 8887 (http://0.0.0.0:8887/) ...
172.17.0.1 - - [10/Feb/2025 20:09:08] code 404, message File not found
172.17.0.1 - - [10/Feb/2025 20:09:08] "GET /create_tutorial/ HTTP/1.1" 404 -
172.17.0.1 - - [10/Feb/2025 20:09:11] code 404, message File not found
172.17.0.1 - - [10/Feb/2025 20:09:11] "GET /create_tutorial/ HTTP/1.1" 404 -
172.17.0.1 - - [10/Feb/2025 20:09:13] code 404, message File not found
172.17.0.1 - - [10/Feb/2025 20:09:13] "GET /categories/ HTTP/1.1" 404 -
^C
Keyboard interrupt received, exiting.
root@56ac6c351a97:/website# cd tutorials/
root@56ac6c351a97:/website/tutorials# python3 -m http.server 8887
Serving HTTP on 0.0.0.0 port 8887 (http://0.0.0.0:8887/) ...
172.17.0.1 - - [10/Feb/2025 20:09:30] "GET /create_tutorial/ HTTP/1.1" 200 -
172.17.0.1 - - [10/Feb/2025 20:09:30] "GET /create_tutorial/images/new_file.png HTTP/1.1" 200 -
172.17.0.1 - - [10/Feb/2025 20:09:30] "GET /create_tutorial/images/folder_file_name.png HTTP/1.1" 200 -
172.17.0.1 - - [10/Feb/2025 20:09:30] "GET /create_tutorial/images/knit_md.png HTTP/1.1" 200 -
172.17.0.1 - - [10/Feb/2025 20:09:30] "GET /create_tutorial/images/propose_file.png HTTP/1.1" 200 -
172.17.0.1 - - [10/Feb/2025 20:09:32] "GET /categories/ HTTP/1.1" 200 - And it's only when running from the tutorials site root (second try above in docker) that all subpages work well (e.g. 'create tutorial' / 'categories' doesn't when running from parent directory). But, if it works for you, then we may not want to change it. |
While reviewing #356, the instructions of the PR template for reviewing seem to no longer work to render the site from the GHA artifact, using
python -m http.server 8887
.With these changes, it seems to work again though, using
python -m http.server 8887
.I did not check Google Chrome though, having Chromium installed instead. @ElsLommelen I think you tested this in the past; can you test whether the new instructions also work with the Google Chrome Web Server app? You can e.g. use the artifact from #356.