Skip to content

Add a CI-CD Pipeline#1

Merged
eduralph merged 2 commits into
maintenance/gramps60from
feature/ci-cd-pipeline
Apr 17, 2026
Merged

Add a CI-CD Pipeline#1
eduralph merged 2 commits into
maintenance/gramps60from
feature/ci-cd-pipeline

Conversation

@eduralph

Copy link
Copy Markdown
Owner

Summary

  • Introduce GitHub Actions CI with container-based jobs for lint, compile-check, unit tests, integration tests, and build

  • Add two Docker images (headless + GTK) hosted on ghcr.io, rebuilt when Dockerfiles change

  • Add shared pytest fixtures (tests/conftest.py) for Gramps-backed integration testing

  • Add repo-wide integration tests verifying plugin registration, loading, metadata, and import/export smoke tests across all 175 addons

  • Add @pytest.mark.gui marker with auto-skip for headless environments

  • Add Linux (container) + Windows (bare runner) test coverage

  • Add CI/CD pipeline with container-based testing

  • Remove accidentally committed debug.log

eduralph and others added 2 commits April 16, 2026 20:45
Introduce GitHub Actions CI workflow with Docker-based jobs
for lint, compile-check, unit tests, integration tests, and
build. Add shared pytest fixtures for Gramps-backed testing
and repo-wide integration tests that verify plugin registration,
loading, metadata, and import/export smoke tests.

- Two Docker images: gramps-headless (GLib) and gramps-gtk (xvfb)
- Linux container + Windows bare runner coverage
- Subprocess-isolated plugin loading (crash-safe)
- @pytest.mark.gui auto-skip for headless environments
- docker-build.yml rebuilds images on Dockerfile changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@eduralph eduralph merged commit 9c2ac1d into maintenance/gramps60 Apr 17, 2026
1 of 7 checks passed
eduralph pushed a commit that referenced this pull request Jul 6, 2026
* first working version of excludesubtree person filter

* Add boolean option to include the matched persons themselves

* fix d63958f exception upon filter building

>  File "/usr/lib/python3/dist-packages/gramps/gui/editors/filtereditor.py", line 594, in init
> t = v1
> TypeError: init() missing 2 required positional arguments: 'uistate' and 'track'

* fix #1  proper implementation of boolean filter parameter

* add debug logging, slightly optimize runtime

* gramps 6.0 compat: rename function apply -> apply_to_one

* chore: rename filter result to self.selected_handles as requested in PR

* fix issues noted by review in PR gramps-project#933

2. Missing type imports
3. Mutable class-level attribute
4. reset() never tears down the sub-filter
5. Potential AttributeError when Gramps ID is not found
6. Progress counter can exceed its declared total
7. Name/description mismatch between gpr.py and the class
8. Both .py files are missing the required GPL-2.0-or-later license header block.
9. Import sections need the standard comment headers
10. Each class needs a navigation header comment:
11. The ExcludeSubtree class has no docstring.
12. set([]) → set().

(14) get_relatives yields None handles (missing father/mother); filtering inside the generator rather than at the call site would be cleaner.

* feat: pass "include matched" param as enum to avoid GUI imports

Instead of adding a checkbox-widget for the boolean parameter, avoid
GUI code in this non-GUI addon by receiving a generic string and using
empty/false as "include" and any other content (e.g. "exclude") as true

* chore: run `black` formatter

* fix: copy gettext(translation) boilerplate from howto; bump plugin version

* fix type annotations & possible AttributeError on None

* fix: add `from __future__ import annotations` for backward compatibility

* fix: guard log.debug statements to only evaluate when logging enabled

* feat: remove "include_stopfilter_matches:bool", default to "exclude"

stringly-typed enums / magic values are bad UX. Include can simply be
realized by adding the MatchesFilter to the containing Filter, too

* remove initialization of class variable selected_handles

"confusing" according to review.

I still think initializing the empty set is correct: should
`apply_to_one` ever be called before `prepare` this will raise an
AttributeError.
eduralph pushed a commit that referenced this pull request Jul 6, 2026
* first working version of excludesubtree person filter

* Add boolean option to include the matched persons themselves

* fix d63958f exception upon filter building

>  File "/usr/lib/python3/dist-packages/gramps/gui/editors/filtereditor.py", line 594, in init
> t = v1
> TypeError: init() missing 2 required positional arguments: 'uistate' and 'track'

* fix #1  proper implementation of boolean filter parameter

* add debug logging, slightly optimize runtime

* gramps 6.0 compat: rename function apply -> apply_to_one

* chore: rename filter result to self.selected_handles as requested in PR

* fix issues noted by review in PR gramps-project#933

2. Missing type imports
3. Mutable class-level attribute
4. reset() never tears down the sub-filter
5. Potential AttributeError when Gramps ID is not found
6. Progress counter can exceed its declared total
7. Name/description mismatch between gpr.py and the class
8. Both .py files are missing the required GPL-2.0-or-later license header block.
9. Import sections need the standard comment headers
10. Each class needs a navigation header comment:
11. The ExcludeSubtree class has no docstring.
12. set([]) → set().

(14) get_relatives yields None handles (missing father/mother); filtering inside the generator rather than at the call site would be cleaner.

* feat: pass "include matched" param as enum to avoid GUI imports

Instead of adding a checkbox-widget for the boolean parameter, avoid
GUI code in this non-GUI addon by receiving a generic string and using
empty/false as "include" and any other content (e.g. "exclude") as true

* chore: run `black` formatter

* fix: copy gettext(translation) boilerplate from howto; bump plugin version

* fix type annotations & possible AttributeError on None

* fix: add `from __future__ import annotations` for backward compatibility

* fix: guard log.debug statements to only evaluate when logging enabled

* feat: remove "include_stopfilter_matches:bool", default to "exclude"

stringly-typed enums / magic values are bad UX. Include can simply be
realized by adding the MatchesFilter to the containing Filter, too

* remove initialization of class variable selected_handles

"confusing" according to review.

I still think initializing the empty set is correct: should
`apply_to_one` ever be called before `prepare` this will raise an
AttributeError.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant