flint icon indicating copy to clipboard operation
flint copied to clipboard

making argument names in non inline functions to match documentation

Open edgarcosta opened this issue 1 year ago • 5 comments

this time I was more carefully with my code and looked carefully at the diff

edgarcosta avatar Mar 25 '24 20:03 edgarcosta

Looks good! I found some minor things that we may want to change in the documentation (like padic_mat.h changed a context variable from ctx to p), but nothing major.

Are the scripts you used available for future use?

albinahlback avatar Mar 25 '24 22:03 albinahlback

I am still working on them, I have sent you a DM on zulip with a work in progress notebook.

I think the way I generated, these changes is not very stable at the moment but could be redone, as I basically generated the file, ran it, and checked I only changed names of variables afterward.

In the previous failed PR for example, I inadvertly replaced the qualifiers, which messed up everything, due to:

# git grep fmpq_equal_fmpz
doc/source/fmpq.rst:              int fmpq_equal_fmpz(const fmpq_t x, const fmpz_t y)
src/fmpq.h:int fmpq_equal_fmpz(fmpq_t q, fmpz_t n);
src/fmpq/inlines.c:int fmpq_equal_fmpz(fmpq_t q, fmpz_t n)

edgarcosta avatar Mar 26 '24 22:03 edgarcosta

Sorry, I forgot if we spoke about this on the workshop, but is it possible to generate a CI that checks this every time (so that we do not have regressions here)?

albinahlback avatar Mar 27 '24 11:03 albinahlback

Yes, I want to have a CI that checks we don't reverse back, but it will be quite risky to have a CI that tries to fix things on the fly. To have that CI in place, I still need to fix the inline statements. Those are a bit harder, as I will need to replace the variable in the function, and I didn't get the the time to get it working

edgarcosta avatar Mar 29 '24 21:03 edgarcosta

In case I get run over by a bus:

https://gist.github.com/edgarcosta/888fcf83565871afd635f641341cc14e

edgarcosta avatar Jun 28 '24 18:06 edgarcosta