Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Turning stand-alone 'before_after_filesystem_snapshot' into a feature. #48

Open
IshaVDave opened this issue Aug 6, 2020 · 4 comments
Open

Comments

@IshaVDave
Copy link
Contributor

PR #46 's 'before_after_filesystem_snapshot' is functional, yet it isn't directly useful to the layout-web-tool yet. There are some tasks necessary to turn it into a feature of the layout-web-tool, such as the ability to read in link metadata, generate match rules that span multiple links, etc.

@SolidifiedRay
Copy link
Contributor

Here are some ideas to enhance layout creation:

The create_layout module only generate MATCH, ALLOW, and DISALLOW rules. With the new function in before_after_file_system_snapshot, we can now generate DELETE, CREATE, and MODIFY rules.

To read in link metadata, we may need to add a new function to change the ordered links list in download_layout into a format that before_after_file_system_snapshot module can read. Then we can generate rules that span multiple links.

The layout creation is now performed partially in the download_layout view, in the create_layout module, and in the before_after_file_system_snapshot module. I think we should move everything into the create_layout module. For example, we can move all the functions from before_after_file_system_snapshot to create_layout. In the download_layout view, we can utilize _get_session_subdocument to pass all needed data to create_layout module, and create_layout module will return a completed layout. (Right now, the create_layout module only return a basic layout with material and product rules)

@lukpueh
Copy link
Member

lukpueh commented Aug 11, 2020

Thanks for putting everything into perspective, @SolidifiedRay! I agree that create_layout.py and before_after_file_system_snapshot.py could be one module. I also think that the interface of such a module should accept an ordered list of link objects, to then generate a basic layout with steps and artifact rules for each step.

Note that such a module could become part of the reference implementation or a stand-alone tool, so we should de-couple it from any data structures particular to the layout web tool.

But before we decide on the exact interface and module architecture I'd like you to experiment some more with rule generation, i.e. is how to generate material match rules that match the products of a preceding step.

@SolidifiedRay
Copy link
Contributor

As a follow-up, I will work on the MATCH rule generation first.

I will try to move the before_after_file_system_snapshot.py function to create_layout.py and pass an order linked list as the input of the module. For the MATCH rule generation function, I will try to implement a simple function first, and then find up how to optimize it.

@IshaVDave
Copy link
Contributor Author

Although I'm going to be MIA till 7/31/20, let me know if you want to brainstorm again in this duration @SolidifiedRay :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants