Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #71 from Quansight-Labs/fix-docs
Browse files Browse the repository at this point in the history
Fix docs
  • Loading branch information
saulshanabrook committed Jul 11, 2019
2 parents 871ae68 + 30d400c commit b963910
Show file tree
Hide file tree
Showing 28 changed files with 86 additions and 58 deletions.
1 change: 1 addition & 0 deletions binder/apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
graphviz
1 change: 1 addition & 0 deletions core.pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ author-email = "s.shanabrook@gmail.com"
home-page = "https://github.com/Quansight-Labs/metadsl"
requires = [
"metadsl",
"numpy"
]
requires-python = ">=3.7"
classifiers = [
Expand Down
4 changes: 0 additions & 4 deletions docs/api/conversion.rst

This file was deleted.

12 changes: 3 additions & 9 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
API
===

.. automodule:: metadsl

.. toctree::
:maxdepth: 3
:maxdepth: 4

expressions
rules
matching
python/index
numpy/index
.. wraps
conversion
metadsl/index
metadsl_core/index

File renamed without changes.
13 changes: 13 additions & 0 deletions docs/api/metadsl/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
metadsl
=======

.. automodule:: metadsl

.. toctree::
:maxdepth: 3

expressions
rules
matching


File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions docs/api/metadsl_core/abstraction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.abstraction
========================

.. automodule:: metadsl_core.abstraction
4 changes: 4 additions & 0 deletions docs/api/metadsl_core/boolean.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.boolean
========================

.. automodule:: metadsl_core.boolean
4 changes: 4 additions & 0 deletions docs/api/metadsl_core/conversion.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.conversion
========================

.. automodule:: metadsl_core.conversion
4 changes: 4 additions & 0 deletions docs/api/metadsl_core/either.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.either
========================

.. automodule:: metadsl_core.either
21 changes: 21 additions & 0 deletions docs/api/metadsl_core/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
metadsl_core
============

.. automodule:: metadsl_core

.. toctree::
:maxdepth: 3

abstraction
boolean
conversion
either
integer
maybe
numpy_engine
numpy
pair
vec



4 changes: 4 additions & 0 deletions docs/api/metadsl_core/integer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.integer
========================

.. automodule:: metadsl_core.integer
4 changes: 4 additions & 0 deletions docs/api/metadsl_core/maybe.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.maybe
========================

.. automodule:: metadsl_core.maybe
4 changes: 4 additions & 0 deletions docs/api/metadsl_core/numpy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.numpy
========================

.. automodule:: metadsl_core.numpy
4 changes: 4 additions & 0 deletions docs/api/metadsl_core/numpy_engine.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.numpy_engine
========================

.. automodule:: metadsl_core.numpy_engine
4 changes: 4 additions & 0 deletions docs/api/metadsl_core/pair.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.pair
========================

.. automodule:: metadsl_core.pair
4 changes: 4 additions & 0 deletions docs/api/metadsl_core/vec.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadsl_core.vec
========================

.. automodule:: metadsl_core.vec
4 changes: 0 additions & 4 deletions docs/api/numpy/expressions.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/numpy/index.rst

This file was deleted.

4 changes: 0 additions & 4 deletions docs/api/numpy/wraps.rst

This file was deleted.

4 changes: 0 additions & 4 deletions docs/api/python/expressions.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/python/index.rst

This file was deleted.

4 changes: 0 additions & 4 deletions docs/api/python/wraps.rst

This file was deleted.

4 changes: 0 additions & 4 deletions docs/api/wraps.rst

This file was deleted.

4 changes: 2 additions & 2 deletions metadsl/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class Expression(GenericCheck):
Calling the function, after replacing the typevars in it (if it is a bound method),
with the args and kwargs should resualt in an equivalent expression:
replace_fn_typevars(self.function, self.typevars)(*self.args, **self.kwargs) == self
replace_fn_typevars(self.function, self.typevars)(*self.args, **self.kwargs) == self
The return type of the function, inferred by replacing the typevars in and with these args and kwargs,
should match the type of the expression. If the return type of the function is not subclass of expression,
Expand Down
6 changes: 5 additions & 1 deletion metadsl/typing_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ def generic_getattr(self, attr):
"""
if "__origin__" in self.__dict__ and attr not in ("__wrapped__"):
# If the attribute is a descriptor, pass in the generic class
property = self.__origin__.__getattribute__(self.__origin__, attr)
try:
property = self.__origin__.__getattribute__(self.__origin__, attr)
except:
return

if hasattr(property, "__get__"):
return property.__get__(None, self)
# Otherwise, just resolve it normally
Expand Down

0 comments on commit b963910

Please sign in to comment.