-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from wolsen/cleanup
chore: cleanup of some files
- Loading branch information
Showing
5 changed files
with
132 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Commits | ||
on: | ||
- pull_request | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
cla-check: | ||
permissions: | ||
pull-requests: read | ||
name: Canonical CLA signed | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if CLA signed | ||
uses: canonical/has-signed-canonical-cla@v1 | ||
|
||
dco-check: | ||
permissions: | ||
pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR | ||
name: Signed-off-by (DCO) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get PR Commits | ||
id: 'get-pr-commits' | ||
uses: tim-actions/get-pr-commits@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Check that all commits are signed-off | ||
uses: tim-actions/dco@master | ||
with: | ||
commits: ${{ steps.get-pr-commits.outputs.commits }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,67 @@ | ||
# lldpd | ||
# Contributing to the lldpd charm | ||
|
||
## Overview | ||
|
||
This document explains the processes and practices recommended for contributing enhancements to | ||
this charm. | ||
|
||
- Generally, before developing enhancements to this charm you should consider [opening an issue]( | ||
https://github.com/canonical/charm-lldp/issues) explaining your bug or use case. | ||
- Familiarising yourself with the [Charmed Operator Framework](https://juju.is/docs/sdk) | ||
library will help you when working on new features or bug fixes. | ||
- All enhancements and code changes require review before being merged. Code review typically | ||
examines: | ||
- code quality | ||
- test coverage | ||
- user experience for administrators deploying and operating this charm | ||
- Please help us out by 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. Please do *not* merge the main branch into your PR. | ||
|
||
## Developing | ||
|
||
Create and activate a virtualenv with the development requirements: | ||
Install `tox`, `charmcraft` and `juju`. | ||
|
||
virtualenv -p python3 venv | ||
source venv/bin/activate | ||
pip install -r requirements-dev.txt | ||
```bash | ||
sudo apt-get install tox | ||
sudo snap install charmcraft --classic | ||
sudo snap install juju | ||
``` | ||
|
||
## Code overview | ||
## Testing | ||
|
||
TEMPLATE-TODO: | ||
One of the most important things a consumer of your charm (or library) | ||
needs to know is what set of functionality it provides. Which categories | ||
does it fit into? Which events do you listen to? Which libraries do you | ||
consume? Which ones do you export and how are they used? | ||
To test the charm, there are several tox targets which can be used | ||
|
||
## Intended use case | ||
```commandline | ||
tox run -e format # update your code according to linting rules | ||
tox run -e lint # code style tests | ||
tox run -e static-charm # runs static analysis on the charm | ||
tox run -e unit # unit tests | ||
tox # runs lint, static analysis and unit tests | ||
``` | ||
|
||
TEMPLATE-TODO: | ||
Why were these decisions made? What's the scope of your charm? | ||
## Building | ||
|
||
## Roadmap | ||
Build the charm in the local repository using the `charmcraft` tool. | ||
|
||
If this Charm doesn't fulfill all of the initial functionality you were | ||
hoping for or planning on, please add a Roadmap or TODO here | ||
```commandline | ||
charmcraft pack | ||
``` | ||
|
||
## Testing | ||
## Deploy | ||
|
||
```commandline | ||
# Create a model | ||
juju add-model test | ||
# Enable debug logging (optional) | ||
juju model-config logging-config="<root>=INFO;unit=DEBUG" | ||
The Python operator framework includes a very nice harness for testing | ||
operator behaviour without full deployment. Just `run_tests`: | ||
# Deploy the charm | ||
juju deploy --base [email protected] ./lldpd_ubuntu-22.04-amd64.charm | ||
``` | ||
|
||
./run_tests | ||
## Canonical Contributor Agreement | ||
Canonical welcomes contributions to the lldpd charm. Please check out our [contributor | ||
agreement](https://ubuntu.com/legal/contributors) if you are interested in contributing to this | ||
code base. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.