pyinfra-dev / pyinfra-dev/pyinfra
Add `files.patch` operation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 548
- Avg merge
- 7d 17h
- Merged PRs (30d)
- 13
Description
Is your feature request related to a problem? Please describe
Some files, I need to change in various places, and its way easier to just diff original modified.
Describe the solution you'd like
I have done a script that patches the files and silently continue if they are already patched.
Could a new feature allow to apply a patch in a idempotent way and also pyinfra have information about it (for example, the "No changes" or the "Success" information)?
Example:
A function .patch( name="Patch this configuration file",
src="patches/example.patch",
destination="/etc/example.conf" )
Thanks !
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing existing pyinfra operation implementations and their change-reporting conventions, then trace how an operation receives a source patch and destination path. Compare the requested idempotent behavior with existing operation tests and define completion around applying an unapplied patch while reporting either changes or no changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100