diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a698440..ba53483 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,3 +1,4 @@ +--- name: Build and Deploy on: @@ -13,13 +14,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: recursive - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: '3.11' + python-version: '3.14' + - name: Install OS dependencies + run: | + sudo apt-get update -qq && sudo apt-get install -qq libarchive-dev tesseract-ocr - name: Install the dependencies run: | python -m pip install -r requirements.txt @@ -27,7 +31,7 @@ jobs: run: | make - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v5 with: path: ./dist diff --git a/.gitmodules b/.gitmodules index a5a0203..05ca2dc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "Mathics3-notebook-frontends"] - path = Mathics3-notebook-frontends - url = https://github.com/Mathics3/Mathics3-notebook-frontends.git + path = Mathics3-notebook-frontends + url = https://github.com/Mathics3/Mathics3-notebook-frontends.git diff --git a/Makefile b/Makefile index 5dc307b..aeb5bb3 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,30 @@ -.PHONY: all serve +.PHONY: all clean-cache clean-serve serve runserver wheel +# NOTEBOOK_VERSION Mathics3-Live version. The wheel name has this number in it. +NOTEBOOK_VERSION ?= 1.0.0 + +PYTHON ?= python +HTTP_PORT ?= 8000 + +NOTEBOOK_WHEEL=pypi/Mathics3_notebook_frontends-$(NOTEBOOK_VERSION)-py3-none-any.whl #: Build everything -all: pypi/Mathics3_notebook_frontends-0.1.0-py3-none-any.whl +all: $(NOTEBOOK_WHEEL) jupyter lite build --contents content --output-dir dist cp -f index.html dist/index.html -pypi/Mathics3_notebook_frontends-0.1.0-py3-none-any.whl: +#: Remove Jupyter Cache file +clean-cache: + rm .jupyterlite.doit.db || true; + + +#: Make Build everything +$(NOTEBOOK_WHEEL): cd Mathics3-notebook-frontends && python3 -m build - cp -f Mathics3-notebook-frontends/dist/[Mm]athics3_notebook_frontends-0.1.0-py3-none-any.whl $@ + cp -f Mathics3-notebook-frontends/dist/[Mm]athics3_notebook_frontends-${NOTEBOOK_VERSION}-py3-none-any.whl $@ #: Start a HTTP webserver running Mathics3-live -serve: all - cd dist && python3 -m http.server +runserver serve: all + cd dist && python3 -m http.server $(HTTP_PORT) + +#: Clean Jupyter cache and start a HTTP webserver running Mathics3-live +clean-serve: all clean-cache serve diff --git a/Mathics3-notebook-frontends b/Mathics3-notebook-frontends index ef0399e..02a6591 160000 --- a/Mathics3-notebook-frontends +++ b/Mathics3-notebook-frontends @@ -1 +1 @@ -Subproject commit ef0399e0ce081549b5b31727542f22786083c87a +Subproject commit 02a65912c0cfbfc17421eb2773bf6ae4379f7801 diff --git a/README.md b/README.md index 1757b35..4b9b28f 100644 --- a/README.md +++ b/README.md @@ -9,23 +9,62 @@ JupyterLite is being tested against modern web browsers: - Firefox 90+ - Chromium 89+ +On Ubuntu, install `libarchive-dev` + +```console +sudo apt install libarchive-dev +``` + ## Installing and running locally -Install this code in a virtual Python environment: -```bash + +### Install Mathics3-notebook-frontends submodule + +After cloning, Mathics3-notebook-frontends needs to be added as a git submodule. To do this: + +```console +git submodule --init --recursive +``` + +If submodule change and you want to update what's here, you may need to run more `git submodule` commands. + +Consult git docs for operating procudures when working with git submodules. + + +### Install in a virtual Python environment + +To install this code in a virtual Python environment: +```console python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` -The above needs to be done only once. +The above also needs to be done only once. Once the virtual environment has been set up with the packages installed, to run the server: -```bash +```console make serve ``` +## Making changes + +### Changes in this Mathics3-live + +If `index.html` is updated or possibly other changes, the JupyterLite cache, `.jupyterlite.doit.db` may need to be removed. + +```console +make clean-serve +``` + +will both start the server after first removing the JupyterLite cache. + +### Changes in Mathics3-notebook-frontends + +You'll need to update the submodule here. One way is just to issue git command like `git pull` inside the `Mathics3-notebook-frontends` directory. + + ## Further Information and Updates For more info, keep an eye on the JupyterLite documentation: diff --git a/img/README.md b/img/README.md new file mode 100644 index 0000000..a365435 --- /dev/null +++ b/img/README.md @@ -0,0 +1,10 @@ +About the Mathics3 Logo. + +It uses the Times New Roman font. The "3" is italicized. +There is a reflected image that is slanted about 30 per cent and has a gradient on the reflection. + +It was created in inkscape, and can probably be edited that way. + +The heptatom logo was also created using inkscape. + +Inline SVG's are used inside index.html, because I (rocky) can't figure out how to include them in jupyterlite from this directory diff --git a/img/favicons/favicon-32x32.png b/img/favicons/favicon-32x32.png new file mode 100644 index 0000000..e981c4d Binary files /dev/null and b/img/favicons/favicon-32x32.png differ diff --git a/img/logo-heptatom.svg b/img/logo-heptatom.svg new file mode 100644 index 0000000..31efefb --- /dev/null +++ b/img/logo-heptatom.svg @@ -0,0 +1,100 @@ + + + + diff --git a/index.html b/index.html index 436f8c7..0d01e22 100644 --- a/index.html +++ b/index.html @@ -13,8 +13,8 @@ --card-bg: #ffffff; } - .container, - .sidebar_card, + .container, + .sidebar_card, .row, #main, aside { @@ -117,7 +117,7 @@ .row { flex-direction: column; } - + aside { width: 100%; } @@ -190,15 +190,144 @@
-