Menu ▾ ▴

Development

sanjaya danushka

Development

Everything contributors need: layout of the codebase, how to run tests, how translations work, and how packaging ships the AUR packages.

Overview

NeoArch is a Python 3.8+ app. The GUI is PyQt6; the CLI shares the same backend services. The repo is split so that every feature is a self-contained service behind a thin GUI/CLI layer.

neoarch/
├── backend/
│   ├── services/        # feature services (scan, backup, appimage, snapshot, …)
│   └── package/         # pacman/AUR/flatpak/npm data layer
├── frontend/
│   ├── main_window.py   # the PyQt6 window & signal wiring
│   └── mixins/          # per-area UI logic (views, search, settings, operations, …)
├── locale/              # gettext .po/.mo catalogs (de, es, fr, hi, ja, pt, ru, si, tr, zh)
├── cli.py               # `neo` entry point
├── tests/               # pytest suite (unit + hygiene + i18n)
└── packaging/           # PKGBUILD (stable) + PKGBUILD (dev/neoarch-git) + .SRCINFO templates

Setting up

python -m venv .venv && source .venv/bin/activate
pip install -r requirements_pyqt.txt
pip install pytest flake8
python Neoarch.py         # run the GUI
./bin/neoarch-cli --help  # run the CLI directly (same as `neo`)

Running tests

python -m pytest tests/            # full suite
python -m pytest tests/unit/test_view_state.py   # targeted
python -m pytest tests/test_i18n.py              # translation coverage

Note: tests/test_hygiene.py::test_delete_pacnew runs a real sudo invocation and can hang in CI (unattended password prompt). In headless/CI runs you can deselect it:
python -m pytest --deselect tests/test_hygiene.py::test_delete_pacnew

Linting

flake8 is checked in CI — only the fatal categories block the build:

flake8 . --select=E9,F63,F7,F82

Translations (i18n)

All user-facing strings go through _("..."). Adding a new literal requires adding it to all ten .po catalogs (neoarch/locale/*/LC_MESSAGES/neoarch.po) or tests/test_i18n.py::test_bundled_catalogs_cover_wrapped_strings fails.

msgmerge -U neoarch/locale/<lang>/LC_MESSAGES/neoarch.po \
         neoarch/locale/neoarch.pot
# add translations, then compile:
msgfmt neoarch/locale/<lang>/LC_MESSAGES/neoarch.po \
       -o neoarch/locale/<lang>/LC_MESSAGES/neoarch.mo

Packaging (AUR)

The repo ships packaging metadata:

  • packaging/PKGBUILD — the neoarch-git (dev) package; publishes on demand via the AUR - neoarch-git workflow.
  • packaging/PKGBUILD.stable — the stable neoarch package; auto-publishes from v* tags via the AUR - neoarch workflow.

Development builds publish manually:

gh workflow run "AUR - neoarch-git"

↩ Back to Home


Related

Wiki: Configuration
Wiki: Home
Wiki: Security scanner
Wiki: _Sidebar