Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  fix ci builds
  CI: don't install custom ZeroMQ version (#109)
  Don't use bin/gap.sh (#108)
  updated dependencies and fixed some documentation typos
  • Loading branch information
mcmartins committed Mar 24, 2024
2 parents 0285829 + 3940958 commit 5bf2a14
Showing 20 changed files with 2,486 additions and 2,345 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -30,11 +30,6 @@ jobs:
- stable-4.12

steps:
- name: Configure ZMQ repos
run: |
sudo touch /etc/apt/sources.list.d/opensuse.list &&
echo "deb https://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/ ./" | sudo tee -a /etc/apt/sources.list.d/opensuse.list
wget https://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/Release.key -O- | sudo apt-key add
- name: Install ZMQ
run: |
sudo apt update &&
@@ -73,7 +68,7 @@ jobs:
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- run: pip install jupyterlab
- run: pip install jupyterlab==4.0.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
@@ -108,11 +103,6 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Configure ZMQ repos
run: |
sudo touch /etc/apt/sources.list.d/opensuse.list &&
echo "deb https://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/ ./" | sudo tee -a /etc/apt/sources.list.d/opensuse.list
wget https://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/Release.key -O- | sudo apt-key add
- name: Install ZMQ
run: |
sudo apt update &&
9 changes: 2 additions & 7 deletions .github/workflows/RELEASE.yml
Original file line number Diff line number Diff line change
@@ -24,11 +24,6 @@ jobs:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Configure ZMQ repos
# run: |
# sudo touch /etc/apt/sources.list.d/opensuse.list &&
# echo "deb https://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/ ./" | sudo tee -a /etc/apt/sources.list.d/opensuse.list
# wget https://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/Release.key -O- | sudo apt-key add
# - name: Install ZMQ
# run: |
# sudo apt update &&
@@ -75,7 +70,7 @@ jobs:
# # Run Release Script
# git config --global user.email "noreply@none.no"
# git config --global user.name "GitHubActionRELEASE"
# GAP="$HOME/gap/bin/gap.sh" bash -x $HOME/ReleaseTools/release-gap-package --force --push --token ${GH_TOKEN}
# GAP="$HOME/gap/gap" bash -x $HOME/ReleaseTools/release-gap-package --force --push --token ${GH_TOKEN}

publish_js_python_packages:
#needs: gap_release_tools
@@ -94,7 +89,7 @@ jobs:
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- run: pip install jupyterlab build
- run: pip install jupyterlab==4.0.1 build
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ RUN apt update && apt -qq install -y git curl wget python3-pip inkscape pandoc t
rm -rf /opt/master/packages.tar.gz && chown -R jovyan: /opt/master/ && \
cd /opt/master/pkg/jupyterkernel && pip install . && \
ln -s /opt/master/pkg/francy/notebooks /home/jovyan/notebooks && \
ln -s /opt/master/bin/gap.sh /usr/local/sbin/gap && \
ln -s /opt/master/gap /usr/local/sbin/gap && \
apt purge git gcc g++ make autoconf curl wget -y

USER jovyan
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -9,7 +9,8 @@
Francy is a package for GAP that provides a framework for Interactive Discrete Mathematics.

Unlike [XGAP](https://github.com/gap-packages/xgap), Francy is not linked with any GUI framework and instead,
this package is responsible for the generation of a semantic model that can be used to produce a graphical representation using any other framework / language.
this package is responsible for the generation of a semantic model that can be used to produce a graphical representation
using any other framework / language.

See [Official Documentation](https://gap-packages.github.io/francy/doc/chap1.html)

@@ -26,33 +27,35 @@ Jupyter Lab Binder

The following notebooks are available:

|Notebook |Description |
|:-------------------------------|:---------------------------------------------------------------|
|francy-features.ipynb | Contains examples of all features present in Francy |
|francy-monoids-mult-three.ipynb | Contains an example of proofs used in a paper |
|francy-monoids.ipynb | Contains FrancyMonoids package examples |
|francy-numericalsgps.ipynb | Same as above, but the algorithms are visible in the notebook |
|francy.ipynb | First notebook ever created with Francy |
|ICMS_2018.ipynb | Presentation notebook for the ICMS 2018 in USA |
|orbital-graphs.ipynb | Contains some reseach algorithms for orbital graphs |
|output-widget.ipynb | Contains an example of the output of 'plain/text' elements |
|subgroup-lattice.ipynb | Contains Subgroup-Lattice package examples |
| Notebook | Description |
|:--------------------------------|:--------------------------------------------------------------|
| demo.ipynb | Contains examples of all features present in Francy |
| francy.ipynb | First notebook ever created with Francy |
| francy-features.ipynb | Contains examples of all features present in Francy |
| francy-monoids.ipynb | Contains FrancyMonoids package examples |
| francy-monoids-mult-three.ipynb | Contains an example of proofs used in a paper |
| francy-numericalsgps.ipynb | Same as above, but the algorithms are visible in the notebook |
| ICMS_2018.ipynb | Presentation notebook for the ICMS 2018 in USA |
| messages.ipynb | Contains examples of how to use messages |
| orbital-graphs.ipynb | Contains some research algorithms for orbital graphs |
| output-widget.ipynb | Contains an example of the output of 'plain/text' elements |
| subgroup-lattice.ipynb | Contains Subgroup-Lattice package examples |

# Jupyter Integration

In order to use this module in JupyterLab, install it as follows:
In order to use this module in JupyterLab and Notebook 7.0.0+, install it as follows:

```bash
mcmartins@local:~$ pip install -U jupyterlab-francy
```

If you still use the old JupyterNotebooks, you should use the latest version supported, v1.2.4:
If you still use the old Jupyter Notebook (<7.0.0), you should use the old extension v1.2.4:

```bash
mcmartins@local:~$ pip install -U jupyter-francy
```

This extension requires the JupyterKernel GAP package to be installed.
Please note that in order to use Francy, it is required the JupyterKernel GAP package to be installed.
See [Jupyter GAP Kernel](https://github.com/gap-packages/JupyterKernel) for more information.

# Package Structure
@@ -95,7 +98,8 @@ To release, the official [ReleaseTools](https://github.com/gap-system/ReleaseToo
There are 2 workflows defined for this project:

* CI - This workflow runs all tests (JS and GAP) for every commit/pull request on branches `develop` and `master`
* RELEASE - This workflow runs the Python PyPi.org and NPM releases on new `tag`s created, normally after running the [ReleaseTools](https://github.com/gap-system/ReleaseTools) procedure.
* RELEASE - This workflow runs the Python PyPi.org and NPM releases on new `tag`s created, normally after running the
* [ReleaseTools](https://github.com/gap-system/ReleaseTools) procedure.

# License

135 changes: 81 additions & 54 deletions doc/intro.xml
Original file line number Diff line number Diff line change
@@ -1,59 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>

<Chapter>
<Heading>Introduction</Heading>

<Section>
<Heading>Francy</Heading>

&Francy; arose from the necessity of having a lightweight framework for building interactive graphics, generated from GAP, running primarily on the web, specially in &Jupyter; environments.
An initial attempt to re-use XGAP and port it was made, but the lack of a standardized data exchange format between GAP and the graphics renderer, and the simplistic initial requirements
of the project were the basis for the creation of a new GAP package.
Take a look at &Francy; functionality on these <URL Text="Jupyter Notebooks">https://mybinder.org/v2/gh/gap-packages/francy/master</URL>.
</Section>

<Section>
<Heading>Applications</Heading>

&Francy; has potentially many applications and can be used to provide a graphical representation of data structures, allowing one to navigate through and explore properties or relations of these structures.
In this way, &Francy; can be used to enrich a learning environment where GAP provides a library of thousands of functions implementing algebraic algorithms as well as large data libraries of algebraic objects.
&FrancyMonoids; and &SubgroupLattice; are some example packages using &Francy;.
</Section>

<Section>
<Heading>Functionality</Heading>

&Francy; provides an interface to draw graphics using objects. This interface is based on simple concepts of drawing and graph theory, allowing the creation of directed and undirected graphs, trees, line charts, bar charts and scatter charts.
These graphical objects are drawn inside a canvas that includes a space for menus and to display informative messages.
Within the canvas it is possible to interact with the graphical objects by clicking, selecting, dragging and zooming.
</Section>

<Section>
<Heading>Installation</Heading>

This package requires the &GAP; packages &JupyterKernel;, &json; and &uuid;, all of which are distributed with &GAP; by default.
&Francy; requires &Jupyter; to be installed on your system. Please note that you need to run the installation commands from the same python version &Jupyter; is installed on.
Currently, &Francy; is supported only on &Jupyter; Lab, if you want to use it on the old &Jupyter; Notebooks, please install the latest supported version: v1.2.4.
In order to install or update &Francy;, please run the following command to download the latest version available from <URL>https://pypi.org/</URL>:
<Log>
mcmartins@local:~$ pip install -U jupyterlab-francy
</Log>
</Section>

<Section>
<Heading>How it works</Heading>

&Francy; requires a rendering package to display graphics. &Francy; provides by default 3 Renderers based on D3.js, Vis.js and Graphviz, for rendering the semantic model representations produced by the GAP package.
The renderers can be switched at any time using the user interface, by selecting 'Settings > Renderers' in the main menu.
This library is distributed both as a browser module and as a &Jupyter; Lab extension.
This library can be used in &Jupyter; Lab, using the &JupyterKernel; and the MIME type 'application/vnd.francy+json' to render the document.
Please check the <URL Text="JavaScript Documentation">https://gap-packages.github.io/francy/doc/js/doc/index.html</URL> for more information.
</Section>

<Section>
<Heading>Publications</Heading>

<URL Text="ICMS 2018">https://doi.org/10.1007/978-3-319-96418-8_42</URL>
</Section>
<Heading>Introduction</Heading>

<Section>
<Heading>Francy</Heading>

&Francy; arose from the necessity of having a lightweight framework for building interactive graphics, generated
from GAP, running primarily on the web, specially in &Jupyter; environments.
An initial attempt to re-use XGAP and port it was made, but the lack of a standardized data exchange format
between
GAP and the graphics renderer, and the simplistic initial requirements
of the project were the basis for the creation of a new GAP package.
Take a look at &Francy; functionality on these
<URL Text="Jupyter Notebooks">https://mybinder.org/v2/gh/gap-packages/francy/master</URL>.
</Section>

<Section>
<Heading>Applications</Heading>

&Francy; has potentially many applications and can be used to provide a graphical representation of data
structures,
allowing one to navigate through and explore properties or relations of these structures.
In this way, &Francy; can be used to enrich a learning environment where GAP provides a library of thousands of
functions implementing algebraic algorithms as well as large data libraries of algebraic objects.
&FrancyMonoids; and &SubgroupLattice; are some example packages using &Francy;.
</Section>

<Section>
<Heading>Functionality</Heading>

&Francy; provides an interface to draw graphics using objects. This interface is based on simple concepts of
drawing
and graph theory, allowing the creation of directed and undirected graphs, trees, line charts, bar charts and
scatter charts.
These graphical objects are drawn inside a canvas that includes a space for menus and to display informative
messages.
Within the canvas it is possible to interact with the graphical objects by clicking, selecting, dragging and
zooming.
</Section>

<Section>
<Heading>Installation</Heading>

This package requires the &GAP; packages &JupyterKernel;, &json; and &uuid;, all of which are distributed
with &GAP;
by default.
&Francy; requires &Jupyter; to be installed on your system. Please note that you need to run the installation
commands
from the same python version &Jupyter; is installed on.
Currently, &Francy; is supported only on &Jupyter; Lab, if you want to use it on the old &Jupyter; Notebooks,
please
install the latest supported version: v1.2.4.
In order to install or update &Francy;, please run the following command to download the latest version
available
from <URL>https://pypi.org/</URL>:
<Log>
mcmartins@local:~$ pip install -U jupyterlab-francy
</Log>
</Section>

<Section>
<Heading>How it works</Heading>

&Francy; requires a rendering package to display graphics. &Francy; provides by default 3 Renderers based on
D3.js,
Vis.js and Graphviz, for rendering the semantic model representations produced by the GAP package.
The renderers can be switched at any time using the user interface, by selecting 'Settings > Renderers' in the
main menu.
This library is distributed both as a browser module and as a &Jupyter; Lab extension.
This library can be used in &Jupyter; Lab, using the &JupyterKernel; and the MIME type
'application/vnd.francy+json'
to render the document.
Please check the
<URL Text="JavaScript Documentation">https://gap-packages.github.io/francy/doc/js/doc/index.html</URL>
for more information.
</Section>

<Section>
<Heading>Publications</Heading>

<URL Text="ICMS 2018">https://doi.org/10.1007/978-3-319-96418-8_42</URL>
</Section>

</Chapter>
2 changes: 1 addition & 1 deletion gap/canvas.gd
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ DeclareOperation("Canvas", [IsString, IsCanvasDefaults]);
DeclareOperation("Draw", [IsCanvas]);

#! @Description
#! Generates an HTML page with an offline version od Francy JS and opens it within the default browser of the system.
#! Generates an HTML page with an offline version of Francy JS and opens it within the default browser of the system.
#! @Arguments IsCanvas
#! @Returns <C>IsString</C> with HTML generated
DeclareOperation("DrawSplash", [IsCanvas]);
7 changes: 6 additions & 1 deletion js/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -17,7 +17,12 @@
"babelrc": false,
"configFile": false,
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}]
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
]
]
}
},
53 changes: 27 additions & 26 deletions js/package.json
Original file line number Diff line number Diff line change
@@ -21,26 +21,26 @@
"coverage": "yarn run test"
},
"devDependencies": {
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.4",
"@babel/eslint-parser": "^7.21.3",
"@babel/cli": "^7.21.5",
"@babel/core": "^7.22.1",
"@babel/eslint-parser": "^7.21.8",
"@babel/eslint-plugin": "^7.19.1",
"@babel/plugin-proposal-decorators": "^7.21.0",
"@babel/plugin-proposal-decorators": "^7.22.3",
"@babel/plugin-transform-classes": "^7.21.0",
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.4",
"@hpcc-js/wasm": "^2.10.0",
"@jupyterlab/builder": "^3.6.3",
"@jupyterlab/notebook": "^3.6.3",
"@jupyterlab/rendermime": "^3.6.3",
"@swc/core": "^1.3.50",
"@babel/plugin-transform-runtime": "^7.22.4",
"@babel/preset-env": "^7.22.4",
"@hpcc-js/wasm": "^2.13.0",
"@jupyterlab/builder": "^4.0.1",
"@jupyterlab/notebook": "^4.0.1",
"@jupyterlab/rendermime": "^4.0.1",
"@swc/core": "^1.3.62",
"babel-loader": "^9.1.2",
"chai": "^4.3.7",
"chai-string": "^1.5.0",
"core-js": "^3.30.0",
"css-loader": "^6.7.3",
"d3": "^7.8.4",
"d3-array": "^3.2.3",
"core-js": "^3.30.2",
"css-loader": "^6.8.1",
"d3": "^7.8.5",
"d3-array": "^3.2.4",
"d3-axis": "^3.0.0",
"d3-color": "^3.1.0",
"d3-drag": "^3.0.0",
@@ -55,34 +55,35 @@
"d3-shape": "^3.2.0",
"d3-transition": "^3.0.1",
"d3-zoom": "^3.0.0",
"eslint": "^8.38.0",
"eslint": "^8.42.0",
"file-loader": "^6.2.0",
"source-map-loader": "^4.0.1",
"jsdoc": "^4.0.2",
"json-loader": "^0.5.7",
"karma": "^6.4.1",
"karma": "^6.4.2",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.1",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage": "^2.2.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-safari-launcher": "^1.0.0",
"karma-webpack": "^5.0.0",
"lerna": "^6.6.1",
"lerna": "^6.6.2",
"lodash.isequal": "^4.5.0",
"lodash.reduce": "^4.6.0",
"mkdirp": "^3.0.0",
"mkdirp": "^3.0.1",
"mocha": "^10.2.0",
"npm-run-all": "^4.1.5",
"process": "^0.11.10",
"puppeteer": "^19.9.0",
"rimraf": "^5.0.0",
"puppeteer": "^20.5.0",
"rimraf": "^5.0.1",
"save-svg-as-png": "^1.4.17",
"seedrandom": "^3.0.5",
"style-loader": "^3.3.2",
"terser-webpack-plugin": "^5.3.7",
"style-loader": "^3.3.3",
"terser-webpack-plugin": "^5.3.9",
"vis-network": "^9.1.6",
"webpack": "^5.79.0",
"webpack-cli": "^5.0.1",
"webpack": "^5.85.0",
"webpack-cli": "^5.1.1",
"yarn": "^1.22.19"
}
}
Loading

0 comments on commit 5bf2a14

Please sign in to comment.