Clippy pendantic linting#3
Conversation
|
Hi @dahlend, I was on vacation for the last two weeks and I missed this message.
Yes, sure.
Yes, please, change back (using Thank you very much for sharing your expertise and contribution. |
|
Hi @dahlend, This crate is used in aladin lite, a web tool to display FITS images on top of HiPS large-scale surveys, something like an openstreetmap of the sky. It would be very beneficial for it to support correctly SIP and TPV as well, so I am very glad if you want to contribute on these. Thank you very much for this |
|
Thanks for getting back to me! I will clean this up a bit and mark it as ready for review. Not in this PR, but I believe I have SIP working (number of minor bugs and got inversion working reliably). Still working on TPV, unfortunately it adds a lot of new parameters (40 per axis)... |
|
Hi! I switch this back to 2 spaces, the original changes still stay: Adds Debug, Clone, and Copy to all structs where possible. After this I have completed a fully tested SIP and TPV implementations, along with adding the missing projections. I will need to break those up into a series of pull requests across at least 2 repositories. Getting the inversions right for SIP and TPV took time, I match wcslib to essentially numerical precision in all of my tests. |
bmatthieu3
left a comment
There was a problem hiding this comment.
Hi @dahlend
Many thanks for these changes. I think I do not have so much to say about it, these are great.
Would you mind to add your changes in the CHANGELOG.md ? especially to keep track of the must_use change which I have seen can break code for crates using deny(warnings)
bmatthieu3
left a comment
There was a problem hiding this comment.
Hi @dahlend, it is been a long time since you made the PR. We would like to merge it as soon as possible. We have only 3 things that we would like to investigate more and we are not ready to merge it for now. Those are:
- the must_use decorator everywhere
- the linting rules in cargo.toml
Please also add an entry to the changelog.md with your changes
Appart from that this PR can be merged. Thank you very much.
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
|
||
| [dependencies] | ||
|
|
There was a problem hiding this comment.
Can you remove that ? We prefer to not have it for the moment because we will take some time to know more about linting rules that we want (or not).
|
|
||
| // default theta1 = theta2 = 45 deg | ||
| /// Default theta1 = theta2 = 45 deg | ||
| #[must_use] |
There was a problem hiding this comment.
Could you remove all these must_use decorator ? In many cases I would not say not using the result would automatically lead to a bug. Also, lots of CI define warnings as errors (RUSTFLAGS="-D warnings" cargo build) and this may break the CI whereas no particular bug is really there (e.g. a call that is not necessary that is why its result is not used).
Hi there!
Thanks for the crate!
I was looking at using some of your crates for dealing with FITs files for a project, but there is some missing support for a few map projections.
I write orbit propagation code to identify asteroids/comets in images, see:
https://github.com/dahlend/kete
I wanted to see if you were open to me providing some pull requests which would add tests for SIP, and add TPV?
I know this pull request looks scary, but its not! It doesn't change any math or the API. I know it looks enormous, but is mostly just applying clippy pendantic settings to this crate. If you dont like it I am happy to switch back, this is mostly just me reaching out to see how open you were to new pull requests.
See: https://doc.rust-lang.org/clippy/
Changes:
Debug,Clone, andCopyto all structs where possible.#[must_use]to all functions which return values..gitignorelintsettings along with rust clippy settings.HALF_PItof64::FRAC_PI_2