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

Improve documentation to prepare for 0.3 release #315

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

konstin
Copy link
Member

@konstin konstin commented Jan 27, 2025

While updating the guide, i went through the referenced code and updated their docs.

An outstanding issue are the associated types on DependencyProvider, their naming is consistent (P vs Priority, M has no long form, Err is in the middle).

Part of #308

@konstin konstin requested a review from Eh2406 January 27, 2025 15:15
@konstin konstin mentioned this pull request Jan 23, 2025
8 tasks
src/report.rs Outdated
/// and refer to the explanation for the other times.
/// Indicate if the incompatibility is present multiple times in the derivation tree.
///
/// If that is the case, the number is a unique id. We may want to only explain this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we consistent in our documentation about whether "we" means the maintainers of pubgrub or the users?

/// Two version sets that contain the same versions must be equal.
///
/// The methods with default implementations can be overwritten for better performance, but they
/// must be equal to the default implementation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me two readings to figure out what was meant by the sentence.
Perhaps "equivalent" or "functionally equivalent" instead of "equal".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I remember, equality was needed because version set comparisons serves as building blocks to check if sets are subsets of others in parts of the pubgrub algorithm. And as I remember it too, we have some text describing this already in some our default implementation of this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done another pass over the version set contract

@Eh2406 Eh2406 requested a review from mpizenberg January 28, 2025 20:18
@Eh2406
Copy link
Member

Eh2406 commented Jan 28, 2025

These look like good improvements to me.

@konstin konstin force-pushed the konsti/dev/prepare-0.3 branch from c520325 to e19f767 Compare January 29, 2025 17:13
@Eh2406
Copy link
Member

Eh2406 commented Jan 29, 2025

I am +1 on this; @mpizenberg can merge when he is happy with it.

@Eh2406
Copy link
Member

Eh2406 commented Jan 29, 2025

/// stored in a canonical representations. Such problems may arise if your implementations of
/// `complement()` and `intersection()` do not return canonical representations.
///
/// For example, `>=1,<4 || >=2,<5` and `>=1,<4 || >=3,<5` are equal, because they can both be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps explicitly call out that this example is for integers.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about them in the context of PEP 440 and semver, are there cases when this doesn't hold?

@@ -71,6 +79,7 @@ pub trait VersionSet: Debug + Display + Clone + Eq {
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small grammar things on these two.

Whether these ranges have no overlapping segments.

and

Whether all elements contained in self are contained in other.

@Eh2406
Copy link
Member

Eh2406 commented Jan 29, 2025

I have read through all the docs for this library. Except for the few things I commented on, they're in good shape for a 0.3. Next to read the guide.

Copy link
Member

@mpizenberg mpizenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good on my side too

@mpizenberg mpizenberg added this pull request to the merge queue Jan 30, 2025
@mpizenberg
Copy link
Member

The other fixes can be done in a subsequent PR. I’m sure there will be multiple docs PRs anyway once 0.3 is released and people start reading through it more thoroughly

Merged via the queue into dev with commit c474a52 Jan 30, 2025
7 checks passed
@mpizenberg mpizenberg deleted the konsti/dev/prepare-0.3 branch January 30, 2025 08:57
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.

3 participants