PolicyEngine / PolicyEngine/policyengine-sim-api

full API can't currently apply pyright

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

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
1
Avg merge
10h 29m
Merged PRs (30d)
7

Description

Creating this as part of removing the "lib" packages for the various services in api-v2.

The code from "policyengine_api/api" is broken in a number of ways (for one we don't actually include the required dependencies in the pyproject.toml). pyright for some reason (https://github.com/microsoft/pyright/issues/10159) is unusably slow if you try to exclude directories so I've turned it off, but this means we have no type checking on the full API which is going to lead pretty quickly to code rott.

@anth-volk should we fix the offending api code, delete it, other?

Contributor guide

Open the contributing guide

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.

Research direction

Start by reviewing policyengine_api/api and its pyproject.toml dependencies, then run pyright against the full API to identify the reported failures and performance constraints. The issue is done when the API can be type-checked without unusable directory exclusions and its required dependencies are correctly declared, or when the obsolete API code is removed following a decided scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.