Skip to content
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

Implement a "multi layer" contract #162

Closed

Conversation

flaeppe
Copy link
Contributor

@flaeppe flaeppe commented Feb 23, 2023

A form of hybrid contract between 'layers' and 'independence'. Where modules declared on the same level are independent from each other while they individually honor their "lower layers".

(Hopefully) Fixes #157


This is just a port of a contract I created for one of our projects quite a while ago. I tried to hook it up in to the test suite a bit. I can barely recall the approach taken in here. But could refresh my mind if the contract is of interest.

Feel free to do what you want with it, if only for inspiration. I didn't bother resolving any type checking or other CI fixes until it would be of interest to merge.

A form of hybrid contract between 'layers' and 'independence'. Where
modules declared on the same level are independent from each other while
they individually honor their "lower layers".
@flaeppe
Copy link
Contributor Author

flaeppe commented Feb 23, 2023

Oh, and it should pass on tox -e py10. At least it did for me locally

@seddonym
Copy link
Owner

Thanks so much for this, very cool!

I'll have a close look when I come to implement independence within layers. I don't think I'll merge it in its form as a distinct contract type as I think it should be wrapped up within the existing contract type. So I'm going to close it, but it's helpful as a reference point.

@seddonym seddonym closed this Feb 27, 2023
@flaeppe
Copy link
Contributor Author

flaeppe commented Feb 28, 2023

Cool, I'd agree with you combining it with some existing contract type. It feels like it could be a natural extension to layers, if you'd ask me.

@flaeppe flaeppe deleted the feature/multi-layer-contract branch February 28, 2023 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it possible to express independence within a layers contract
2 participants