Skip to content

fix: Resolve merge conflicts with main branch for Rust CI integration#137

Merged
fbkaragoz merged 4 commits into
feature/71-ci-rust-testsfrom
copilot/sub-pr-72
Jan 30, 2026
Merged

fix: Resolve merge conflicts with main branch for Rust CI integration#137
fbkaragoz merged 4 commits into
feature/71-ci-rust-testsfrom
copilot/sub-pr-72

Conversation

Copilot AI commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

The branch had unrelated histories causing merge conflicts between the Rust CI additions and changes in main.

Changes

  • Updated GitHub Actions version: actions/checkout@v4@v6 to align with main
  • Replaced removed test step: Swapped out "Evaluate Lemmatizer Quality" with "Run property-based tests with statistics" from main
  • Added missing test files: Pulled test_properties.py and strategies.py required by property-based test step
  • Optimized Rust CI execution: Added if: matrix.python-version == '3.11' to Rust checks to avoid redundant execution across Python 3.9-3.12 matrix

Result

- name: Run Rust unit tests
  if: matrix.python-version == '3.11'  # Run once, not 4x
  run: cargo test --all-features

The Rust CI checks (test, clippy, fmt) now integrate cleanly with main while executing efficiently.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 30, 2026 08:27
Co-authored-by: fbkaragoz <59958216+fbkaragoz@users.noreply.github.com>
Co-authored-by: fbkaragoz <59958216+fbkaragoz@users.noreply.github.com>
Co-authored-by: fbkaragoz <59958216+fbkaragoz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Rust unit tests and linting to CI pipeline fix: Resolve merge conflicts with main branch for Rust CI integration Jan 30, 2026
Copilot AI requested a review from fbkaragoz January 30, 2026 08:33
@fbkaragoz fbkaragoz marked this pull request as ready for review January 30, 2026 12:38
Copilot AI review requested due to automatic review settings January 30, 2026 12:38
@fbkaragoz fbkaragoz merged commit a308cd2 into feature/71-ci-rust-tests Jan 30, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR resolves merge conflicts between Rust CI additions and the main branch by updating GitHub Actions versions, replacing a lemmatizer quality evaluation step with property-based tests, and optimizing Rust CI execution to run only once per workflow instead of for each Python version.

Changes:

  • Updates GitHub Actions checkout version and adds Python 3.11 conditionals to Rust CI steps
  • Replaces lemmatizer evaluation workflow step with property-based testing using Hypothesis
  • Adds new test files implementing property-based tests for Turkish NLP functions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/tests.yml Updates checkout action version, adds conditionals to Rust checks for single execution on Python 3.11, replaces lemmatizer evaluation with property-based test step
tests/test_properties.py New property-based test suite using Hypothesis to verify idempotency, type safety, and edge case handling across Turkish NLP functions
tests/strategies.py New Hypothesis strategy definitions for generating Turkish text test cases with proper diacritics, suffixes, and Unicode edge cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +54 to +55
- name: Run property-based tests with statistics
run: pytest tests/test_properties.py --hypothesis-show-statistics -v

Copilot AI Jan 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property-based tests require the 'hypothesis' package, but it is not included in the project's dev dependencies in pyproject.toml. This will cause the test step to fail with an import error. Add 'hypothesis>=6.0.0' to the dev dependencies list in pyproject.toml.

Copilot uses AI. Check for mistakes.
Comment thread tests/test_properties.py
Comment on lines +166 to +167
# Pick a word from tokens as keep word (or use a known stopword)
keep_word = tokens[0] if tokens else "ve"

Copilot AI Jan 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ternary expression 'tokens[0] if tokens else "ve"' is redundant. Since line 164 contains 'assume(len(tokens) > 0)', tokens is guaranteed to be non-empty at this point, so the else clause will never be executed. Simplify to just 'keep_word = tokens[0]'.

Suggested change
# Pick a word from tokens as keep word (or use a known stopword)
keep_word = tokens[0] if tokens else "ve"
# Pick a word from tokens as keep word
keep_word = tokens[0]

Copilot uses AI. Check for mistakes.
@@ -47,11 +51,9 @@ jobs:
- name: Run tests with coverage
run: pytest --cov=durak --cov-report=xml --cov-report=term

Copilot AI Jan 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property-based tests in test_properties.py will be executed twice: once during the coverage test run on line 52, and again on line 55 with statistics. Consider adding a conditional filter to exclude test_properties.py from the coverage run (e.g., '--ignore=tests/test_properties.py') or remove the separate execution if statistics are not critical.

Suggested change
run: pytest --cov=durak --cov-report=xml --cov-report=term
run: pytest --cov=durak --cov-report=xml --cov-report=term --ignore=tests/test_properties.py

Copilot uses AI. Check for mistakes.
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.

3 participants