Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing typos #66

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Test with pytest
run: |
uv run pytest
# Test that the compiled programs are compatible the Nillion backend.
# Test that the compiled programs are compatible with the Nillion backend.
test:
runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release workflow
# - When there is a push to 'main', it detects if the local version has changed and is higher than the remote (PyPI) version.
# - Generates a new nada-dsl release, signes it and pushes it to PyPI when a PR is merged that updates the version number in pyproject.toml.
# - Generates a new nada-dsl release, signs it, and pushes it to PyPI when a PR is merged that updates the version number in pyproject.toml.
# - Generates a new nada-dsl Github release

name: Create a new release
Expand Down
18 changes: 9 additions & 9 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension-pkg-allow-list=
extension-pkg-whitelist=

# Return non-zero exit code if any of these messages/categories are detected,
# even if score is above --fail-under value. Syntax same as enable. Messages
# even if the score is above --fail-under value. Syntax same as enable. Messages
# specified are enabled, while categories only check already-enabled messages.
fail-on=

Expand All @@ -48,7 +48,7 @@ fail-under=10
# Files or directories to be skipped. They should be base names, not paths.
ignore=CVS

# Add files or directories matching the regular expressions patterns to the
# Add files or directories matching the regular expression patterns to the
# ignore-list. The regex matches against paths and can be in Posix or Windows
# format. Because '\\' represents the directory delimiter on Windows systems,
# it can't be used as an escape character.
Expand Down Expand Up @@ -293,7 +293,7 @@ max-attributes=7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5

# Maximum number of branch for function / method body.
# Maximum number of branches for function / method body.
max-branches=12

# Maximum number of locals for function / method body.
Expand Down Expand Up @@ -417,8 +417,8 @@ confidence=HIGH,
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# If you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=raw-checker-failed,
Expand All @@ -435,8 +435,8 @@ disable=raw-checker-failed,
W0223,W0718,R0903,R0913,R0801,R0401,W0231,W0603

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# either give multiple identifiers separated by comma (,) or put this option
# multiple times (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=

Expand Down Expand Up @@ -464,7 +464,7 @@ notes-rgx=
# Maximum number of nested blocks for function / method body
max-nested-blocks=5

# Complete name of functions that never returns. When checking for
# Complete name of functions that never return. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
Expand Down Expand Up @@ -616,7 +616,7 @@ allow-global-unused-variables=yes
# List of names allowed to shadow builtins
allowed-redefined-builtins=

# List of strings which can identify a callback function by name. A callback
# List of strings that can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ We recommend continuously running your code through `pylint` and `mypy` during t

### Installation

1. Install [black](https://pypi.org/project/black/) and [isort](https://pycqa.github.io/isort/) for code formating
1. Install [black](https://pypi.org/project/black/) and [isort](https://pycqa.github.io/isort/) for code formatting
```bash
pip3 install black && isort
```
Expand Down Expand Up @@ -56,4 +56,4 @@ poetry run mypy
We use [GitHub issues](https://github.com/NillionNetwork/nada-dsl/issues/new/choose) to report bugs and typos, or to suggest new ideas. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.

## License
By contributing to `nada-dsl`, you agree that your contributions will be licensed under the [LICENSE](./LICENSE) file in the root directory of this source tree.
By contributing to `nada-dsl`, you agree that your contributions will be licensed under the [LICENSE](./LICENSE) file in the root directory of this source tree.
4 changes: 2 additions & 2 deletions nada_dsl/nada_types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class NadaType:
In Nada, all the types wrap Operations. For instance, an addition between two integers
is represented like this SecretInteger(child=Addition(...)).

In MIR, the representation is based around operations. A MIR operation points to other
In MIR, the representation is based on operations. A MIR operation points to other
operations and has a return type.

To aid MIR conversion, we store in memory (`AST_OPERATIONS`) all the operations in a
Expand Down Expand Up @@ -154,7 +154,7 @@ def to_mir(self):
def class_to_mir(cls) -> str:
"""Converts a class into a MIR Nada type."""
name = cls.__name__
# Rename public variables so they are considered as the same as literals.
# Rename public variables so they are considered the same as literals.
if name.startswith("Public"):
name = name[len("Public") :].lstrip()
return name
Expand Down
2 changes: 1 addition & 1 deletion nada_dsl/nada_types/scalar_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from nada_dsl import SourceRef
from . import NadaType, Mode, BaseType, OperationType

# Constant dictionary that stores all the Nada types and is use to
# Constant dictionary that stores all the Nada types and is used to
# convert from the (mode, base_type) representation to the concrete Nada type
# (Integer, SecretBoolean,...)

Expand Down
4 changes: 2 additions & 2 deletions tests/scalar_type_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_shift(left: ScalarType, right: ScalarType, operation):


# Binary relational operations.
# Equals and NotEquals are not included, because they accept by the Boolean types as well
# Equals and NotEquals are not included, because they are accepted by the Boolean types as well
binary_relational_functions = [
lambda lhs, rhs: lhs < rhs,
lambda lhs, rhs: lhs > rhs,
Expand Down Expand Up @@ -409,7 +409,7 @@ def test_not_allowed_pow(left, right):
assert invalid_operation.type == TypeError


# List of operands that the shift operation do not accept.
# List of operands that the shift operation does not accept.
not_allowed_shift = (
combine_lists(combine_lists(booleans, booleans), shift_functions)
+ combine_lists(combine_lists(integers, booleans), shift_functions)
Expand Down
Loading