Skip to content

Commit 8a97d39

Browse files
committed
add typos.yml and fix typos
Signed-off-by: Andrei Gherghescu <[email protected]>
1 parent 00fc82c commit 8a97d39

File tree

12 files changed

+61
-17
lines changed

12 files changed

+61
-17
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: PR checks
22

33
on:
44
workflow_dispatch:

.github/workflows/typos.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Typos
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [ main ]
7+
push:
8+
branches: [ main ]
9+
10+
jobs:
11+
typos:
12+
name: Check for typos
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: crate-ci/typos@master

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [0.13.0] - 2025-xx-xx
88
### Changed
9-
- [[#277](https://github.com/plotly/plotly.rs/pull/277)] Removed `wasm` feature flag and put evrything behind target specific dependencies. Added `.cargo/config.toml` for configuration flags needed by `getrandom` version 0.3 on `wasm` targets.
9+
- [[#277](https://github.com/plotly/plotly.rs/pull/277)] Removed `wasm` feature flag and put everything behind target specific dependencies. Added `.cargo/config.toml` for configuration flags needed by `getrandom` version 0.3 on `wasm` targets.
1010
- [[#281](https://github.com/plotly/plotly.rs/pull/281)] Update to askama 0.13.0
1111
- [[#287](https://github.com/plotly/plotly.rs/pull/287)] Added functionality for callbacks (using wasm)
1212
- [[#289](https://github.com/plotly/plotly.rs/pull/289)] Fixes Kaleido static export for MacOS targets by removing `--disable-gpu` flag for MacOS
1313
- [[#291](https://github.com/plotly/plotly.rs/pull/291)] Remove `--disable-gpu` flag for Kaleido static-image generation for all targets.
1414
- [[#299](https://github.com/plotly/plotly.rs/pull/299)] Added customdata field to HeatMap
1515
- [[#303](https://github.com/plotly/plotly.rs/pull/303)] Split layout mod.rs into modules
16-
- [[#304](https://github.com/plotly/plotly.rs/pull/304)] Refactored examples to allow fo generation of full html files
16+
- [[#304](https://github.com/plotly/plotly.rs/pull/304)] Refactored examples to allow for generation of full html files
1717
- [[#320](https://github.com/plotly/plotly.rs/pull/320)] Make offline_js_sources function `pub`
1818
- [[#321](https://github.com/plotly/plotly.rs/pull/321)] Make 'online_cdn_js' function also `pub` for consistenccy
1919

@@ -86,7 +86,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
8686
- [[#154](https://github.com/plotly/plotly.rs/pull/154)] Improve ergonomics of `Title` and `LegendGroupTitle` structs: `new` method now takes no arguments as per other structs, whilst a new `with_text()` constructor is added for convenience. Where other structs contain a `Title` (and `LegendGroupTitle`), users can now call the `title()` (and `legend_group_title()`) method with anything that `impl`s `Into<Title>`, viz. `String`, `&String`, `&str` and `Title`.
8787
- [[#157](https://github.com/plotly/plotly.rs/pull/157)] Fix `HeatMap`'s setters for correctly setting `zmin`, `zmax` and `zmin` independent of `Z` input type.
8888
- [[#159](https://github.com/plotly/plotly.rs/pull/159)] Make `heat_map` module public to expose `Smoothing enum`.
89-
- [[#161](https://github.com/plotly/plotly.rs/pull/161)] Added `Axis` `scaleanchor` settter.
89+
- [[#161](https://github.com/plotly/plotly.rs/pull/161)] Added `Axis` `scaleanchor` setter.
9090
- [[#163](https://github.com/plotly/plotly.rs/pull/163)] Added `DensityMapbox`.
9191
- [[#166](https://github.com/plotly/plotly.rs/pull/166)] Added subplot example with multiple titles.
9292
- [[#178](https://github.com/plotly/plotly.rs/pull/178)] Fix setter for `Axis::matches` to take string arg.
@@ -119,7 +119,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
119119

120120
## [0.8.1] - 2022-09-25
121121
### Added
122-
- Button support (i.e. [updatemenus](https://plotly.com/javascript/reference/layout/updatemenus/)) contibuted by [@sreenathkrishnan](https://github.com/sreenathkrishnan). Details and examples in this well written PR [#99](https://github.com/plotly/plotly.rs/pull/99).
122+
- Button support (i.e. [updatemenus](https://plotly.com/javascript/reference/layout/updatemenus/)) contributed by [@sreenathkrishnan](https://github.com/sreenathkrishnan). Details and examples in this well written PR [#99](https://github.com/plotly/plotly.rs/pull/99).
123123
- Internally, there is now a `plotly-derive` crate which defines a `FieldSetter` procedural macro. This massively cuts down the amount of code duplication by generating the setter methods based on the struct fields. Again thanks to @sreenathkrishnan for this effort.
124124

125125
## [0.8.0] - 2022-08-26

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Alternatively, enable only the `kaleido` feature and manually install Kaleido.
148148
# Cargo.toml
149149

150150
[dependencies]
151-
plotly = { version = "0.12", features = ["kaleido"] }
151+
plotly = { version = "0.13", features = ["kaleido"] }
152152
```
153153

154154
With the feature enabled, plots can be saved as any of `png`, `jpeg`, `webp`, `svg`, `pdf` and `eps`. Note that the plot will be a static image, i.e. they will be non-interactive.
@@ -167,7 +167,7 @@ plot.write_image("out.png", ImageFormat::PNG, 800, 600, 1.0);
167167

168168
## Usage Within a Wasm Environment
169169

170-
`Plotly.rs` can be used with a Wasm-based frontend framework. The needed dependencies are automatically enabled on `wasm32` targets. Note that the `kaleido` feature is not supported in Wasm enviroments and will throw a compilation error if enabled.
170+
`Plotly.rs` can be used with a Wasm-based frontend framework. The needed dependencies are automatically enabled on `wasm32` targets. Note that the `kaleido` feature is not supported in Wasm environments and will throw a compilation error if enabled.
171171

172172
First, make sure that you have the Plotly JavaScript library in your base HTML template:
173173

_typos.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[files]
2+
extend-exclude = [
3+
"**/*.js",
4+
"**/*min.js",
5+
"docs/book/plotly.min.js",
6+
"docs/book/ferris.js",
7+
"plotly/resource/plotly.min.js",
8+
"plotly_static/resource/plotly.min.js",
9+
"plotly_static/resource/html2pdf.bundle.min.js",
10+
"plotly_static/resource/tex-mml-chtml-3.2.0.js",
11+
"plotly_static/resource/tex-svg-3.2.2.js"
12+
]
13+
14+
15+
[default.extend-words]
16+
# Don't correct the scene projection type "Winkel tripel"
17+
tripel = "tripel"

docs/book/src/getting_started.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,26 @@ plot.write_image("/home/user/plot_name.ext", ImageFormat::PNG, 1280, 900, 1.0);
9191

9292
The extension in the file-name path is optional as the appropriate extension (`ImageFormat::PNG`) will be included. Note that in all functions that save files to disk, both relative and absolute paths are supported.
9393

94-
## Saving Plots
94+
## Saving Plots with Kaleido (legacy)
9595

9696
To add the ability to save plots in the following formats: png, jpeg, webp, svg, pdf and eps, you can use the `kaleido` feature. This feature depends on [plotly/Kaleido](https://github.com/plotly/Kaleido): a cross-platform open source library for generating static images. All the necessary binaries have been included with `plotly_kaleido` for `Linux`, `Windows` and `MacOS`. Previous versions of [plotly.rs](https://github.com/plotly/plotly.rs) used the `orca` feature, however, this has been deprecated as it provided the same functionality but required additional installation steps. To enable the `kaleido` feature add the following to your `Cargo.toml`:
9797

9898
```toml
9999
[dependencies]
100-
plotly = { version = "0.12", features = ["kaleido"] }
100+
plotly = { version = "0.13", features = ["kaleido"] }
101101
```
102102

103+
## Static Image Export with WebDriver (recommended)
104+
105+
For static image export using WebDriver and headless browsers, you can use the `plotly_static` feature. This feature supports the same formats as Kaleido (png, jpeg, webp, svg, pdf) but uses WebDriver for the static export process. To enable static export, add the following to your `Cargo.toml`:
106+
107+
```toml
108+
[dependencies]
109+
plotly = { version = "0.13", features = ["static_export_default"] }
110+
```
111+
112+
The `static_export_default` feature includes Chrome WebDriver support with automatic download. For Firefox support, use `static_export_geckodriver` instead. See the [Static Image Export](../fundamentals/static_image_export.md) chapter for a detailed usage example.
113+
103114
## WebAssembly Support
104115

105116
As of v0.8.0, [plotly.rs](https://github.com/plotly/plotly.rs) can now be used in a `Wasm` environment by enabling the `wasm` feature in your `Cargo.toml`:

examples/customization/consistent_static_format_export/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SVG Export Example
22

3-
This example demonstrates exporting a plot to SVG, PNG, and PDF using plotly.rs and keeping font size and style consistent accross SVG and other formats.
3+
This example demonstrates exporting a plot to SVG, PNG, and PDF using plotly.rs and keeping font size and style consistent across SVG and other formats.
44

55
This example is based on [GitHub Issue #171](https://github.com/plotly/plotly.rs/issues/171).
66

examples/static_export/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This example demonstrates how to use the `plotly_static` crate for exporting Plo
44

55
The `plotly_static` provides a interface for converting Plotly plots into various static image formats (PNG, JPEG, WEBP, SVG, PDF) using WebDriver and headless browsers.
66

7-
In this example it is shown how to use the `StaticExporter` with the old style Kaleido API and also with the new style API. Using the former API is fine for one time static exports, but that API will crate an instance of the `StaticExporter` for each `write_image` call. The new style API is recommended for performance as the same instance of the `StaticExporter` can be reused accross mutliple exports.
7+
In this example it is shown how to use the `StaticExporter` with the old style Kaleido API and also with the new style API. Using the former API is fine for one time static exports, but that API will crate an instance of the `StaticExporter` for each `write_image` call. The new style API is recommended for performance as the same instance of the `StaticExporter` can be reused across multiple exports.
88

99
See also the `Static Image Export` section in the book for a more detailed description.
1010

plotly/src/common/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ pub enum PatternShape {
10601060
#[serde(rename = "")]
10611061
None,
10621062
#[serde(rename = "-")]
1063-
HorizonalLine,
1063+
HorizontalLine,
10641064
#[serde(rename = "|")]
10651065
VerticalLine,
10661066
#[serde(rename = "/")]
@@ -2263,7 +2263,7 @@ mod tests {
22632263
#[test]
22642264
fn serialize_pattern_shape() {
22652265
assert_eq!(to_value(PatternShape::None).unwrap(), json!(""));
2266-
assert_eq!(to_value(PatternShape::HorizonalLine).unwrap(), json!("-"));
2266+
assert_eq!(to_value(PatternShape::HorizontalLine).unwrap(), json!("-"));
22672267
assert_eq!(to_value(PatternShape::VerticalLine).unwrap(), json!("|"));
22682268
assert_eq!(
22692269
to_value(PatternShape::RightDiagonalLine).unwrap(),
@@ -2294,7 +2294,7 @@ mod tests {
22942294
fn serialize_pattern() {
22952295
let pattern = Pattern::new()
22962296
.shape_array(vec![
2297-
PatternShape::HorizonalLine,
2297+
PatternShape::HorizontalLine,
22982298
PatternShape::VerticalLine,
22992299
])
23002300
.fill_mode(PatternFillMode::Overlay)

plotly/src/plot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ impl Plot {
791791
}
792792

793793
#[cfg(target_family = "wasm")]
794-
/// Convert a `Plot` to a native Javasript `js_sys::Object`.
794+
/// Convert a `Plot` to a native JavaScript `js_sys::Object`.
795795
pub fn to_js_object(&self) -> wasm_bindgen_futures::js_sys::Object {
796796
use wasm_bindgen_futures::js_sys;
797797
use wasm_bindgen_futures::wasm_bindgen::JsCast;

0 commit comments

Comments
 (0)