René's URL Explorer Experiment


Title: Add a "doc" extra for documentation build dependencies by EliahKagan · Pull Request #1872 · gitpython-developers/GitPython · GitHub

Open Graph Title: Add a "doc" extra for documentation build dependencies by EliahKagan · Pull Request #1872 · gitpython-developers/GitPython

X Title: Add a "doc" extra for documentation build dependencies by EliahKagan · Pull Request #1872 · gitpython-developers/GitPython

Description: Much as GitPython has a test extra to aid development by installing testing and--currently--most linting dependencies, this adds a doc extra that installs Sphinx and its theme and plugins. The test extra is built by parsing test-requirements.txt, and similarly the new doc extra is built by parsing doc/requirements.txt. The previous approach of running pip install -r doc/requirements.txt continues to work. The following are updated to use the new extra: The Read the Docs configuration in .readthedocs.yaml. Documentation build testing step in pythonpackage.yml. Documentation building tox environment in tox.ini. Before doing this, I factored out shared logic in the way metadata files are read in setup.py, wrote that code in a more streamlined way, and removed what appear to be small unintentional complexities in how two unusual situations are handled: The entire content of VERSION, which should always be exactly one line, is now used (except leading and trailing whitespace) as the version. The requirements files and readme are, as the VERSION file already had been, now found relative to the setup.py file rather than the current directory, in the rare case that those two locations are different. You might decide you actually only want that setup.py cleanup, and not the new doc extra. I believe it makes sense to have a doc extra because it is a convenient way to install documentation, and because adding a new extra for that is readily feasible without even though the project definition is not declarative, because the information is available for static inspection in its requirements file, which already exist. (In contrast, I have not proposed a new lint extra at this time, though I think we should have that, because it would currently involve either adding another requirements file or making it harder to statically inspect the dependencies with automated tools.) However, to a large extent this comes down to personal preference, and there is a reason many projects use a requirements file for their documentation dependencies: it tends to be a reasonably okay way to pin them all exactly, including indirect (transitive) dependencies, for greater stability. Read the Docs advocates this. But GitPython is not doing this. Currently documentation builld dependencies deliberately support ranges to support building on different Python versions. That is compatible with pinning if a tool like poetry is used (when multiple sets of precisely pinned direct and transitive dependencies, for multiple versions and sometimes platforms, have to be maintained, one wants a tool that fully automates doing so). Also, I think there is no reason to think GitPython will pin documentation build dependencies in the future yet not pin other extra/optional dependencies such as those for testing and linting. I think there is some symmetry between these things, for GitPython (and for many other projects). Theory you don't have to read that also isn't correct in real life In principle: Applications use a requirements.txt file, or something conceptually similar like Pipfile.lock, that lists all their Python package dependencies fully pinned, including indirect dependencies (which, for Python packages, are the same thing as transitive dependencies), and typically express unpinned or less pinned direct dependencies separately in a requirements.in file, or something conceptually similar like Pipfile. Libraries define their dependencies in setup.py, setup.cfg, or pyproject.toml, sometimes in a way affected by the choice of build backend, sometimes with the aid of dependency management tools such as poetry and sometimes not. The idea is that applications need specific pinned dependency versions to guarantee stability, while in contrast libraries need to accommodate the varying versions of whatever applications use them, either indirectly or through other libraries. The problems are that the distinction between an application and a library is more permeable than it may seem at first, and that there are various benefits of defining an application like a library (for example, a requirements.txt file will not facilitate automatically installing executable scripts, and will not facilitate finding the code from a different location, even a subdirectory within its source tree), and also that when automated tests are run on a library, it is being used like an application and there can even be a benefit to precisely pinning the test runner and other test dependencies. However, if you prefer not to take the addition of the "doc" extra, but do want the other changes to setup.py, then I can drop the commit that actually does the "doc" extra and the PR can be retitled accordingly. I have locally tested the parts of this change that are not automatically exercised by GitHub Actions checks and Read the Docs pull request builds: python -m build to build GitPython itself. Editable and non-editable installations. git.__version__ when imported from a non-editable installation, both from a prebuilt wheel and with pip omitting -e. Ability to install locally with the doc extra on a Windows environment set up dissimilarly to how Windows is set up on GitHub Actions runners. Ability to run make -C doc html successfully when the only installation command run was pip install -e '.[doc]' (as it would be used locally). Here's the Read the Docs build status for this pull request (passing at 74df5a8).

Open Graph Description: Much as GitPython has a test extra to aid development by installing testing and--currently--most linting dependencies, this adds a doc extra that installs Sphinx and its theme and plugins. The test...

X Description: Much as GitPython has a test extra to aid development by installing testing and--currently--most linting dependencies, this adds a doc extra that installs Sphinx and its theme and plugins. The test...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/checks(.:format)
route-controllerpull_requests
route-actionchecks
fetch-noncev2:223f5386-aaa3-8933-4995-f5d6cea8e64d
current-catalog-service-hash87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a
request-id9C06:D042D:60533F:869984:6968CCAE
html-safe-nonceabe5f1c52696bfa450462f05d2df7a5e4d9950d6d3ca82992b07f6a5429fbd57
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzA2OkQwNDJEOjYwNTMzRjo4Njk5ODQ6Njk2OENDQUUiLCJ2aXNpdG9yX2lkIjoiMzQxMTgzNDMwNTU5Mzc4OTYxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca2044bcf2b944bd02611052b346d5f695876a958301544918b2830c8f4ffd20b
hovercard-subject-tagpull_request:1771103909
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/1872/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:altMuch as GitPython has a test extra to aid development by installing testing and--currently--most linting dependencies, this adds a doc extra that installs Sphinx and its theme and plugins. The test...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneaf2d7af0cc84117fa10bf36808605ef68a335c9d8a804b9cdac55f8d77230b00
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
releasecc844ab6ee0198cc2e2c142dcb8a5c2a61d48743
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/pull/1872/checks#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1872%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%2F1872%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/1872/checks
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1872/checks
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1872/checks
gitpython-developers https://github.com/gitpython-developers
GitPythonhttps://github.com/gitpython-developers/GitPython
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1872/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/1872/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:doc-extrahttps://github.com/EliahKagan/GitPython/tree/doc-extra
Conversation 1 https://github.com/gitpython-developers/GitPython/pull/1872
Commits 3 https://github.com/gitpython-developers/GitPython/pull/1872/commits
Checks 0 https://github.com/gitpython-developers/GitPython/pull/1872/checks
Files changed 4 https://github.com/gitpython-developers/GitPython/pull/1872/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1872/checks
Add a "doc" extra for documentation build dependencies https://github.com/gitpython-developers/GitPython/pull/1872/checks#top
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1872/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.