Skip to content

Commit

Permalink
README: Add more contributing guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
bbhtt committed Sep 24, 2024
1 parent 53aa81e commit 5be509e
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ not recommended unless for development purposes. It depends on patches
that are found in the `org.flatpak.Builder` flatpak package
and on external tools.

For development purposes it can be installed with:
## Contributing

For development purposes the project can be installed with:

```bash
git clone https://github.com/flathub/flatpak-builder-lint
Expand All @@ -52,16 +54,18 @@ poetry run flatpak-builder-lint --help
After making changes to the code or any dependencies run
`poetry lock --no-update` to regenerate the lockfile (when adding
or changing dependency versions) and `poetry install --sync` to
synchronise the virtual environment. The virtual enviroment can be
removed with `poetry env remove flatpak-builder-lint-xxxxxxxx-py3.xx`
synchronise the virtual environment.

The virtual enviroment can be removed with
`poetry env remove flatpak-builder-lint-xxxxxxxx-py3.xx`
(check the environment name with `poetry env list`).

The following Python dependencies are needed to run
`jsonschema^4.19.1, requests^2.32.2, requests-cache^1.2.1, lxml^5.2.2,
sentry-sdk^2.8.0, PyGObject=^3.48.2`. Additionally `poetry-core>=1.0.0`
sentry-sdk^2.8.0, PyGObject^3.48.2`. Additionally `poetry-core>=1.0.0`
is necessary to build.

Additionally the following tools or packages must be installed:
Additionally the following system dependencies must be installed:

- `libgirepository1.0-dev, gir1.2-ostree-1.0`
- `flatpak-builder` for validating flatpak-builder manifests
Expand All @@ -73,6 +77,24 @@ exec flatpak run --branch=stable --command=appstreamcli org.flatpak.Builder ${@}
```
- `desktop-file-validate` to validate desktop files

Debiab/Ubuntu:

```
# apt install appstream flatpak-builder libgirepository1.0-dev gir1.2-ostree-1.0 libcairo2-dev desktop-file-utils
```

ArchLinux:

```
# pacman -S --needed appstream flatpak-builder desktop-file-utils ostree glib2
```

Fedora:

```
# dnf install appstream flatpak-builder desktop-file-utils ostree-libs glib2-devel cairo-devel
```

[Ruff](https://docs.astral.sh/ruff/installation/) is used to lint and
format code. [MyPy](https://mypy.readthedocs.io/en/stable/getting_started.html)
is used to check Python types. To run them:
Expand Down Expand Up @@ -108,7 +130,7 @@ to run tests:
poetry run pytest -v tests
```

### Usage
## Usage

```
usage: flatpak-builder-lint [-h] [--version] [--exceptions] [--appid APPID] [--cwd] [--ref REF] {builddir,repo,manifest,appstream} path
Expand Down

0 comments on commit 5be509e

Please sign in to comment.