Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pygments for tests session #336

Closed
cjolowicz opened this issue May 25, 2020 · 3 comments · Fixed by #460
Closed

Add pygments for tests session #336

cjolowicz opened this issue May 25, 2020 · 3 comments · Fixed by #460
Labels
enhancement New feature or request
Milestone

Comments

@cjolowicz
Copy link
Owner

cjolowicz commented May 25, 2020

pytest provides useful colored backtraces when pygments can be imported.

Need to decide if this should be in the template, or if it's better aligned with the project goal of simplicity and minimalism to omit this dependency, and leave it to the user.

@cjolowicz cjolowicz added the enhancement New feature or request label May 25, 2020
@staticdev
Copy link
Contributor

I found that useful specially locally. I think the dev-dependencies complexity is increased but the developer life is also simplified when there is an error on their unit tests =p

There is also a marginal increase in CI test session (but pygments don't have other dependecies). Do you think it is possible to cache installed dependencies on Github Actions to reduce test time? My macos test sessions are always the last one to finish (from all sessions).

@cjolowicz
Copy link
Owner Author

cjolowicz commented Jun 24, 2020

I found that useful specially locally. I think the dev-dependencies complexity is increased but the developer life is also simplified when there is an error on their unit tests =p

No question about it being useful. I'm still not sure about including it in the template, though. It's not an essential feature, and simple for users to add in their own projects. How much bells and whistles do we want in the template?

There is also a marginal increase in CI test session (but pygments don't have other dependecies). Do you think it is possible to cache installed dependencies on Github Actions to reduce test time? My macos test sessions are always the last one to finish (from all sessions).

Yes. Last I looked it didn't make a lot of difference to us. But it seems a good idea anyway to promote caching pip dependencies, as it takes load off PyPI, and it may make a difference to some projects. This used to be very verbose, but recently pip has gained pip cache dir. I think I also heard about a GH action for this (not sure). So feel free to open a separate issue and/or a pull request.

See https://github.com/actions/cache/blob/master/examples.md#using-pip-to-get-cache-location

@staticdev
Copy link
Contributor

staticdev commented Jun 24, 2020

I think a way of helping you decide is shifting a bit the discussion from minimalism x adding bells and whistles.

Usually, when I create templates for my team, the question I ask myself is: do I always want this feature in my projects? Or there is simpler projects that I wouldn't want that? If the answer to the first question is yes (and second is no), I would absolutely add this to the project, since it saves people time from adding it by hand.

About pip cache, issue created #406

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants