Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Add PR template (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturo-seijas authored Sep 6, 2023
1 parent 6f38fd2 commit 2dff7c4
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Applicable spec: <link>

### Overview

<!-- A high level overview of the change -->

### Rationale

<!-- The reason the change is needed -->

### Juju Events Changes

<!-- Any changes to the juju events being observed (newly added, significantly modified or deleted) -->

### Module Changes

<!-- Any high level changes to modules and why (Service, Observer, helper) -->

### Library Changes

<!-- Any changes to charm libraries -->

### Checklist

- [ ] The [charm style guide](https://juju.is/docs/sdk/styleguide) was applied
- [ ] The [contributing guide](https://github.com/canonical/is-charms-contributing-guide) was applied
- [ ] The changes are compliant with [ISD054 - Managing Charm Complexity](https://discourse.charmhub.io/t/specification-isd014-managing-charm-complexity/11619)
- [ ] The documentation is generated using `src-docs`
- [ ] The documentation for charmhub is updated
- [ ] The PR is tagged with appropriate label (`urgent`, `trivial`, `complex`)

<!-- Explanation for any unchecked items above -->
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ For overall concepts related to using Juju
recommend
[this how to on using MicroK8s with Juju](https://juju.is/docs/microk8s-cloud).

Please generate src documentation for every commit. See the section below for more details.

### Generating src docs for every commit

Run the following command:

```bash
echo -e "tox -e src-docs\ngit add src-docs\n" >> .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
```

## How to deploy this charm (quick guide)

To deploy the charm and relate it to
Expand Down
6 changes: 6 additions & 0 deletions generate-src-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.

lazydocs --no-watermark --output-path src-docs src/*
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cosl
ops==2.6.0
ops-lib-pgsql
73 changes: 73 additions & 0 deletions src-docs/charm.py.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!-- markdownlint-disable -->

<a href="../src/charm.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

# <kbd>module</kbd> `charm.py`
Charm for Gunicorn on kubernetes.

**Global Variables**
---------------
- **JUJU_CONFIG_YAML_DICT_ITEMS**


---

## <kbd>class</kbd> `GunicornK8sCharm`
Charm for Gunicorn on kubernetes.

<a href="../src/charm.py#L41"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `__init__`

```python
__init__(*args)
```

Construct.



**Args:**

- <b>`args`</b>: Variable list of positional arguments passed to the parent constructor.


---

#### <kbd>property</kbd> app

Application that this unit is part of.

---

#### <kbd>property</kbd> charm_dir

Root directory of the charm as it is running.

---

#### <kbd>property</kbd> config

A mapping containing the charm's config and current values.

---

#### <kbd>property</kbd> meta

Metadata of this charm.

---

#### <kbd>property</kbd> model

Shortcut for more simple access the model.

---

#### <kbd>property</kbd> unit

Unit that this execution is responsible for.




14 changes: 13 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ commands =
[testenv:unit]
description = Run unit tests
deps =
cosl
coverage[toml]
pytest
-r{toxinidir}/requirements.txt
Expand Down Expand Up @@ -110,3 +109,16 @@ deps =
-r{toxinidir}/requirements.txt
commands =
pytest -v --tb native --ignore={[vars]tst_path}unit --log-cli-level=INFO -s {posargs}

[testenv:src-docs]
allowlist_externals=sh
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib:{[vars]src_path}
description = Generate documentation for src
deps =
jinja2
lazydocs
-r{toxinidir}/requirements.txt
commands =
; can't run lazydocs directly due to needing to run it on src/* which produces an invocation error in tox
sh generate-src-docs.sh

0 comments on commit 2dff7c4

Please sign in to comment.