Skip to content
Merged
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
1 change: 1 addition & 0 deletions .pylintrc-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
- too-many-function-args
- redundant-keyword-arg
- no-value-for-parameter
- invalid-field-call
1 change: 0 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"sumpy": ("https://documen.tician.de/sumpy/", None),
"islpy": ("https://documen.tician.de/islpy/", None),
"jax": ("https://jax.readthedocs.io/en/latest/", None),
"attrs": ("https://www.attrs.org/en/stable/", None),
"mpi4py": ("https://mpi4py.readthedocs.io/en/latest", None),
"immutabledict": ("https://immutabledict.corenting.fr/", None),
}
Expand Down
17 changes: 6 additions & 11 deletions doc/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,20 +226,15 @@ that relies on memory layout information to do its job is undefined in :mod:`pyt
At the most basic level, the attribute :attr:`numpy.ndarray.strides` is not available
on subclasses of :class:`pytato.Array`.

Dataclasses / :mod:`attrs`
--------------------------
Dataclasses
-----------

:mod:`dataclasses` helps us reduce most of the boilerplate involved in
instantiating a new type. However, :mod:`dataclasses` does not support
keyword-only argument until Python-3.10. To overcome this, we prefer
:mod:`attrs` which gives us all the required functionality of
:mod:`dataclasses` and works with Python-3.8.


instantiating a new type.
We have checks in place to avoid developer errors that could happen by using
the defaults of these libraries. For eg. both :mod:`dataclasses` and
:mod:`attrs` override the implementation of ``__eq__`` for the class being
implemented, which could potentially lead lead to an `exponential complex
the defaults of this library. For example, :mod:`dataclasses` overrides the
implementation of ``__eq__`` for the class being implemented, which could
potentially lead to an `exponentially complex
operation <https://github.com/inducer/pytato/issues/163>`_.

Lessons learned
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
dependencies = [
"attrs",
"bidict",
"immutabledict",
"loopy>=2020.2",
Expand Down
Loading
Loading