11.. meta ::
2- :description: How to make a code change in Snapcraft. Code, test, and review changes in the project within the standard workflow.
2+ :description: How to make a code change to Snapcraft. Code, test, and review changes in the project within the standard workflow.
33
44:relatedlinks: [Pytest test pattern](https://docs.pytest.org/en/stable/explanation/anatomy.html), [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), [Spread](https://github.com/canonical/spread/blob/master/README.md)
55
99Contribute to development
1010=========================
1111
12- This guide describes how to contribute a code change in Snapcraft.
12+ This guide describes how to contribute a code change to Snapcraft.
1313
1414It requires familiarity with Python, Git, and GitHub.
1515
1616
1717Set up your work environment
1818----------------------------
1919
20- Snapcraft development and documentation use the same build and test environment. If you
21- previously set up your local machine to document Snapcraft, skip to the next section.
20+ Snapcraft development and documentation use the same build and test environment. If
21+ you've already set up your local machine to document Snapcraft, skip to the next
22+ section.
2223
2324For security, you must sign your commits. If you haven't already, `configure Git to sign
2425with your GPG or SSH key
@@ -76,7 +77,7 @@ Every task must be tracked as a `GitHub issue
7677`create one <https://github.com/canonical/snapcraft/issues/new/choose >`__ for it.
7778
7879Tasks come in different sizes and complexity. It's important to choose a task that you
79- have the capacity to finish. It's also important to check to see if the task is already
80+ have the capacity to finish. It's also important to check whether the task is already
8081planned. You might save time and effort by checking for prior work.
8182
8283
@@ -166,13 +167,13 @@ be backward-compatible unless stated otherwise in the issue.
166167
167168All nontrivial changes must be accompanied by new or updated tests. The Snapcraft test
168169suite includes both pytest unit tests and Spread integration tests. When adding unit
169- tests, follow the arrange-act-assert-cleanup pattern from Pytest . Tests are rarely
170+ tests, follow the arrange-act-assert-cleanup pattern from pytest . Tests are rarely
170171perfect on the first try. Additional tests can always be added during the review
171172process.
172173
173- Snapcraft is amenable to code generated with LLM assistance. Generating code is a time
174- saver , but like all code it needs testing and careful review. An LLM doesn't absolve you
175- of responsibility -- you are ultimately responsible for the code in your work.
174+ Snapcraft is amenable to code generated with LLM assistance. Generated code takes less
175+ effort , but like all code it needs testing and careful review. An LLM doesn't absolve
176+ you of responsibility -- you are ultimately responsible for the code in your work.
176177
177178
178179Commit
@@ -263,10 +264,6 @@ code. If that happens, delete your virtual environment and start over:
263264 make setup
264265
265266
266- There are also special tests that are feature-specific. Run ``make help `` to view and
267- select them.
268-
269-
270267 Document your work
271268~~~~~~~~~~~~~~~~~~
272269
@@ -318,19 +315,19 @@ automatic checks will fail. To address these issues, review the logs in the fail
318315checks. The error messages in the logs will have remedies and hints for what needs
319316fixing.
320317
321- When the maintainers review the PR, they may suggest improvements to your code . Address
322- them in follow-up commits to your branch, the same way you committed and pushed changes
323- while drafting. If you feel a particular point should go in a different direction than
324- what they suggest, discuss it with the maintainer in the PR. They'll be happy to explore
318+ When the maintainers review the PR, they may suggest improvements. Address them in
319+ follow-up commits to your branch, the same way you committed and pushed changes while
320+ drafting. If you feel a particular point should go in a different direction than what
321+ they suggest, discuss it with the maintainer in the PR. They'll be happy to explore
325322alternatives.
326323
327324
328325Wrap up the review
329326~~~~~~~~~~~~~~~~~~
330327
331- Once all suggestions are addressed, both maintainers approve the PR, and merge it soon
332- after. ** After the PR is approved, there may be a delay before merge. ** The maintainers
333- might need time to coordinate the PR with other development on the project .
328+ Once all suggestions are addressed, both maintainers will approve the PR. ** After the PR
329+ is approved, there may be a delay before merge. ** The maintainers might need time to
330+ coordinate the PR with other active developments .
334331
335332After approval, **don't ** force-push to your branch. It's difficult for the maintainers
336333to see whether any additional changes mixed into the push.
@@ -341,9 +338,9 @@ Once the PR is merged, your work is complete.
341338Get help and support
342339--------------------
343340
344- Open source contribution can be difficult. Even the most experienced writers become
341+ Open source contribution can be difficult. Even the most experienced developers become
345342tangled or have moments of uncertainty.
346343
347- If you're stuck, or need more information about a task, ask the issue creator, the
348- project's technical author, or a maintainer. If you need hands-on help, ask in the
349- ` Snapcraft Matrix channel <https://matrix.to/#/#snapcraft:ubuntu.com >`__.
344+ If you're stuck, or need more information about a task, ask the issue creator or a
345+ maintainer. If you need hands-on help, ask in the ` Snapcraft Matrix channel
346+ <https://matrix.to/#/#snapcraft:ubuntu.com> `__.
0 commit comments