Skip to content

Commit 38f6a83

Browse files
authored
Merge pull request #917 from marionbarker/working-docs
Update README and add section for Refresh FastLane API Key
2 parents 7b816c8 + 94a2649 commit 38f6a83

13 files changed

+1256
-76
lines changed

README.md

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ If it is a more substantive change and you want to [install LoopDocs locally](#i
4848
# Run the next line **each time** you start a new shell window/tab
4949
source venv/bin/activate
5050
```
51-
- Install the project's required *Python* packages
51+
- **Install** the **dependencies** (that is the project's required *Python* packages)
5252
```shell
53-
cd loopdocs # Make sure you are in the folder where you cloned this repository
53+
cd loopdocs # where you cloned the loopdocs repository
5454

5555
python -m pip install -r dev-requirements.txt
5656
python -m pip install -r requirements.txt
@@ -612,3 +612,60 @@ The website uses the Markdown page of the glossary.
612612
> [!IMPORTANT]
613613
> Remember to commit these two files.
614614
615+
### Add a Package
616+
617+
> [!NOTE]
618+
> In this section, the terms Python **package** and **dependency** refer to the same thing.
619+
620+
- **Create** a feature **branch** (aka. topic branch)
621+
```shell
622+
git switch dev
623+
git switch -c feature/add_dependency_XXX
624+
```
625+
- **Add** the pinned version of the new **package** to the **`requirements.in`** file
626+
```shell
627+
MY_FAVORITE_EDITOR_HERE requirements.in
628+
629+
# Add the pinned version of the package to `requirements.in
630+
XXX_PACKAGE_NAME_HERE==XXX_PACKAGE_VERSION_HERE
631+
```
632+
For example, to add the `mkdocs-exporter` package version `6.1.1`, I added the following line to the `requirements.in` file:
633+
```text
634+
mkdocs-exporter==6.1.1
635+
```
636+
- Generate **`requirements.txt`**
637+
```shell
638+
cd loopdocs
639+
640+
# IMPORTANT: The project's virtual environment MUST be activated first
641+
source venv/bin/activate
642+
643+
# Remove the already installed packages in case you need to start from a blank slate
644+
# python -m pip freeze --exclude-editable | xargs python -m pip uninstall -y
645+
646+
# Install the development packages
647+
# (among which `pip-tools` that contains `pip-compile`)
648+
pip install -r dev-requirements.txt
649+
650+
# Install the direct dependencies (listed in `requirements.in`
651+
# This also installs the indirect dependencies these packages depend upon.
652+
pip install -r requirements.in
653+
654+
# Add code/doc using this package and test until it is ready.
655+
656+
# Generate the `requirements.txt` file from `requirements.in`
657+
# This can be slow, be patient
658+
pip-compile requirements.in
659+
660+
# Commit the changes (where XXX denotes the package name)
661+
git add requirements.in requirements.txt
662+
git commit -m "➕ Add dependency: XXX"
663+
664+
# Push your feature branch to your `origin` repository
665+
git push -u origin feature/add_dependency_XXX
666+
```
667+
- [**Create a Pull Request**](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) with your changes:
668+
- Open your clone repository of `trio-docs` on *GitHub* (`https://github.com/YOUR_USERNAME/trio-docs`)
669+
- Click the `Pull Requests` tab
670+
- Click "`Compare & pull request`" in the yellow banner next to your branch name
671+

docs/browser/bb-errors.md

Lines changed: 216 additions & 72 deletions
Large diffs are not rendered by default.

docs/browser/bb-update.md

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,97 @@ Digital Service Act Compliance
117117
118118
Open your *GitHub* account and select your <code>LoopWorkspace repository</code> from your repositories list.
119119

120+
### Update from 3.2.x to 3.4
121+
122+
This should only be necessary if you are changing from an older, Mac-Xcode build of version 3.2.x to a Browser Build of 3.6.x. Most people are updating from 3.4.x to 3.6.x and should skip ahead to [Special Instructions for 3.6.0](#special-instructions-for-360).
123+
124+
For the update from 3.2.x to 3.6, you must do more than "just" build. If you skip this step - the build will fail.
125+
126+
* The `Identifier` for the "`widget`" changed from "`SmallStatusWidget`" to the more descriptive "`LoopWidgetExtension`"
127+
128+
> If you built version 3.3.0 (the `dev branch` before release of version 3.4) or newer, you can skip ahead to [Special Instructions for 3.6.0](#special-instructions-for-360).
129+
130+
You will (1) run [`Add Identifiers`](#add-identifiers), (2) [add the `App Group`](#add-app-group-to-new-identifier) to the new identifier, (3) run [`Create Certificates`](#create-certificates) and then (4) run [`Build Loop`](#build-the-app).
131+
132+
#### Add Identifiers
133+
134+
In your fork of LoopWorkspace:
135+
136+
* Run the Action: `Add Identifier`
137+
* Wait for it to succeed
138+
139+
??? tip "Detailed instructions for `Add Identifier` (Click to open/close)"
140+
Refer to the graphic below for the numbered steps:
141+
142+
1. Click on the `Actions` tab of your <code>LoopWorkspace</code> repository
143+
1. On the left side, click on 2. <code>Add Identifiers</code>
144+
1. On the right side, click `Run Workflow` to show a dropdown menu
145+
* You will see your default branch (typically this is `main`)
146+
1. Tap the green button that says `Run workflow`.
147+
148+
![add identifiers using github actions](img/action-02-add-identifiers.svg){width="700"}
149+
{align="center"}
150+
151+
The `Add Identifiers` &nbsp;<span class=notranslate>Action</span>&nbsp; should succeed or fail in a few minutes. Do not continue to the next step until this one succeeds.
152+
153+
* If you see the green check (:octicons-check-circle-fill-16:{: .passed }) continue to the next section
154+
* If you see the red `X` (:octicons-x-circle-fill-16:{: .failed }):
155+
* [Action: Add Identifiers Errors](bb-errors.md#action-add-identifiers-errors){: target="_blank" } tells you what to search for in the file
156+
* Resolve the error and repeat `Add Identifiers`
157+
158+
#### Add `App Group` to New `Identifier`
159+
160+
Open the [Certificates, Identifiers & Profiles: Identifiers List](https://developer.apple.com/account/resources/identifiers/list){: target="_blank" } page.
161+
162+
Click on the "`LoopWidgetExtension`" identifier to open the `Edit Your App ID Configuration` screen.
163+
164+
| `NAME` | `IDENTIFIER` |
165+
|-------|------------|
166+
| `Loop Widget Extension` | `com.TEAMID.loopkit.Loop.LoopWidgetExtension` |
167+
168+
The graphic below has numbered steps that match these directions:
169+
170+
1. Looking at the `App Services` column, scroll down to the `App Groups` row and ensure the check box (under the `Capabilities column`) for `App Groups` is checked
171+
2. If the word `Configure` shows up, tap on it
172+
* This opens the `App Group Assignment` screen
173+
* If it said `Edit` instead of `Configure` - you can click to confirm you have the correct App Group but won't need to continue or save if it is correct
174+
3. Check the box by `Loop App Group` that uses your `TEAMID` in `group.com.TEAMID.loopkit.LoopGroup`
175+
* Note that if you previously built with Xcode, the name may be different, i.e., `XC group com TEAMID loopkit LoopGroup`
176+
4. Tap `Continue`
177+
5. Tap `Save`
178+
179+
![graphic showing selection of the correct App Group](img/update-identifier-loop-3-4.png){width="700"}
180+
{align="center"}
181+
182+
If you did not need to make changes, the `Save` button will not be active.
183+
184+
* Tap on the `< All Identifiers` link at the top left
185+
186+
The full list of Identifiers should be displayed again.
187+
188+
!!! note "Other Identifiers"
189+
All other identifiers should be already set up.
190+
191+
* If they are not, refer to [Configure to Use Browser: Add App Group to Identifiers](prepare-app.md#add-app-group-to-identifiers){: target="_blank" }
192+
193+
#### Create Certificates
194+
195+
You must run the action `Create Certificates` again because the `Identifiers` were updated. Wait for this to succeed before trying to build.
196+
197+
???+ tip "Detailed instructions (Click to open/close)"
198+
Refer to the graphic below for the numbered steps:
199+
200+
1. Click on the "<code>Actions</code>" tab of your <code>LoopWorkspace</code> repository
201+
1. On the left side, click on "`Create Certificates`"
202+
1. On the right side, click "`Run Workflow`" to show a dropdown menu
203+
* You will see your default branch (typically `main`)
204+
1. Tap the green button that says "`Run workflow`".
205+
206+
![create certificates using github actions](img/action-03-create-certs.svg){width="700"}
207+
{align="center"}
208+
209+
1. Wait a minute or two for the action to finish
210+
120211
### Special Instructions for 3.6.0
121212

122213
When updating to version 3.6.0, there are two "extra" things to do.
@@ -430,7 +521,7 @@ Manual certificate renewal is not longer required if you added the `Variable` `E
430521
{align="center"}
431522

432523
!!! question "Deleting the certs/distribution folder did not work for me"
433-
Some people reported trouble with this step. The other option is to delete and create a new `Match-Secrets` repository: see [Reset `Match-Secrets`](bb-errors.md#reset-match-secrets){: target="_blank" }
524+
Some people reported trouble with this step. The other option is to delete and create a new `Match-Secrets` repository: see [Delete `Match-Secrets`](bb-errors.md#delete-match-secrets){: target="_blank" }
434525

435526
1. While still within your *Github* account, navigate to your fork of LoopWorkspace.
436527
* You can do this several ways, but one method is demonstrated by the GIF below

docs/browser/img/api-key-generate.svg

Lines changed: 230 additions & 0 deletions
Loading

docs/browser/img/api-key-in-process-regen.svg

Lines changed: 235 additions & 0 deletions
Loading

docs/browser/img/api-key-revoke.svg

Lines changed: 203 additions & 0 deletions
Loading

docs/browser/img/certificates-01.png

40.1 KB
Loading

docs/browser/img/p8-key-rename.png

29.5 KB
Loading

docs/browser/img/profiles-01.png

54.3 KB
Loading

docs/browser/img/profiles-02.png

80.1 KB
Loading

docs/browser/img/profiles-03.png

77 KB
Loading

docs/browser/img/update-org-secret.svg

Lines changed: 217 additions & 0 deletions
Loading

docs/browser/prepare-fork.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ Once you add all six <code>Secrets</code>, your screen should look similar to th
198198

199199
This is a new step required with `Loop 3.6.0` and newer versions. It provides automatic renewal of certificates, which expire once per year.
200200

201-
1. While in the same screen where you enter the `Secrets`, click on the `Variables` tab to the right of the `Secrets` tab:
201+
1. While in the same screen where you enter the `Secrets`, click on the `Variables` tab to the right of the `Secrets` tab
202+
* If you aren't at the screen:
203+
* ***GitHub* organization account**: go to your organization page and select Settings; scroll down, select `Secret and Variable` and then select `Actions`
204+
* ***GitHub* personal account**: go to your repository for the app you are building, select Settings; scroll down, select `Secret and Variable` and then select `Actions`
202205
1. Select new variable and give it the name the `ENABLE_NUKE_CERTS` and enter `true` as the value
203206

204207
``` { .text .copy }

0 commit comments

Comments
 (0)