Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6150446
fixed pyright and ruff errors
RyanMcCleary May 15, 2025
27c3bdd
exclude addon/globalPlugin/MathCAT/yaml/* from ruff linting
RyanMcCleary May 15, 2025
37efe28
removed unnecessary noqa comment in Example/test.py
RyanMcCleary May 15, 2025
538b228
fixed errors in pre-commit config file
RyanMcCleary May 15, 2025
8f07b89
removed configuration from pyproject.toml that does not apply
RyanMcCleary May 15, 2025
6fee99b
updated maintainer info and changed .yml extension to .yaml
RyanMcCleary May 19, 2025
25384b9
temporarily commented out no-commit-to-branch hook
RyanMcCleary May 19, 2025
a20666a
updated zip version in Cargo.toml
RyanMcCleary May 20, 2025
3c49323
Update translations
invalid-email-address May 20, 2025
cf156df
added [patch.crates-io] to Cargo.toml
RyanMcCleary May 20, 2025
15fad5a
Merge branch 'main' of github.com:RyanMcCleary/MathCATForPython
RyanMcCleary May 20, 2025
31304b2
Update translations
invalid-email-address May 20, 2025
5fbc8a4
added newline at EOF in some files
RyanMcCleary May 20, 2025
7a2d529
added newline at end of .rs files
RyanMcCleary May 20, 2025
4aecb18
Merged
RyanMcCleary May 21, 2025
6bff8d7
Pre-commit auto-fix
pre-commit-ci[bot] May 21, 2025
984e9b8
removed lint.yaml
RyanMcCleary May 21, 2025
3856957
Merge branch 'remove-lint-action' of github.com:RyanMcCleary/MathCATF…
RyanMcCleary May 21, 2025
742a660
Removed requirements.txt
RyanMcCleary May 21, 2025
5f8d06d
Removed [patch.crates-io] from Cargo.toml
RyanMcCleary May 21, 2025
232ddeb
Added rust to the pre-commit file
RyanMcCleary May 21, 2025
5cc9e74
Pre-commit auto-fix
pre-commit-ci[bot] May 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .github/workflows/lint.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/requirements.txt

This file was deleted.

6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ repos:
- id: debug-statements
# Removes trailing whitespace.
- id: trailing-whitespace
types_or: [python, c, c++, batch, markdown, toml, yaml]
types_or: [python, batch, markdown, toml, yaml, rust]
# Ensures all files end in 1 (and only 1) newline.
- id: end-of-file-fixer
types_or: [python, c, c++, batch, markdown, toml, yaml]
types_or: [python, batch, markdown, toml, yaml, rust]
# Removes the UTF-8 BOM from files that have it.
# See https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/codingStandards.md#encoding
- id: fix-byte-order-marker
types_or: [python, c, c++, batch, markdown, toml, yaml]
types_or: [python, batch, markdown, toml, yaml, rust]
# Validates TOML files.
- id: check-toml
# Validates YAML files.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ version = "0.22"
features = ["extension-module", "abi3"]

[build-dependencies]
zip = { version = "2.6", default-features = false, features = ["bzip2"] }
zip = { version = "3.0", default-features = false, features = ["bzip2"] }
mathcat = {version = "=0.6.9", features = ["include-zip"]} # for building, we want the zip files so we can include them separately
# mathcat = { path = "../MathCAT/", features = ["include-zip"]} # for building, we want the zip files so we can include them separately
# for testing MathCAT without having to publish a new version (change two occurrences)
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ fn main() {

let mut zip_archive = ZipArchive::new(archive).unwrap();
zip_archive.extract(&location).expect("Zip extraction failed");
}
}
30 changes: 15 additions & 15 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! 1. whatever preferences the AT needs to set, it is done with calls to [`SetPreference`].
//! 2. the MathML is sent over via [`SetMathML`].
//! 3. AT calls to get the speech [`GetSpokenText`] and calls [`GetBraille`] to get the (Unicode) braille.
//!
//!
//! Navigation can be done via calls to either:
//! * [`DoNavigateKeyPress`] (takes key events as input)
//! * [`DoNavigateCommand`] (takes the commands the key events internally map to)
Expand All @@ -14,7 +14,7 @@
//! * [`GetNavigationMathML`] -- returns a string representing the MathML for the selected node
//! Note: a second integer is returned. This is the offset in characters for a leaf node.
//! This is needed when navigating by character for multi-symbol leaf nodes such as "sin" and "1234"
//!
//!
//! It is also possible to find out what preferences are currently set by calling [`GetPreference`]
//!
//! AT can pass key strokes to allow a user to navigate the MathML by calling [`DoNavigateKeyPress`]; the speech is returned.
Expand Down Expand Up @@ -97,7 +97,7 @@ pub fn GetPreference(_py: Python, name: String) -> PyResult<String> {
#[pyfunction]
/// Get the braille associated with the MathML node with a given id (MathML set by `SetMathML`]).
/// An empty string can be used to return the braille associated with the entire expression.
///
///
/// The braille returned depends upon the preference for braille output.
pub fn GetBraille(_py: Python, nav_node_id: String) -> PyResult<String> {
return convert_error( get_braille(nav_node_id) );
Expand All @@ -106,7 +106,7 @@ pub fn GetBraille(_py: Python, nav_node_id: String) -> PyResult<String> {
#[pyfunction]
/// Get the braille associated with the MathML node with a given id (MathML set by `SetMathML`]).
/// An empty string can be used to return the braille associated with the entire expression.
///
///
/// The braille returned depends upon the preference for braille output.
pub fn GetNavigationBraille(_py: Python) -> PyResult<String> {
return convert_error( get_navigation_braille() );
Expand All @@ -124,17 +124,17 @@ pub fn DoNavigateKeyPress(_py: Python, key: usize, shift_key: bool, control_key:
/// Given a command, the current node is moved accordingly (or value reported in some cases).
///
/// The spoken text for the new current node is returned.
///
///
/// The list of legal commands are:
/// "MovePrevious", "MoveNext", "MoveStart", "MoveEnd", "MoveLineStart", "MoveLineEnd",
/// "MoveCellPrevious", "MoveCellNext", "MoveCellUp", "MoveCellDown", "MoveColumnStart", "MoveColumnEnd",
/// "ZoomIn", "ZoomOut", "ZoomOutAll", "ZoomInAll",
/// "MoveLastLocation",
/// "ReadPrevious", "ReadNext", "ReadCurrent", "ReadCellCurrent", "ReadStart", "ReadEnd", "ReadLineStart", "ReadLineEnd",
/// "DescribePrevious", "DescribeNext", "DescribeCurrent",
/// "WhereAmI", "WhereAmIAll",
/// "ToggleZoomLockUp", "ToggleZoomLockDown", "ToggleSpeakMode",
/// "Exit",
/// "MovePrevious", "MoveNext", "MoveStart", "MoveEnd", "MoveLineStart", "MoveLineEnd",
/// "MoveCellPrevious", "MoveCellNext", "MoveCellUp", "MoveCellDown", "MoveColumnStart", "MoveColumnEnd",
/// "ZoomIn", "ZoomOut", "ZoomOutAll", "ZoomInAll",
/// "MoveLastLocation",
/// "ReadPrevious", "ReadNext", "ReadCurrent", "ReadCellCurrent", "ReadStart", "ReadEnd", "ReadLineStart", "ReadLineEnd",
/// "DescribePrevious", "DescribeNext", "DescribeCurrent",
/// "WhereAmI", "WhereAmIAll",
/// "ToggleZoomLockUp", "ToggleZoomLockDown", "ToggleSpeakMode",
/// "Exit",
/// "MoveTo0","MoveTo1","MoveTo2","MoveTo3","MoveTo4","MoveTo5","MoveTo6","MoveTo7","MoveTo8","MoveTo9",
/// "Read0","Read1","Read2","Read3","Read4","Read5","Read6","Read7","Read8","Read9",
/// "Describe0","Describe1","Describe2","Describe3","Describe4","Describe5","Describe6","Describe7","Describe8","Describe9",
Expand Down Expand Up @@ -192,4 +192,4 @@ mod py_tests {
Err(e) => panic!("Error remains {}", e.to_string()),
}
}
}
}