-
Notifications
You must be signed in to change notification settings - Fork 470
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
Question: testing workflow for pint #990
Comments
For testing the modified library should I follow the methods in the guide here? |
I am finding this answer on |
@hgrecco, would you agree that testing guidelines from numpy also apply to pint? Sorry for the beginners question, but I have no idea of what I am doing ... some reference would be gold. |
Hi, I am not sure where your troubles come from. The steps are:
If you want to test different Python or numpy versions or combinations locally, I suggest to use tox (or nox). pint has no config file for tox or nox at the moment. To see what is tested routinely look at |
I think @dalito provides a great summary. Just one more thing, the numpy guide is great but is intended for a mucha larger project. Therefore, some things like testing only parts, might be an overkill. |
Thank you for your input and your patience: I am new to contributing to an open-source projects and wanted to understand the proper way to proceed, rather than submit half-made work. As for the point I raised about discourse, it seems you guys are fine with using Github issues for Q&A and label them with question. Is that a fair assessment? |
@5igno, asking such questions here is fine from my point of view. Given the low volume, I think using Git issues is sufficient for pint at the moment. |
I agree with @dalito on this. |
OK, i will modify the question accordingly. |
And as I said, feel free to ask any question on the tracker. I am proud and happy to say that the community is very welcoming and helpful |
Alright... so I am back to trying submitting a simple PR. I followed the workflow of @dalito but, when running pytest, I get reported of the existance of one error and many warnings, that is without having modified the code in the development branch.
Should I neglect the warnings of pytest? |
About the warnings you can skip them in your case, those are deprecation warnings that we need to address. |
1116: Harmonize most doctests with Pint's current behavior r=hgrecco a=clarkgwillison - [ ] Closes # (no single issue) - [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors - [x] The change is fully covered by automated unit tests - [x] Documented in docs/ as appropriate - [x] Added an entry to the CHANGES file This PR partially addresses #947, #972, and #990 After merging, the number of failing doctests in the Sphinx documentation should go from 92 (as mentioned in #947) down to 3: ``` Doctest summary =============== 335 tests 3 failures in tests 0 failures in setup code 0 failures in cleanup code build finished with problems. make: *** [doctest] Error 1 ``` Which will put us well in reach of enabling doctests in Travis to prevent documentation regressions in the future. Most tests were fixed in this PR by deferring to the current behavior of Pint, however `Quantity.__repr__()` was modified to round floating point magnitudes to 9 digits to avoid several test failures that were being caused by floating point ambiguities. Issue #1115 was opened to track the 3 tests that I could not easily resolve. Once that issue is resolved, we can enable doctests in Travis without breaking CI. Co-authored-by: Clark Willison <clarkgwillison@gmail.com>
Hi,
I am a happy user of pint and cannot thank you enough for making it available as OSS.
I like the way it makes unit conversion and dimensional analysis effortless, all in a small package.
Brilliant :)
To be more accurate, I am a physicist working in optics and electrical engineering. As many users in this circle, I have growing need for logarithmic units as dB, decade, octave, etc.
As the support for these units is missing, I am trying to implement Logarithmic unit conversion myself (see the commits on my fork of pint), but I didn't understand well enough how to test pint as required by your guidelines.
Could you comment on the process you use to test pint?
The text was updated successfully, but these errors were encountered: