From 7ca7cd01f7df13aadb21312b4e16b44b44362f36 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Wed, 4 Jul 2018 07:42:50 +0200 Subject: [PATCH] docs: add python documentation Closes #2215 --- website/docs/configuration-options.md | 4 +++ website/docs/python.md | 49 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 website/docs/python.md diff --git a/website/docs/configuration-options.md b/website/docs/configuration-options.md index 0137df6981..3f86b0d4d6 100644 --- a/website/docs/configuration-options.md +++ b/website/docs/configuration-options.md @@ -454,6 +454,8 @@ By default, Renovate will add sha256 digests to Docker source images so that the ## pip_requirements +Add configuration here to specifically override settings for `pip` requirements files. Supports `requirements.txt` and `requirements.pip` files. The default file pattern is fairly flexible in an attempt to catch similarly named ones too but may be extended/changed. + ## prBody Although the PR body can be customised by you, it might be quite challenging. If you think the Pull Request should include different information or could be formatted better, perhaps try raising an [Issue](https://github.com/renovatebot/renovate/issues) and let us solve it for you and for everyone else too. @@ -494,6 +496,8 @@ The PR title is important for some of Renovate's matching algorithms (e.g. deter ## python +Currently the only Python package manager is `pip` - specifically for `requirements.txt` and `requirequirements.pip` files - so adding any config to this `python` object is essentially the same as adding it to the `pip_requirements` object instead. + ## rangeStrategy Behaviour: diff --git a/website/docs/python.md b/website/docs/python.md new file mode 100644 index 0000000000..ecb24c0475 --- /dev/null +++ b/website/docs/python.md @@ -0,0 +1,49 @@ +--- +title: Python Package Manager Support +description: Python/pip dependencies support in Renovate +--- + +# Python Package Manager Support + +Renovate supports upgrading dependencies in `pip` requirements (e.g. `requirements.txt`, `requirements.pip`) files. + +## Versioning Support + +The [PEP440](https://www.python.org/dev/peps/pep-0440/) versioning scheme has been rewritten for JavaScript for the purposes of use in this project is published as [@renovatebot/pep440](https://github.com/renovatebot/pep440). It supports both pinned versions as well as ranges. Legacy versions (`===` prefix) as not supported. + +## How It Works + +1. Renovate will search each repository for any files requirements files it finds. +2. Existing dependencies will be extracted from the file(s) +3. Renovate will look up the latest version on [PyPI](https://pypi.org/) to determine if any upgrades are available +4. If the source package includes a GitHub URL as its source, and has either a "changelog" file or uses GitHub releases, then Release Notes for each version will be embedded in the generated PR. + +## Alternative file names + +The default file matching regex for requirements.txt aims to pick up the most popular conventions for file naming, but it's possible that some get missed. If you have a specific file or file pattern you want to get found by Renovate, then you can do this by adding a new pattern under the `fileMatch` field of `pip_requirements`. e.g. you could add this to your config: + +```json + "pip_requirements": { + "fileMatch": ["my/specifically-named.file", "\.requirements$"] + } +``` + +## Disabling Python Support + +The most direct way to disable all Python support in Renovate is like this: + +```json + "python": { + "enabled": false + } +``` + +Alternatively, maybe you only want one package manager, such as `npm`. In that case this would enable _only_ `npm`: + +```json + "enabledManagers": ["npm"] +``` + +## Future work + +Feature requests are open for conda support, additional file types (e.g. `setup.cfg`), and of course `pipenv` support. You can locate these issues by filtering on the [#python](https://github.com/renovatebot/renovate/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%23python) hashtag in the repository. Please +1 and/or add a comment to each issue that would benefit you so that we can gauge the popularity/importance of each. -- GitLab