Comments (3)
The commits over the past few days, addressing the improvement of the textual representation of our data structures (4349a30, 5bd551c, a0a9fb9, bb61697), type-annotated parsing (9b83455, e144146) and enabling more succinct test cases (4487c79, b75f9f1, 994d31a) all had as goal to create order in the chaos.
The next step is to move errors to the modules that are relevant to them.
Also, instead of clumsily annotating the expressions in which type errors occur, we can wrap a type error in an expression error. We can still test which type error is raised by inspecting the __cause__
attribute set when you use raise from
(see https://stackoverflow.com/questions/24752395/python-raise-from-usage). For unittest
ing, we can write an assertRaisesChain
that wraps assertRaises
used as a context manager (see https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRaises).
This approach also allows us to raise another wrapped error for errors that occur during the primitive expansion of an expression containing a composite operator.
from transforge.
More thoughts:
- Every relevant class (
Operator
,TypeSchema
) gets a method simply calledvalidate()
that gives explicit guarantees as to what assertions the user may make if it completes without error. - There should be a
WorkflowError
exception that tells you on which attachment of input and output an error occurred. visual_test
files should be present that aren't for unit testing but just for checking how the errors look when they are raised.
from transforge.
Current issue can be closed with 1e232ab. visual_test
files aren't made yet but that's an idea for later.
from transforge.
Related Issues (20)
- The top type isn't usable as a function HOT 1
- Library name change
- Crossing graph boundaries & leaving a supertype trail
- Combination of `with_noncanonical_types`, type recursivity and wildcard causes issues HOT 1
- Add an `--expression` argument to CLI HOT 1
- Define transformation algebra outside of Python
- Union types (explicit overloading)
- Could not satisfy subtype `Top` <= `Top`
- Could not satisfy subtype `Top` <= `Nom`. HOT 2
- Canonical types don't propagate to parameters
- Source reuse may cause type mismatches HOT 5
- Include type aliases in taxonomy
- Allow supertypes of parameterized types
- Disentangle interactions between type variables and subtypes
- Optimizations
- Add .concretize() method
- Separation of top and bottom types
- Dedicated errors
- Only include subtypes in canon
- Associate transformation nodes with tool application nodes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transforge.