johnklee / fpu

Functional programming utility
MIT License
4 stars 4 forks source link

[Epic] I would like to build up a CI to ensure the quality of FPU #27

Open johnklee opened 1 year ago

johnklee commented 1 year ago

As title and study this article for details.

wkCircle commented 1 year ago

I found the topic very interesting. Actually, I have thought about the topic, and would like to suggest some ideas in mind. However, since there is a lot of work to do, so I list them below as suggestions and then @johnklee can decide which direction/functionality that we should add based on priority and avoiding overengineering.

Should we add the following to the CI workflow?

Do we also use "sphinx" to create simple documentation webpage for users, just like the webpage of numpy/pandas when we need to look up some functions/classes?

Thanks.

johnklee commented 1 year ago

Hi @wkCircle ,

First of all, thanks for your comment! All your suggests are all good ideas to proceed and move on. In this case, this issue will become an epic and there are many tasks derived from this canonical issue.

In my honest opinion, we could prioritize those tasks and start the independent, easy and small one. Also, some tasks may have already been covered such as lint and pytest. For example, you could check the lint quality by below command:

$ pip install -r requirements.txt
$ make lint
flake8 fpu
fpu/utils.py:1:1: F401 're' imported but unused
make: *** [Makefile:16: lint] Error 1

For unit test cases, you could use below command:

$ make test
pytest tests
================================================================= test session starts ==================================================================
platform linux -- Python 3.11.5, pytest-7.2.1, pluggy-1.0.0+repack
rootdir: /usr/local/google/home/johnkclee/Github/fpu
collected 38 items                                                                                                                                     

tests/unit/test_flist.py ...............                                                                                                         [ 39%]
tests/unit/test_fp.py .......................                                                                                                    [100%]

================================================================== 38 passed in 0.04s 

So they are of less hurry to take care of. So perhaps, mypy/pydantic to validate type hint is a good start to work on. Feel free to create issues for that and eventually, we want to build a CL to chain those things together. So when there is any commit or PR to be merged/push in, CI will automatically be triggered to guarantee the qualities of them.

All in all, I really appreciate your comment and advice, I think you may pick up the tasks you feel interested to kick off and if you need any feedback and discussion, feel free to reach/contact me. Thanks!

Ps: Regarding the CI, I have tried Travis and Jenkins. So it may be a good idea to create an issue to study the Pros & Cons of exist CIs. Then we could decide next step based on your research/study. FYI.