diff --git a/.copier-answers.yml.jinja b/.copier-answers.yml.jinja new file mode 100644 index 0000000..175096b --- /dev/null +++ b/.copier-answers.yml.jinja @@ -0,0 +1,3 @@ +# Managed by Copier. Do not edit by hand. +# Run `copier update` from the project root to pull upstream changes. +{{ _copier_answers|to_nice_yaml }} diff --git a/README.md b/README.md index ba9d6d5..80ff8f8 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,23 @@ except SomeError: pip install hyperion-proxy-rotator ``` +## Or vendor it with Copier + +To copy the code straight into a project instead of depending on the published +package, use [Copier](https://copier.readthedocs.io/): + +``` +copier copy gh:hyperion-ai-agency/hyperion-proxy-rotator path/to/project +``` + +That drops `src/proxy_rotator/` and `tests/` into the project and records a +`.copier-answers.yml`. The vendored code still needs `requests`. Pull later +upstream fixes into the vendored copy from the project root: + +``` +copier update +``` + ## Development ``` diff --git a/copier.yml b/copier.yml new file mode 100644 index 0000000..86ad3e3 --- /dev/null +++ b/copier.yml @@ -0,0 +1,33 @@ +# Vendor this library into a project instead of installing it from PyPI: +# +# copier copy gh:hyperion-ai-agency/hyperion-proxy-rotator path/to/project +# +# It drops src/proxy_rotator/ and tests/ into the target and records a +# .copier-answers.yml. Pull upstream fixes later from inside the project: +# +# copier update + +_exclude: + - "copier.yml" + - "pyproject.toml" + - "README.md" + - "LICENSE" + - "CHANGELOG.md" + - "uv.lock" + - ".gitignore" + - ".pre-commit-config.yaml" + - ".github" + - ".github/**" + - ".venv" + - "dist" + - ".pytest_cache" + - ".pytest_cache/**" + - ".ruff_cache" + - ".ruff_cache/**" + - "**/__pycache__" + - "**/*.pyc" + +_message_after_copy: | + Vendored proxy_rotator (src/proxy_rotator) and its tests. + It requires `requests` in the target project. + Pull upstream fixes later with: copier update