Skip to content

Commit 9954296

Browse files
authored
feat: Rework CONTRIBUTING.md (#413)
* feat: Rework CONTRIBUTING.md * fix: typo
1 parent 49cea42 commit 9954296

File tree

1 file changed

+14
-37
lines changed

1 file changed

+14
-37
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,18 @@
55
This documents explains the processes and practices recommended for contributing enhancements to
66
this operator.
77

8-
- Generally, before developing enhancements to this charm, you should consider [opening an issue
9-
](https://github.com/canonical/mongodb-k8s-operator/issues) explaining your use case.
10-
- If you would like to chat with us about your use-cases or proposed implementation, you can reach
11-
us at [Canonical Mattermost public channel](https://chat.charmhub.io/charmhub/channels/charm-dev)
12-
or [Discourse](https://discourse.charmhub.io/).
13-
- Familiarising yourself with the [Charmed Operator Framework](https://juju.is/docs/sdk) library
14-
will help you a lot when working on new features or bug fixes.
15-
- All enhancements require review before being merged. Code review typically examines
8+
**Note:** The charm's python business logic is written in a shared library that can be found [here](https://github.com/canonical/mongo-single-kernel-library). This is where python contributions should be made.
9+
10+
- Generally, before developing enhancements to this charm, you should consider opening an issue [on Single Kernel repository](https://github.com/canonical/mongo-single-kernel-library/issues) explaining your use case.
11+
- If you would like to chat with us about your use-cases or proposed implementation, you can reach us on our [Matrix channel](https://matrix.to/#/#charmhub-data-platform:ubuntu.com) or in [Discourse](https://discourse.charmhub.io/).
12+
- Familiarising yourself with the [Charmed Operator Framework](https://juju.is/docs/sdk) library will help you a lot when working on new features or bug fixes.
13+
- All enhancements require review before being merged. Additionally, new code must pass the tests. Code review typically examines
1614
- code quality
1715
- test coverage
18-
- user experience for Juju administrators this charm.
19-
- Please help us out in ensuring easy to review branches by rebasing your pull request branch onto
20-
the `main` branch. This also avoids merge commits and creates a linear Git commit history.
21-
22-
## Prepare environment
23-
24-
```shell
25-
# Juju
26-
sudo snap install juju --classic
27-
28-
# charmcraft
29-
sudo snap install charmcraft --classic
30-
sudo usermod -a -G lxd $USER
31-
lxd init --auto
32-
lxc network set lxdbr0 ipv6.address none
33-
34-
# microk8s
35-
sudo snap install microk8s --classic --channel=1.21
36-
sudo usermod -a -G microk8s $USER
37-
sudo chown -f -R $USER ~/.kube
38-
microk8s status --wait-ready
39-
40-
# tox poetry
41-
sudo apt update
42-
sudo apt install -y pip
43-
python3.8 -m pip install tox poetry
44-
export PATH=$PATH:$HOME/.local/bin
45-
```
16+
- user experience for Juju administrators of this charm.
17+
- Please help us out in ensuring easy to review branches by rebasing your pull request branch onto the `main` branch. This also avoids merge commits and creates a linear Git commit history.
18+
- Once the code has been merged on the [repository](https://github.com/canonical/mongo-single-kernel-library/) of the Mongo Single Kernel lib, wait for a new version of the [python package](https://pypi.org/project/mongo-charms-single-kernel/) to be published, and create a PR on this repository that bumps the version of the package, and on the 3 other repositories ([MongoDB VM](https://github.com/canonical/mongodb-operator), [Mongos VM](https://github.com/canonical/mongos-operator) and [Mongos k8s](https://github.com/canonical/mongos-k8s-operator)).
19+
- If you added some new interfaces, please don't forget to add them here.
4620

4721
### Testing
4822

@@ -51,6 +25,7 @@ tox run -e fmt # update your code according to linting rules
5125
tox run -e lint # code style
5226
tox run -e unit # unit tests
5327
tox run -e integration # integration tests
28+
tox run -e integration -- 'tests/integration/test_charm.py' --group='1' # charm integration tests
5429
tox # runs 'fmt', 'lint' and 'unit' environments
5530
```
5631

@@ -67,10 +42,12 @@ charmcraft pack
6742
```bash
6843
# Create a model
6944
juju add-model dev
45+
7046
# Enable DEBUG logging
7147
juju model-config logging-config="<root>=INFO;unit=DEBUG"
48+
7249
# Deploy the charm
73-
juju deploy ./mongodb-k8s_ubuntu-22.04-amd64.charm --resource mongodb-image=dataplatformoci/mongodb:5.0 --num-units=1
50+
juju deploy ./mongodb-k8s_ubuntu-22.04-amd64.charm --resource mongodb-image=ghcr.io/canonical/charmed-mongodb@sha256:7ddb80a3b5ddffa95704a8980fc11037ba1a23273a9805214bc42be9f507107f --num-units=1
7451
```
7552

7653
## Canonical Contributor Agreement

0 commit comments

Comments
 (0)