Skip to content

[MRG] docs: Fixes #378 — restore 'Running tests locally' in CONTRIBUTING.md#672

Open
jbbqqf wants to merge 1 commit into
tslearn-team:mainfrom
jbbqqf:feat/378-contributing-tests-section
Open

[MRG] docs: Fixes #378 — restore 'Running tests locally' in CONTRIBUTING.md#672
jbbqqf wants to merge 1 commit into
tslearn-team:mainfrom
jbbqqf:feat/378-contributing-tests-section

Conversation

@jbbqqf
Copy link
Copy Markdown

@jbbqqf jbbqqf commented May 9, 2026

Summary

Restores a "Running the test suite locally" subsection to CONTRIBUTING.md so new contributors know how to verify their changes before opening a PR. Issue #378 reports that this guidance was lost during a previous CONTRIBUTING update.

Fixes #378Contributing.MD no longer contains instructions to run tests locally.

Context

The current CONTRIBUTING.md walks new contributors through forking, branching and pushing, but never tells them which command runs the tests or where the tests live. New contributors hitting the file have to grep the repo (or guess pytest) before they can validate a fix locally — exactly the friction the original issue raised.

The added section sits right before the existing Pull Request Checklist (which already says "Bug-fixes or new features should be provided with non-regression tests" but doesn't say how to run them), so the two pieces of guidance now flow together.

Changes

  • CONTRIBUTING.md — added a ### Running the test suite locally subsection covering:
    • creating a venv + editable install of tslearn + pytest,
    • running the full pytest tests/ suite from the repo root,
    • running a single file / single test (pytest tests/test_metrics.py::test_dtw -v),
    • running doctests for a module (pytest --doctest-modules tslearn/metrics/dtw_variants.py),
    • a one-liner about optional extras (h5py, tensorflow, torch).

Documentation-only — no behavioural change.

Reproduce BEFORE/AFTER yourself (copy-paste)

# --- one-time setup ---
git clone https://github.com/tslearn-team/tslearn.git /tmp/repro && cd /tmp/repro

# --- BEFORE (origin/main) ---
git checkout origin/main
grep -c "pytest" CONTRIBUTING.md
# Expected: 0  (no test instructions present)

# --- AFTER (this PR) ---
git fetch https://github.com/jbbqqf/tslearn.git feat/378-contributing-tests-section
git checkout FETCH_HEAD
grep -c "pytest" CONTRIBUTING.md
# Expected: >= 4  (full pytest section, single-test example, doctest example)

What I ran locally

  • pytest tests/ against the new instructions to confirm the documented commands actually run on a clean editable install. Passing locally.
  • Visual diff inspection of CONTRIBUTING.md — section sits before Pull Request Checklist; existing structure preserved.

Edge cases tested

# Scenario Input Expected Verified by
1 Documentation-only diff git diff --stat only CONTRIBUTING.md modified manual git diff
2 Existing content preserved full CONTRIBUTING.md every previous section still present, only the new subsection inserted manual diff

Risk / blast radius

Documentation-only — zero runtime impact.

Release note

docs: CONTRIBUTING.md regained a "Running the test suite locally" section (#378).

PR drafted with assistance from Claude Code. The reproducer block above was used during development; it is the same one a reviewer can paste verbatim.

…earn-team#378)

Issue tslearn-team#378 reports that CONTRIBUTING.md no longer documents how to run
the tests locally — an important first step for new contributors. This
adds a focused subsection right before the Pull Request Checklist with:

- creating a venv and editable install,
- running the full pytest suite from tests/,
- running a single file / single test,
- running doctests for a module,
- a one-liner about optional extras.

The rest of the document is unchanged.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.70%. Comparing base (2f2029a) to head (87514fd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #672   +/-   ##
=======================================
  Coverage   93.70%   93.70%           
=======================================
  Files          73       73           
  Lines        6986     6986           
=======================================
  Hits         6546     6546           
  Misses        440      440           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@charavelg
Copy link
Copy Markdown
Contributor

Hi @jbbqqf and thanks for your PR, glad to welcome you onboard.

The documentation also includes a contributing section (docs/contributing.rst) and could benefit from the same treatment.
Furthermore, the information is currently duplicated which leads to inconsistency.

Do you think this PR can be adapted to handle both concerns?

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.

Contributing.MD no longer contains instructions to run tests locally

2 participants