gmpy icon indicating copy to clipboard operation
gmpy copied to clipboard

Prepare for 2.1.0 Beta releases

Open casevh opened this issue 6 years ago • 16 comments

I would like to complete the following before releasing 2.1.0b1:

  1. Support the new thread-local storage C-API that will be introduced with Python 3.7.
  2. Increase test coverage.
  3. Add --static=<> and --shared=<> options to simplify builds with unusual library locations.

I would like to complete the following before releasing 2.1.0b2:

  1. Add the new functions from MPFR 4 and MPC 1.1.0.
  2. Reduce/eliminate the use of module global variables. Maybe a module state structure can be passed around via gmpy2's context manager.
  3. For possible future use, create and expose xmpq, xmpfr, and xmpc via the C-API.

casevh avatar Jun 11 '18 04:06 casevh

Hi Case. Do you have a schedule for the 2.1.0b1 release ? If they are not almost done, do you need or welcome help on the three points you are listing ?

vinklein avatar Mar 07 '19 13:03 vinklein

I have completed the fixes for --static which is most important for my testing. I think that is sufficient for b1.

Test coverage is still poor. Any help would be appreciated. This is biggest issue for a production release and needs to dealt with for rc1. (And I am embarrassed by the lack of test coverage...)

I have added several of the new functions from MPFR and MPC. I would like to add classic three-value compare functions - cmp() and cmp_abs(). This would include the new mpc_cmp_abs() function. Since this would add new user-visible functions, it would be nice to get this in b1.

Support for new thread-local storage can what since the changes shouldn't be user visible.

I am working on issue #210. It will be done this weekend.

Issue #209 would be nice to get fixed for b2. It should be too difficult.

For the b1 release, I would like to focus on cmp(), cmp_abs(), and issue #209.

Any help would be greatly appreciated.

casevh avatar Mar 07 '19 17:03 casevh

Test coverage is still poor. Any help would be appreciated. This is biggest issue for a production release and needs to dealt with for rc1.

I am willing to help. What tool do you use to monitor test coverage ?

Issue #209 would be nice to get fixed for b2. It should be too difficult.

For the b1 release, I would like to focus on cmp(), cmp_abs(), and issue #209.

cmp(), cmp_abs(), and issue #209 for b1 or for b2 ?

vinklein avatar Mar 07 '19 17:03 vinklein

For test coverage, I am using gcov/lcov. I currently use setup-legacy.py instead of setup.py. There are comments in setup-legacy.py and a supporting shell script call show-cov.sh located in the scripts directory.

I used the following sequence of commands when I ran the tests recently.

py36 setup-legacy.py clean py36 setup-legacy.py build_ext --gcov --force install --force py36 test/runtests.py sh ./scripts/show-cov.sh

py36 is a link to a locally compiled and installed Python 3.6.

One problem is the extensive use of macros to call MPFR/MPC functions and create the various helper functions. For an example of the macros, see the definition of sin in gmpy2_math.c. I may be doing something wrong (likely), but I can seem to get any coverage information on the macros. I've thought about using cpp to expand all the macros but then testing becomes complex if we test the duplicated error handling code, etc. I've also thought of grouping all the uses of a complex macro into a single file, expanding the first occurrence to fully test error handling, and then just test that the remaining macros actually call the correct MPFR/MPC functions.

Any ideas on strategies for the testing would be great.

(And I will not be offended if you have a much better approach. I'm not a professional programmer...)

The additional functions can wait for b2. If there is better test coverage, I would be more comfortable in releasing b2 and then rc1 relatively quickly.

casevh avatar Mar 07 '19 21:03 casevh

I have done a first PR for test coverage. It improve line coverage from 57 to 65 % and function coverage from 43 to 55.7 %. I think it's more convenient to do this with several PR because it already add a lot of lines. If you prefer one PR for the coverage just tell me and don't merge PR #221 right now and i will update the branch with future update.

vinklein avatar Mar 13 '19 17:03 vinklein

Multiple smaller PR are fine. I will try to merge them quickly.

casevh avatar Mar 13 '19 17:03 casevh

I have completed issue #209. I'll tackle the three-valued compare operations next. Once those are done, I'll work on a b1 release. More tests are always welcome but I'll also focus on tests for b2.

casevh avatar Mar 19 '19 05:03 casevh

Hi Case ! What's is remaining for b1 release ? Is there something i can do for the "three-valued compare operations" ?

vinklein avatar Apr 03 '19 14:04 vinklein

I am almost finished with the cmp() and cmp_abs() functions. I should finish that in the next day or two. Then I will build and/or test binary wheels. (I've booted my Windows build VM and I'm applying all the patches....)

I'm hoping that I can complete it this weekend.

casevh avatar Apr 04 '19 05:04 casevh

I have cmp() and cmp_abs(). In addition to memory leaks found during testing cmp() and cmp_abs(), I've been finding other bugs while running tests using a debug build of Python 3.3. Working on those next.

casevh avatar Apr 07 '19 20:04 casevh

I tracked down all the reference counting leaks. Most of them were false alarms caused by doctest. If a test that triggers an exception is followed by a blank line, the reference count will continually increase. And creating the test classes for testing the conversion functions also caused the reference counts to increase. I move the test classes into a file called supportclasses.py and imported that file.

I'll work on the Windows binaries next.

casevh avatar Apr 08 '19 13:04 casevh

Do you have any schedule for the 2.1.0 release cycle? Some projects (such as pplpy andSageMath] depend on the current alpha version which is very unconfortable.

videlec avatar May 08 '19 10:05 videlec

I am updating the documentation and then I will make the release. I have a major project at work that should be winding down this weekend so I plan to release early next week.

On Wed, May 8, 2019 at 3:53 AM Vincent Delecroix [email protected] wrote:

Do you have any schedule for the 2.1.0 release cycle? Some projects (such as pplpy https://gitlab.com/videlec/pplpy/ andSageMath http://www.sagemath.org/] depend on the current alpha version which is very unconfortable.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aleaxit/gmpy/issues/199#issuecomment-490441252, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMR237CJSWCVTR7CPRVAADPUKWLBANCNFSM4FEIGSZA .

casevh avatar May 09 '19 15:05 casevh

I am working on the Windows builds. Unless I find any new issues, I should have a release out in a couple of days.

casevh avatar May 16 '19 05:05 casevh

I have published the beta 1 release. I am still working on Windows builds. I will release beta 2 with Windows binaries soon.

casevh avatar May 22 '19 04:05 casevh

I have released beta 3 with all the current bug fixes. (Don't ask about beta 2....)

casevh avatar Aug 26 '19 05:08 casevh