Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/autoblack.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint with Mypy, Ruff
on:
push:
branches: [main]
pull_request:


jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install --group lint
- name: Run mypy
run: mypy ynh-dev ynh_dev
- uses: astral-sh/ruff-action@v3
with:
src: ynh-dev ynh_dev
16 changes: 0 additions & 16 deletions .github/workflows/shellcheck.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Python stuff
__pycache__/
.*_cache/
uv.lock
.python-version

# Apps
*_ynh

Expand All @@ -11,6 +17,7 @@ Vagrantfile
moulinette
yunohost
yunohost-admin
yunohost-portal
ssowat

# Folders
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ In packages like `yunohost`, you have automated non-regression tests at your dis
> In such case, you may initiate or attach the container with a specific name, like:
>
> ```bash
> ./ynh-dev start bookworm ynh-test
> ./ynh-dev -d bookworm -v core-tests -b stable start
> ```
>
> And run `yunohost tools postinstall` like for the other container.
Expand Down Expand Up @@ -293,7 +293,8 @@ It could be due to bridge conflict (for example if you have incus installed too)
This [ticket](https://github.com/YunoHost/issues/issues/1664) could help.

If you have docker and incus, and your dns resolution inside incus container does not work at all, you can try:
```

```bash
sudo iptables -I DOCKER-USER -i incusbr0 -o eno1 -j ACCEPT
```

Expand All @@ -316,9 +317,9 @@ Depending on what you want to achieve, you might want to run the postinstall rig
Deploy a `ynh-dev` folder at the root of the filesystem with:

```bash
cd /
curl https://raw.githubusercontent.com/yunohost/ynh-dev/master/deploy.sh | bash
git clone https://github.com/yunohost/ynh-dev /ynh-dev
cd /ynh-dev
./ynh-dev init
```

### 3. Develop and test
Expand Down
125 changes: 0 additions & 125 deletions custom-catalog/catalog_manager.py

This file was deleted.

20 changes: 0 additions & 20 deletions deploy.sh

This file was deleted.

86 changes: 86 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[project]
name = "ynh-dev"
version = "2.0"
description = "Yunohost dev environment manager"
readme = "README.md"
authors = [
{name = "YunoHost", email = "yunohost@yunohost.org"}
]
requires-python = ">=3.11"

dependencies = [
"pyinotify",
]


[dependency-groups]
lint = [
"ruff",
"mypy>=1.18",
"types-toml",
"types-PyYAML",
"types-psutil",
]

[tool.uv]
package = false

[[tool.mypy.overrides]]
module = ["pyinotify.*"]
follow_untyped_imports = true

[tool.ruff]
line-length = 120

[tool.ruff.lint]
select = [
"YTT", # flake8-2020
"ANN", # flake8-annotations
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
# "LOG", # flake8-logging
# "G", # flake8-logging-format
"PIE", # flake8-pie
"Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"PTH", # flake8-use-pathlib
"FLY", # flynt
"I", # isort
"N", # pep8-naming
"PERF", # Perflint
"E", # pycodestyle
"W", # pycodestyle
"F", # Pyflakes
"PL", # Pylint
"UP", # pyupgrade
"FURB", # refurb
"RUF", # Ruff-specific rules
"TRY", # tryceratops
# "D",
]
ignore = [
"ANN401", # any-type
"COM812", # missing-trailing-comma
"D203", # incorrect-blank-line-before-class
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"PLR2004", # magic-value-comparison
"UP009", # utf8-encoding-declaration
"TRY003", # raise-vanilla-args
"D100", # undocumented-public-module
"D104", # undocumented-public-package
"D105", # undocumented-magic-method
"D200", # unnecessary-multiline-docstring
"D212", # multi-line-summary-first-line
"D401", # non-imperative-mood
"FURB171",
]
Loading