# Piptegrator
## Tools for managing requirements-driven projects
Run `piptegrator --help` for usage details
Configuration file which contains requirements files (must be in the repo root if present at all):
`.piptegrator_config`
Note: command line options always override corresponding config file options (they do not append to or aggregate with each other).
### Running the tools
The main tool is `piptegrator`
```bash
piptegrator --help
```
Given the configuration file `.piptegrator_config` (a sample present in this repo), run:
```bash
piptegrator --compile --noenvmods
```
For use _without_ a config file, specify the requirements input files as a comma delimited string, e.g.:
```bash
piptegrator --compile --noenvmods --requirements test/requirements.in,test/requirements.tests.in
```
### Error resolution
The most common error flagged is when two requirements files have different versions of a given package. You can see an example of this by running
```bash
piptegrator --compile --noenvmods --requirements test-errors/requirements.in,test-errors/requirements.tests.in
```
This kind of mismatch can be trivial (micro version differences) but the purpose of Piptegrator is to flag these:
if you are testing with one version of a library, and deploying with another, unwelcome surprises are possible.
We observe the version mismatches, and can mitigate them by upgrading/downgrading the respective pinned versions accordingly,
or duplicating a troublesome requirement from one requirements file to another.
(The `test` folder has these fixes, and serves as a contrast with the contents of the `test-errors` folder.)
## Updating this package
Clone this repo
On a branch, make the required edits
Ensure you update the version number in `piptegrator/__config__.py`
(pre-release? use `rc` notation, e.g., `1.2.3rc45`)
### Building and install the distributable wheel
```bash
pip install -U build twine && \
rm -rf dist build *.egg-info ; \
python -m build --wheel && \
ls -al dist && \
unzip -l dist/*.whl && \
pip uninstall -y piptegrator && \
pip install dist/*.whl
```
### Quick test (recompiles test/requirements.in with sample options)
```bash
ln -s .piptegrator_config.sample .piptegrator_config # Or make a copy
piptegrator --compile
```
### Uploading changes (author only)
```bash
twine upload --repository piptegrator dist/*
```
Raw data
{
"_id": null,
"home_page": "https://github.com/MartinFalatic/piptegrator",
"name": "piptegrator",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "pip pip-compile pip-tools requirements uv",
"author": "Martin F. Falatic",
"author_email": "martin@falatic.com",
"download_url": null,
"platform": null,
"description": "# Piptegrator\n\n## Tools for managing requirements-driven projects\n\nRun `piptegrator --help` for usage details\n\nConfiguration file which contains requirements files (must be in the repo root if present at all):\n`.piptegrator_config`\n\nNote: command line options always override corresponding config file options (they do not append to or aggregate with each other).\n\n### Running the tools\n\nThe main tool is `piptegrator`\n\n```bash\npiptegrator --help\n```\n\nGiven the configuration file `.piptegrator_config` (a sample present in this repo), run:\n\n```bash\npiptegrator --compile --noenvmods\n```\n\nFor use _without_ a config file, specify the requirements input files as a comma delimited string, e.g.:\n\n```bash\npiptegrator --compile --noenvmods --requirements test/requirements.in,test/requirements.tests.in\n```\n\n### Error resolution\n\nThe most common error flagged is when two requirements files have different versions of a given package. You can see an example of this by running\n\n```bash\npiptegrator --compile --noenvmods --requirements test-errors/requirements.in,test-errors/requirements.tests.in\n```\n\nThis kind of mismatch can be trivial (micro version differences) but the purpose of Piptegrator is to flag these:\nif you are testing with one version of a library, and deploying with another, unwelcome surprises are possible.\n\nWe observe the version mismatches, and can mitigate them by upgrading/downgrading the respective pinned versions accordingly,\nor duplicating a troublesome requirement from one requirements file to another.\n\n(The `test` folder has these fixes, and serves as a contrast with the contents of the `test-errors` folder.)\n\n## Updating this package\n\nClone this repo\n\nOn a branch, make the required edits\n\nEnsure you update the version number in `piptegrator/__config__.py`\n(pre-release? use `rc` notation, e.g., `1.2.3rc45`)\n\n### Building and install the distributable wheel\n\n```bash\npip install -U build twine && \\\nrm -rf dist build *.egg-info ; \\\npython -m build --wheel && \\\nls -al dist && \\\nunzip -l dist/*.whl && \\\npip uninstall -y piptegrator && \\\npip install dist/*.whl\n```\n\n### Quick test (recompiles test/requirements.in with sample options)\n\n```bash\nln -s .piptegrator_config.sample .piptegrator_config # Or make a copy\npiptegrator --compile\n```\n\n### Uploading changes (author only)\n\n```bash\ntwine upload --repository piptegrator dist/*\n```\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Piptegrator - Tools for managing requirements-driven projects",
"version": "1.5.1",
"project_urls": {
"Homepage": "https://github.com/MartinFalatic/piptegrator"
},
"split_keywords": [
"pip",
"pip-compile",
"pip-tools",
"requirements",
"uv"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8d3d1d6993e1832eb10694eb3e09eb237a69fb0cf3764966bf026e90f6bef04b",
"md5": "a583db8e34004eb238b7a92aaec84d7b",
"sha256": "47945ad82ba1e906f23d7bf466b2c671ccb7f45c9c034cde5e2b07717fd86836"
},
"downloads": -1,
"filename": "piptegrator-1.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a583db8e34004eb238b7a92aaec84d7b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9116,
"upload_time": "2024-08-27T23:36:07",
"upload_time_iso_8601": "2024-08-27T23:36:07.936607Z",
"url": "https://files.pythonhosted.org/packages/8d/3d/1d6993e1832eb10694eb3e09eb237a69fb0cf3764966bf026e90f6bef04b/piptegrator-1.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-27 23:36:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MartinFalatic",
"github_project": "piptegrator",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "piptegrator"
}