sotopia icon indicating copy to clipboard operation
sotopia copied to clipboard

[FEAT]: mypy workflow testing speech can be optimized

Open lwaekfjlk opened this issue 1 year ago • 1 comments

Description

Do we need to install --all-extras for mypy testing? I think it would take a lot of time. Only typing-related packages are required.

Additional Information

No response

lwaekfjlk avatar May 22 '24 18:05 lwaekfjlk

Feel free to open a PR that removes --all-extra

ProKil avatar May 23 '24 18:05 ProKil

Fixed in #80

ProKil avatar May 26 '24 01:05 ProKil

nice! Just saw the comment.

lwaekfjlk avatar May 26 '24 01:05 lwaekfjlk

@ProKil do you have any other suggestions on saving CI time with workflow. I faced a exceeding limit of 2000 min when running another codebase.

lwaekfjlk avatar May 26 '24 01:05 lwaekfjlk

One way is to limit CI to PRs. We could change mypy to pyright to save time, but I have not tested that yet.

ProKil avatar May 26 '24 02:05 ProKil

thanks. good to hear.

lwaekfjlk avatar May 26 '24 02:05 lwaekfjlk

There are several things that we could optimize including using a docker that has mypy and other tools pre-installed, and use local cache. You can also use self-hosted test runners and another tip I just found is that you can easily test run your commit before pushing using this https://github.com/nektos/act?tab=readme-ov-file. Maybe we should add this tip to the contribution guide.

ProKil avatar May 26 '24 15:05 ProKil

sounds good. Good to know all of these. I am trying to update my project-template to optimize its CI time.

lwaekfjlk avatar May 26 '24 18:05 lwaekfjlk

@ProKil I personally find that act is kind of not so easy to use? Should we add this into the contribution guide?

lwaekfjlk avatar Jun 18 '24 04:06 lwaekfjlk

Already improved in https://github.com/sotopia-lab/sotopia/blob/7de34af7b52aadf85c5c4302e660f745032caff8/.github/workflows/mypy.yml#L7-L17

ProKil avatar Jun 19 '24 18:06 ProKil

@ProKil I personally find that act is kind of not so easy to use? Should we add this into the contribution guide?

Does "act" mean "agent.act"?

ProKil avatar Jun 19 '24 18:06 ProKil