microsoft / python-in-excel

Python in Microsoft Excel
MIT License
517 stars 34 forks source link

Support quality assurance of Python code #10

Open LeoHuckvale opened 1 year ago

LeoHuckvale commented 1 year ago

Really excited about being able to run Python code directly in Excel!

However, as a best-practice enthusiast, the first questions that come to my mind are:

jflam commented 1 year ago

To be honest, we haven't discussed either of these issues in our design meetings yet. Not for lack of wanting to do something here; there are many possible ways that we can do the things that you suggest.

If you have any ideas on either of these, please do share!

LeoHuckvale commented 1 year ago

Thanks for the positive engagement, @jflam !

As far as code linting goes, one could have a separate container which lints code in cells on edit, and flags the cell in the same way Excel does if there's a formula error. You could have a general config for this according to generally accepted norms like PEP8 etc. but eventually you'd want to be able to customise the configuration according to organisational needs.

Not sure how unit tests could work. That's probably a question to address in line with #7 where you have more modular code.

jflam commented 1 year ago

Thanks for the suggestion. We definitely want to improve the code editing experience in the future and being able to use existing off the shelf tooling, e.g., Black is on our radar.