Skip to content

Commit

Permalink
future3 - Move docs back to Github & markdown (#2085)
Browse files Browse the repository at this point in the history
* Start moving docs to markdown

* update userguide

* add more pages

* Rename index.md

* Undo last commit

* Add autohotspot

* Finish userguide without references

* Rename bt audio btns

* Adding developers and rfid

* docker: optimizations (#2074)

- linux host: use pulse unix socket
- mpd: run as user (pi / root)
- mpd: remove port exposure to host, connections to mpd only come from other docker containers
- less config adjustments for docker environment

Co-authored-by: Christoph Lauer <[email protected]>

* Start moving docs to markdown

* update userguide

* add more pages

* Rename index.md

* Undo last commit

* Add autohotspot

* Finish userguide without references

* Rename bt audio btns

* Adding developers and rfid

* Rename docs to documentation

* Update document structure

* Move rfid to developers

* Remove sphinx

* Remove even more sphinx

* Test pydoc

* Revert "Test pydoc"

This reverts commit e1c6aeb.

Revert "Remove even more sphinx"

This reverts commit 6f55597.

Revert "Remove sphinx"

This reverts commit 23abee3.

* Moving sphinx for api and command reference

* Remove Sphinx for good

* update paths to developers

---------

Co-authored-by: notapirate <[email protected]>
Co-authored-by: Christoph Lauer <[email protected]>
  • Loading branch information
3 people authored Nov 11, 2023
1 parent 0660586 commit 1ca5a81
Show file tree
Hide file tree
Showing 100 changed files with 1,998 additions and 3,790 deletions.
2 changes: 0 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ filename = *.py,*.py.*
extend-exclude =
# Ignore all scratch development directories
scratch*,
# The conf file is mostly autogenerated, ignore it
docs/sphinx/conf.py,
# Ignore dirs and files that have not been ported yet
*/jukebox/NvManager.py
# ignore GitHub Codespaces
Expand Down
13 changes: 1 addition & 12 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,7 @@ if [[ -n $PY_FILES ]]; then
echo "Flake8 return code: $flake8_code"
fi

DOC_FILES="$(git diff --diff-filter=d --staged --name-only -- docs/sphinx/*)"
sphinx_code=0
if [[ -n $DOC_FILES || -n $PY_FILES ]]; then
echo -e "\n**************************************************************"
echo -e "Files for documentation modified. Testing re-build of docs ... \n"
echo -e "**************************************************************\n"
./run_sphinx.sh -c
sphinx_code=$?
echo "Sphinx return code: $sphinx_code"
fi

code=$(( flake8_code + sphinx_code ))
code=$(( flake8_code ))

if [[ code -gt 0 ]]; then
echo -e "\n**************************************************************"
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/pythonpackage_future3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ on:
paths:
- '**.py'
- '**.py.*'
- 'docs/sphinx/**'
pull_request:
branches:
- 'future3/**'
paths:
- '**.py'
- '**.py.*'
- 'docs/sphinx/**'

jobs:
build:
Expand All @@ -40,9 +38,6 @@ jobs:
pip3 install spidev
pip3 install -r requirements.txt
# For operation of the Jukebox, ZMQ must be compiled from sources due to Websocket support
# When just building the docs, the regular ZMQ package is sufficient
pip3 install -r docs/sphinx/requirements_pyzmq.txt
pip3 install -r docs/sphinx/requirements.txt
# Also install all optional dependencies
pip3 install -r src/jukebox/components/rfid/hardware/fake_reader_gui/requirements.txt
pip3 install -r src/jukebox/components/rfid/hardware/pn532_i2c_py532/requirements.txt
Expand All @@ -53,9 +48,3 @@ jobs:
pip3 install flake8
# Stop the build if linting fails
./run_flake8.sh
- name: Build the docs
working-directory: ./docs/sphinx
run: |
# Stop the build if documentation cannot be built
# Treat all warnings as errors
sphinx-build -W --keep-going -T -a -E -b html . _build
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
/shared/*.*
/shared/*

# Documentation builder
/docs/sphinx/_build/

# Application
/src/cli_client/pbc

Expand Down
28 changes: 0 additions & 28 deletions .readthedocs.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ The Jukebox core app is written entirely in Python. Therefore, we follow the [Py

* **Documentation**
* You are expected to write some Documentation. It's easy. **Very** easy actually with [Python Docstrings](https://www.geeksforgeeks.org/python-docstrings/)
* If you dare, you may add the python documentation reference to the Sphinx documentation build. But we are also ok with doing that for you

# Structure of files and folders

Expand All @@ -38,8 +37,6 @@ Inside the root folder or the repo, these folders are important:
* contains the Python packages that are loaded using the plugin interface
* `src/webapp`
* contains the Web Interface
* `src/docs/sphinx`
* contains the documentation sources and build flow using Sphinx

All folders on all hierarchy levels starting with `scratch*` are ignored by git and flake8. These are intended
as local, temporary scratch areas.
Expand Down Expand Up @@ -132,18 +129,6 @@ cd /home/pi/RPi-Jukebox-RFID
If you are convinced some issue should not apply to your case or would require extensive re-coding, that could be OK.
Let us know in the pull request - we will look at it.
### Documentation
When adding or improving documentation, build the documentation and look at it locally.
If you are contributing to existing Python modules, be aware that these are already included in the documentation flow.
Also run through this step in this case! Fix all warnings!
~~~bash
$ cd /home/pi/RPi-Jukebox-RFID/
$ ./run_sphinx.sh
# open and check the result: 'file:///path/to/RPi-Jukebox-RFID/docs/sphinx/_build/html/index.html'
~~~
### Tests
Tests are very few at the moment, but it cannot hurt to run them. If you have tests for your new modules, please add
Expand Down
19 changes: 1 addition & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,7 @@ project check out the [documentation of Version 2](<https://github.com/MiczFlor/

## Where are the Help pages?

### Online

Read the documentation at [Readthedocs.io](https://rpi-jukebox-rfid.readthedocs.io/en/latest/)

### Local

Alternatively, build the help locally:

~~~bash
cd docs/sphinx
make
~~~

Then navigate your browser to

~~~bash
file:///path/to/RPi-Jukebox-RFID/docs/sphinx/_build/html/docs/index.html
~~~
The documentation can be found [here](documentation)

## Installation?

Expand Down
4 changes: 4 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
context: ../
dockerfile: ./docker/mpd.Dockerfile
container_name: mpd
image: phoniebox/mpd
environment:
- PULSE_SERVER=tcp:host.docker.internal:4713
restart: unless-stopped
Expand All @@ -27,6 +28,7 @@ services:
context: ../
dockerfile: ./docker/jukebox.Dockerfile
container_name: jukebox
image: phoniebox/jukebox
depends_on:
- mpd
environment:
Expand All @@ -40,12 +42,14 @@ services:
volumes:
- ../shared:/root/RPi-Jukebox-RFID/shared
- ./config/docker.pulse.mpd.conf:/root/.config/mpd/mpd.conf
command: python3 run_jukebox.py

webapp:
build:
context: ../
dockerfile: ./docker/webapp.Dockerfile
container_name: webapp
image: phoniebox/webapp
depends_on:
- jukebox
environment:
Expand Down
3 changes: 0 additions & 3 deletions docker/jukebox.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,3 @@ RUN pip3 install pyzmq
EXPOSE 5555 5556

WORKDIR ${INSTALLATION_PATH}/src/jukebox

# Run Jukebox
CMD python3 ${INSTALLATION_PATH}/src/jukebox/run_jukebox.py
2 changes: 1 addition & 1 deletion docker/webapp.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:18-bullseye-slim

USER node
RUN mkdir -p /home/node/webapp
Expand Down
17 changes: 0 additions & 17 deletions docs/sphinx/_templates/footer.html

This file was deleted.

20 changes: 0 additions & 20 deletions docs/sphinx/api/api.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/sphinx/api/callingback.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/sphinx/api/cfghandler.rst

This file was deleted.

19 changes: 0 additions & 19 deletions docs/sphinx/api/controls.rst

This file was deleted.

45 changes: 0 additions & 45 deletions docs/sphinx/api/gpioz/connector.rst

This file was deleted.

13 changes: 0 additions & 13 deletions docs/sphinx/api/gpioz/converter.rst

This file was deleted.

17 changes: 0 additions & 17 deletions docs/sphinx/api/gpioz/gpioz.rst

This file was deleted.

Loading

0 comments on commit 1ca5a81

Please sign in to comment.