-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
provide a way to prune type trees #99
Comments
I did a quick experiment where I filtered the types included in the "sources" array here: https://github.com/OpenCyphal/pydsdl/blob/master/pydsdl/_namespace.py#L446 but only for the https://github.com/OpenCyphal/pydsdl/blob/master/pydsdl/_namespace.py#L152 Strangely, this did not return a transitive closure. While the target types were found not all of the types they used were included. |
This is a draft PR to review a proposed change to the public APIs for pydsdl. This is non-breaking change that adds an optional named tuple to the `read_namespace` method. This named tuple allows specifying a set of filtering rules to apply when discovering DSDL types from files under a given namespace filetree. The intent is to connect the proposed TypeFilterEngine to the `_construct_dsdl_definitions_from_namespace` method after it creates a `DSDLDefinition` to apply the initial filtering of the target type. From there I need to figure out how to mark that selected type and its transitive dependencies as either weakly-excluded or strongly-included and detect any conflict where user provided rules conflict as processing proceeds. Any advice as to where I could best work with a tree-representation ahead of any expensive processing would be appreciated.
This is a draft PR to review a proposed change to the public APIs for pydsdl. This is non-breaking change that adds an optional set of visitors allowing users to implement filters. This also allows for new visitor types to be defined in the future without further API changes.
This is a draft PR to review a proposed change to the public APIs for pydsdl. This is non-breaking change that adds an optional set of visitors allowing users to implement filters. This also allows for new visitor types to be defined in the future without further API changes.
This is a draft PR to review a proposed change to the public APIs for pydsdl. This is non-breaking change that adds a new public method and datatype ## New Method read_files - a file-oriented entry point to the front end. This takes a list of target DSDL files allowing the user to maintain an explicit list instead of depending on globular filesystem discovery. ## New Datatype DsdlFile – We define and publish a new abstract data type that encapsulates all the information collected about and from a given dsdl file. This allows a backend to associate datatypes with files for the purposes of managing dependencies (e.g. this would allow the creation of .d files by a back end).
This is a draft PR to review a proposed change to the public APIs for pydsdl. This is non-breaking change that adds a new public method and datatype read_files - a file-oriented entry point to the front end. This takes a list of target DSDL files allowing the user to maintain an explicit list instead of depending on globular filesystem discovery. DsdlFile – We define and publish a new abstract data type that encapsulates all the information collected about and from a given dsdl file. This allows a backend to associate datatypes with files for the purposes of managing dependencies (e.g. this would allow the creation of .d files by a back end).
Currently pydsdl simply discovers all dsdl types under a given root folder. For large projects this presents a problem where a significant number of types may exist under a root but a given consumer/producer only uses a small subset of them.
This issue is to provide a way to select target types which become leaf-nodes allowing all other branches to be pruned.
For example, adding a
target types: Optional[List[str]]
argument topydsdl.read_namespace
would provide the right interface to enable this in consumers like Nunavut.The text was updated successfully, but these errors were encountered: