René's URL Explorer Experiment


Title: Configure tox by EliahKagan · Pull Request #1667 · gitpython-developers/GitPython · GitHub

Open Graph Title: Configure tox by EliahKagan · Pull Request #1667 · gitpython-developers/GitPython

X Title: Configure tox by EliahKagan · Pull Request #1667 · gitpython-developers/GitPython

Description: This adds a tox.ini file so that tox can be run locally to test on 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12, or whichever of them are available, and also run the lint, formatting, and style checks. Because CI also tests building the documentation, and it is convenient to be able to use tox to check all the things CI checks (albeit on just one's local platform), I have added a tox environment for that too. But because it actually writes to the build directory, I have not listed it in env_list at the top, so it doesn't run automatically--it can still be run with tox -e html. That could be improved in the future, but I think reasonable ways of doing so would involve modifying doc/Makefile to make it more configurable, and that seems outside the proper scope of this PR. This PR does not use tox on CI. It is possible to use tox to drive tests on CI, such as with the tox-gh-actions plugin, but this does not do that, because: I feel it would be outside the scope of this PR, because the benefit of tox for this project is not primarily for what it brings to CI nor even for making local and CI based testing more consistent. If it is to be done, I think it may be better to do it after native Windows tests are added, which may have bearing on how (and maybe even if) it should be done. Most importantly, migrating from a more traditional GitHub Actions workflow for testing to a tox workflow will sometimes make results harder to read, because they are no longer divided into top-level steps belonging to the test job and clearly shown as separate. This doesn't mean it shouldn't be done, and either manual customization or alternatives to tox-gh-actions such as tox-gh-matrix might help. In my view, the biggest gains from using tox on CI are for when the tox environments are more granular than the CI jobs. This happens in projects that need to parameterize their test runs not just on OS and Python version but also on dependency versions (while avoiding the proliferation of separate CI jobs), which I don't think is applicable here. So while I suspect it may eventually be a good idea to use tox on CI, I don't think it should be done until it is clearly no worse than the current approach and other readily available approaches. My intention is also not for tox to replace other ways of running tests when developing locally. During routine development, tox may be too slow or its output too complicated, for regularly checking the status of some or all tests. Furthermore, pre-commit seems to be working great for the lint checks--and the lint tox environment I configured uses it, to as to pick up any new or changed linting tools automatically. (Also, not everyone likes tox.) For these reasons, I have not modified the readme to replace anything with tox-based instructions. However, the readme could be modified to also talk about tox. I am not sure if that should be done either, because the users most interested in using tox are those already familiar with it, and they will notice the tox.ini. Furthermore, I think it may be best to see how it works out (for example, should it really have the environment for testing that we can build docs by actually building them?) before adding it to the readme or other project documentation. However, if you'd like tox instructions, or a mention of it, etc., added the readme, I'd be pleased to add it (as well as to make other requested changes). Some other considerations: The one problem I encountered initially in using tox to run tests was being prompted to enter my passphrase for some tests. Because that completely breaks the useful automation tox provides, I allowed tox to pass environment variables whose names start with SSH_ through to its test environments. It would probably be sufficient to pass through SSH_AGENT_PID and SSH_AUTH_SOCK; I'd be pleased to change it to just that, if requested. (If other forms of authentication than SSH that I'm not using rely on environment variables being set, then that might still be broken.) Because the version of Python being tested on CI for Cygwin is 3.9, which is also the latest version available through the Cygwin package manager, the tox environments for everything other than the tests are specified as 3.9, to support Cygwin and to allow results to be compared between Cygwin and other platforms. Also, because Cygwin doesn't have 3.10, 3.11, or 3.12, I have not specified skip_missing_interpreters = true, leaving it to the default of false. Nonetheless, I do not claim tox behaves perfectly on Cygwin in this configuration. I sometimes have problems where it tries to use Python interpreters from my native system before eventually finding something it can really use. I've removed tox from requirements-dev.txt, and not added it to test-requirements.txt since it should rarely be installed together with other project dependencies in the same environment. It's possible to install tox in a virtual environment that one is using for the project, but this is not typically done, because tox creates its own environments. It's best to install tox with pipx when possible. Furthermore, if any version of tox is available, and that version is lower than the version specified in tox.ini, then tox will bootstrap a virtual environment and install a newer version of itself in it. Of course, one can still run pip install tox in a virtual environment (or the global environment) if one wishes to get tox that way. I considered putting the tox configuration in pyproject.toml to avoid adding yet another top-level file. But I decided against it. It forgoes the discoverability benefits noted above in my reasoning about why I haven't mentioned tox in the readme. Also, it has to be given as one giant string, and editors (and GitHub) don't currently special-case that with useful syntax highlighting.

Open Graph Description: This adds a tox.ini file so that tox can be run locally to test on 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12, or whichever of them are available, and also run the lint, formatting, and style checks. Beca...

X Description: This adds a tox.ini file so that tox can be run locally to test on 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12, or whichever of them are available, and also run the lint, formatting, and style checks. Beca...

Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1667

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/checks(.:format)
route-controllerpull_requests
route-actionchecks
fetch-noncev2:1555c2e6-58b1-c845-380f-eb3cf06ab4c3
current-catalog-service-hash87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a
request-idB156:1C02DC:11BCFAE:1918428:69691638
html-safe-nonce3271beefb3b8764d49c7087c82b6751cf5c61a91f918bd78db9c930ec9b90e03
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTU2OjFDMDJEQzoxMUJDRkFFOjE5MTg0Mjg6Njk2OTE2MzgiLCJ2aXNpdG9yX2lkIjoiMjI5MTk1NzY1NjU5MjEyNzU0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac58459441bc2014ff1bc37342dc7f2cd79314002c9bd9b201b6e736c22ca96ba9
hovercard-subject-tagpull_request:1520647561
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/checks
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/1667/checks
twitter:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
og:image:altThis adds a tox.ini file so that tox can be run locally to test on 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12, or whichever of them are available, and also run the lint, formatting, and style checks. Beca...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneafd5814870f8609d217a32dd3bccc05a5df5f5699df4d458c242e80fdfddcc2e
turbo-cache-controlno-preview
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
turbo-body-classeslogged-out env-production page-responsive full-width full-width-p-0
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release572e69339f2401a569f15071214cbbee314ea8bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/pull/1667/checks#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1667%2Fchecks
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1667%2Fchecks
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fchecks&source=header-repo&source_repo=gitpython-developers%2FGitPython
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1667/checks
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1667/checks
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1667/checks
gitpython-developers https://github.com/gitpython-developers
GitPythonhttps://github.com/gitpython-developers/GitPython
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1667/checks
Notifications https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 964 https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5k https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://github.com/gitpython-developers/GitPython
Issues 169 https://github.com/gitpython-developers/GitPython/issues
Pull requests 8 https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/gitpython-developers/GitPython/security
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1667/checks
Insights https://github.com/gitpython-developers/GitPython/pulse
Code https://github.com/gitpython-developers/GitPython
Issues https://github.com/gitpython-developers/GitPython/issues
Pull requests https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security https://github.com/gitpython-developers/GitPython/security
Insights https://github.com/gitpython-developers/GitPython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
Byronhttps://github.com/Byron
gitpython-developers:mainhttps://github.com/gitpython-developers/GitPython/tree/main
EliahKagan:toxhttps://github.com/EliahKagan/GitPython/tree/tox
Conversation 7 https://github.com/gitpython-developers/GitPython/pull/1667
Commits 4 https://github.com/gitpython-developers/GitPython/pull/1667/commits
Checks 0 https://github.com/gitpython-developers/GitPython/pull/1667/checks
Files changed https://github.com/gitpython-developers/GitPython/pull/1667/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1667/checks
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1667/checks
Configure tox https://github.com/gitpython-developers/GitPython/pull/1667/checks#top
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1667/checks
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.