Skip to content

Commit 146460a

Browse files
authored
ENH: Reduce file size (#433)
Close #430 Several improvements: 1. PDF files of the documentation have been compressed using `ghostscript` as described [here](https://www.digitalocean.com/community/tutorials/reduce-pdf-file-size-in-linux) using the `\ebook` setting (and for some of them, only the interesting pages remain) 2. Patterns in the TikZ pictures have been replaced with a simple fill colour to reduce the size of the SVG output. 3. PNG and JPG images of the documentation have been converted into `webp` files using the commands ```bash find . -name '*.jpg' -exec sh -c 'convert $1 ${1%.jpg}.webp' sh {} ';' find . -name '*.png' -exec sh -c 'convert $1 ${1%.png}.webp' sh {} ';' ``` 4. HTML files located in the `doc/_static/` folder have been minified using the [minhtml](https://github.com/wilsonzlin/minify-html) command line tool: ```bash minhtml --keep-closing-tags --minify-css --minify-js --minify-doctype doc/_static/**/*.html ``` The biome formatter has been disabled for this folder. 5. The script to generate the HTML plots of the networks has been updated to generate new static HTML files (considering #418 and #426). The code to plot all the networks of the catalogue on the same map is purely a large copy-paste of the code used to plot the networks individually. Only a few lines of code are adapted, but I would rather not refactor the entire plotting module for a single plot.
1 parent 85c77c7 commit 146460a

File tree

181 files changed

+3778
-119932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+3778
-119932
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
*.ico filter=lfs diff=lfs merge=lfs -text
44
*.pfd filter=lfs diff=lfs merge=lfs -text
55
.vscode/*.json linguist-language=jsonc
6+
*.webp filter=lfs diff=lfs merge=lfs -text

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ made and published by [Mines Paris Tech](https://www.minesparis.psl.eu/).
6565
<!-- end rlf-networks -->
6666

6767
<div align="center">
68-
<img alt="Catalogue of networks" src="https://github.com/RoseauTechnologies/Roseau_Load_Flow/blob/main/doc/_static/Network/Catalogue.png?raw=True" />
68+
<img alt="Catalogue of networks" src="https://github.com/RoseauTechnologies/Roseau_Load_Flow/blob/main/doc/_static/Network/Catalogue.webp?raw=True" />
6969
</div>
7070

7171
## Bug reports / Feature requests

biome.jsonc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"maxSize": 2097152 // 2 MiB to accommodate the networks Catalogue.html file (1.6 MiB)
10+
"includes": [
11+
"**",
12+
"!doc/_static/**/*.html"
13+
],
14+
"maxSize": 2097152
15+
// 2 MiB to accommodate the networks Catalogue.html file (1.6 MiB)
1116
},
1217
"formatter": {
1318
"enabled": true,

doc/License.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ section. Create a new variable called `ROSEAU_LOAD_FLOW_LICENSE_KEY`, with the v
104104
variable is personal to you, and the toggle will allow you to enable access to the license key for notebooks of your
105105
choice.
106106

107-
```{image} /_static/2024_09_16_Google_Colab_Environment_Variable.png
107+
```{image} /_static/2024_09_16_Google_Colab_Environment_Variable.webp
108108
---
109109
alt: Google Colab environment variable
110110
align: center
@@ -148,7 +148,7 @@ this file when you run your code (including when using Jupyter Notebooks in VS C
148148
If you are using [PyCharm](https://www.jetbrains.com/pycharm/), you can add the environment variable to your _Python
149149
Console_ settings as indicated in the screenshot below:
150150

151-
```{image} /_static/2024_01_12_Pycharm_Console_Environment_Variable.png
151+
```{image} /_static/2024_01_12_Pycharm_Console_Environment_Variable.webp
152152
---
153153
alt: Pycharm Console environment variable
154154
align: center

doc/_static/2024_01_12_Pycharm_Console_Environment_Variable.png

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Loading

doc/_static/2024_09_16_Google_Colab_Environment_Variable.png

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Loading

doc/_static/Advanced/Floating_Neutral_Auto.png

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)