Show that declared `inputs` work for pytest, and document it

Open
#162 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
80/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active

Research direction

Read the “Declare inputs the graph can't see” section in docs/using-diffci.md and the Go example at tests/repo/go-runtime-inputs.test.ts. Add a small pytest fixture under tests/repo/ using a data file in tests/data/, then run npm test and check whether changing the data selects the test with reason DECLARED_INPUT. Add the Python documentation example; if pytest inputs fail, follow the issue’s specified skipped-test and bug-report outcome.

Written by the indexing model from the issue text.

Description

documentation good first issue

The "Declare inputs the graph can't see" section only has JavaScript examples. Declared inputs are tested for Go (tests/repo/go-runtime-inputs.test.ts) but not for Python. Python tests often load data by name, as in open("tests/data/prices.csv"), which the import graph can't see.

Done when:

  • tests/repo/ has a test with a small pytest fixture: a data file under tests/data/, a test that reads it, and an inputs entry mapping one to the other. Changing the data file selects that test with reason DECLARED_INPUT.
  • The docs section has a short Python example next to the JavaScript ones.
  • If the test shows declared inputs don't work for pytest, the PR contains only the failing test, marked it.todo or skipped, and a bug issue with the details. That's a useful result too.

New to DiffCI? See CONTRIBUTING.md: add a synthetic fixture, run npm test, and sign off commits with git commit -s. Comment here to claim the issue.

Dominant language
TypeScript
Stars
0
Forks
4
Avg merge
18h 41m
Merged PRs (30d)
48

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiffCI/core

All issues in DiffCI/core

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.