|
| 1 | +<!-- markdownlint-disable --> |
| 2 | + |
| 3 | +<a href="../src/__init__.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> |
| 4 | + |
| 5 | +# <kbd>module</kbd> `__init__.py` |
| 6 | +Library for uploading docs to charmhub. |
| 7 | + |
| 8 | +**Global Variables** |
| 9 | +--------------- |
| 10 | +- **DRY_RUN_NAVLINK_LINK** |
| 11 | +- **FAIL_NAVLINK_LINK** |
| 12 | +- **DOCUMENTATION_FOLDER_NAME** |
| 13 | +- **DOCUMENTATION_TAG** |
| 14 | +- **DEFAULT_BRANCH_NAME** |
| 15 | +- **GETTING_STARTED** |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +<a href="../src/__init__.py#L33"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> |
| 20 | + |
| 21 | +## <kbd>function</kbd> `run_reconcile` |
| 22 | + |
| 23 | +```python |
| 24 | +run_reconcile( |
| 25 | + clients: Clients, |
| 26 | + user_inputs: UserInputs |
| 27 | +) → ReconcileOutputs | None |
| 28 | +``` |
| 29 | + |
| 30 | +Upload the documentation to charmhub. |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +**Args:** |
| 35 | + |
| 36 | + - <b>`clients`</b>: The clients to interact with things like discourse and the repository. |
| 37 | + - <b>`user_inputs`</b>: Configurable inputs for running upload-charm-docs. |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +**Returns:** |
| 42 | + ReconcileOutputs object with the result of the action. None, if there is no reconcile. |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +**Raises:** |
| 47 | + |
| 48 | + - <b>`InputError`</b>: if there are any problems with executing any of the actions. |
| 49 | + - <b>`TaggingNotAllowedError`</b>: if the reconcile tries to tag a branch which is not the main base branch |
| 50 | + |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +<a href="../src/__init__.py#L133"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> |
| 55 | + |
| 56 | +## <kbd>function</kbd> `run_migrate` |
| 57 | + |
| 58 | +```python |
| 59 | +run_migrate(clients: Clients, user_inputs: UserInputs) → MigrateOutputs | None |
| 60 | +``` |
| 61 | + |
| 62 | +Migrate existing docs from charmhub to local repository. |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +**Args:** |
| 67 | + |
| 68 | + - <b>`clients`</b>: The clients to interact with things like discourse and the repository. |
| 69 | + - <b>`user_inputs`</b>: Configurable inputs for running upload-charm-docs. |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +**Returns:** |
| 74 | + MigrateOutputs providing details on the action performed and a link to the Pull Request containing migrated documentation. None if there is no migration. |
| 75 | + |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +<a href="../src/__init__.py#L189"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> |
| 80 | + |
| 81 | +## <kbd>function</kbd> `pre_flight_checks` |
| 82 | + |
| 83 | +```python |
| 84 | +pre_flight_checks(clients: Clients, user_inputs: UserInputs) → bool |
| 85 | +``` |
| 86 | + |
| 87 | +Perform checks to make sure the repository is in a consistent state. |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +**Args:** |
| 92 | + |
| 93 | + - <b>`clients`</b>: The clients to interact with things like discourse and the repository. |
| 94 | + - <b>`user_inputs`</b>: Configurable inputs for running upload-charm-docs. |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +**Returns:** |
| 99 | + Boolean representing whether the checks have all been passed. |
| 100 | + |
| 101 | + |
0 commit comments