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

Reference the source reasoning for each scenario #174

Open
notatallshaw opened this issue Apr 14, 2024 · 7 comments
Open

Reference the source reasoning for each scenario #174

notatallshaw opened this issue Apr 14, 2024 · 7 comments

Comments

@notatallshaw
Copy link

At the moment it's difficult to validate whether a specific scenario is following the spec or not because it's not referencing it. My idea would be that either in the existing field "explanation", or a new list field that would look something like "sources": [{"url": "...", "direct": true, "notes": "..."}, ...] the source(s) of the scenario can be referenced.

My idea is that:

  1. Sources should primarily come from the spec, but in some cases the reasoning may be different, e.g. a comment clarifying the spec on a discussion thread, or copying pip's behavior, etc.
  2. "direct": true, would mean the source(s) directly informs the scenario, false would mean this scenario is implied by the source(s) but isn't directly stated, this would apply to almost all cases which involve conflict resolution, as the spec does not cover this directly

This would probably be a lot of work to go back and update every scenario, but if it could be required for new scenarios that it could be slowly fixed over time.

Just a thought anyway, happy to slowly work on it if accepted.

@zanieb
Copy link
Member

zanieb commented Apr 14, 2024

I'm down to include a reference to the specification in the explanation. Do you need it to be parsable as separate components for some reason or can we just do better about talking about the specification there?

I would be interested in separating the strictly-spec compliant scenarios from the other ones with a directory structure rather than adding more complexity to the schema e.g. scenarios/direct/..., scenarios/indirect/.... I don't really love the direct/indirect names I wonder if we can find something that clearly captures what we mean.

Maybe we should consider directories for each specification e.g. scenarios/pepXXX/...?

@zanieb
Copy link
Member

zanieb commented Apr 14, 2024

As prompted in #160 maybe we do need something more advanced in the schema like...

expected can become a list (maybe with a compliant flag?) and we can have explanations saying why a different outcome would occur e.g. "uv does blah blah blah".

@notatallshaw
Copy link
Author

Do you need it to be parsable as separate components for some reason or can we just do better about talking about the specification there?

Nope, just spitballing ideas.

It's more when reading through this I want to be able to double check why a specific scenario exists, there's a lot of spec and a lot of scenarios, and I can't always keep it in my head.

@zanieb
Copy link
Member

zanieb commented Apr 15, 2024

Makes sense. I'm hesitant to add it to the schema just to keep things simple for now, but I would definitely appreciate adding references in the expected explanation and/or description as appropriate.

@BurntSushi
Copy link
Member

I think we might want even more categories as well. We're also working on multi-platform locking at Astral, and that is going to probably want its own set of distinct scenarios.

I don't yet have a ton of insight here, but my inclination would also be to add some more structure to the scenarios directory. I don't think I have a use case yet for making any schema changes.

@notatallshaw
Copy link
Author

I don't yet have a ton of insight here, but my inclination would also be to add some more structure to the scenarios directory. I don't think I have a use case yet for making any schema changes.

FYI, that is discussed in #173, I'm certainly all for it!

@zanieb
Copy link
Member

zanieb commented Apr 16, 2024

Yeah I think we should consider scenarios/spec/pepXXX.json for the core scenarios and have separate top-level files (or directories if complex) for everything else.

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

No branches or pull requests

3 participants