Skip to content

Commit 228631d

Browse files
committed
add Typos check job and fix typos
Signed-off-by: Andrei Gherghescu <[email protected]>
1 parent 2cffff3 commit 228631d

File tree

9 files changed

+46
-12
lines changed

9 files changed

+46
-12
lines changed

.github/workflows/book.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
tags:
77
- '[0-9]+.[0-9]+.[0-9]+'
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
env:
1014
RUST_BACKTRACE: full
1115

.github/workflows/ci.yml renamed to .github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Build&Test
22

33
on:
44
workflow_dispatch:

.github/workflows/typos.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Typos
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [ main ]
7+
push:
8+
branches: [ main ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
typos:
16+
name: Check for typos
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- 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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[files]
2+
extend-exclude = [
3+
"**/*.js",
4+
"**/*min.js",
5+
]
6+
7+
8+
[default.extend-words]
9+
# Don't correct the scene projection type "Winkel tripel"
10+
tripel = "tripel"

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;

plotly/src/traces/scatter3d.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ where
155155
#[serde(rename = "texttemplate")]
156156
text_template: Option<Dim<String>>,
157157
/// Sets hover text elements associated with each (x, y, z) triplet. The
158-
/// same text will be associated with all datas points. To be seen, the
158+
/// same text will be associated with all data points. To be seen, the
159159
/// trace `hover_info` must contain a "Text" flag.
160160
#[serde(rename = "hovertext")]
161161
hover_text: Option<Dim<String>>,

0 commit comments

Comments
 (0)