Commit graph

602 commits

Author SHA1 Message Date
Paul Gauthier (aider)
9c1d050d8b feat: Add git command output display in check_push_access function 2025-03-04 14:00:51 -08:00
Paul Gauthier (aider)
50bead172b style: Apply linter formatting to versionbump.py script 2025-03-04 13:57:07 -08:00
Paul Gauthier (aider)
ee4508af03 refactor: Move check functions to top level of script 2025-03-04 13:57:01 -08:00
Paul Gauthier
6cb8e1a518 Merge branch 'fix-requirements-conflicts' of github.com:claui/aider into claui-fix-requirements-conflicts 2025-03-04 13:28:56 -08:00
Paul Gauthier (aider)
85375359ed style: Apply linter formatting to versionbump.py script 2025-03-04 13:24:28 -08:00
Paul Gauthier (aider)
17c9ba2c68 feat: Add git push dry-run check before version bump 2025-03-04 13:24:22 -08:00
Paul Gauthier
34334ad8b8 chore: Add dry run git push check before version bump 2025-03-04 13:24:18 -08:00
Claudia Pellegrino
31c4198cee
fix: let fewer conflicts occur across requirements
**tl;dr** Introduce a common umbrella constraints file (that works
across requirement extras) to avoid package version conflicts and
to reduce the need for manual pinning in `*.in` files.

Previously, spurious package version conflicts could sometimes occur
across requirements for `pip install -e .`, `pip install -e .[help]`,
`pip install -e .[playwright]`, and so on. Here’s why:

- There are five different requirement configs: the set of base
  requirements (`requirements.txt`) and four additional requirement sets\
  (aka "extras"): `dev`, `help`, `browser`, and `playwright`.

- Each of those five configurations spans its own tree of dependencies
  [1]. Those five trees can slightly overlap. (For example, `greenlet`
  is a transitive requirement for both the `help` and `playwright`
  trees, respectively.)

- If you want to resolve those dependency trees so you get concrete
  version numbers, you can’t just look at each tree independently.
  This is because when trees overlap, they sometimes pull in the same
  package for different reasons, respectively, and maybe with different
  version constraints.
  For example, the `help` tree pulls in `greenlet`, because `sqlalchemy`
  requires it. At the same time, the `playwright` tree also pulls in
  `greenlet` because it’s needed by the `playwright` package.
  Resolving those constraints strictly individually (i.e., per tree) is
  usually a mistake. It may work for a while, but occasionally you’re
  going to end up with two conflicting versions of the same package.

To prevent those version conflicts from occurring, the five
`pip-compile` invocations were designed as a chain.
The process starts at the smallest tree (i.e., the base
`requirements.in` file). It calculates the version numbers for the tree,
remembers the result, and feeds it into the calculation of the next
tree.

The chain design somewhat helped mitigate conflicts, but not always.
The reason for that is that the chain works like a greedy algorithm:
once a decision has been made for a given package in a tree, that
decision is immediately final, and the compilation process isn’t allowed
to go back and change that decision if it learns new information.
New information comes in all the time, because larger trees usually have
more complex constraints than smaller trees, and the process visits
larger trees later, facing additional constraints as it hops from tree
to tree. Sometimes it bumps into a new constraint against a package for
which it has already made a decision earlier (i.e., it has pinned the
concrete version number in the `requirements*.txt` file of an earlier
tree).

That’s why the greedy chain-based method, even though it mostly works
just fine, can never avoid spurious conflicts entirely.
To help mitigate those conflicts, pinning entries were manually added to
`requirements.in` files on a case-by-case basis as conflicts occurred.
Those entries can make the file difficult to reason about, and they must
be kept in sync manually as packages get upgraded. That’s a maintenance
burden.

Turning the chain into an umbrella may help. Instead of hopping from
tree to tree, look at the entire forest at once, calculate all the
concrete version numbers for all trees in one fell swoop, and save the
results in a common, all-encompassing umbrella file.

Armed with the umbrella file (called `common-constraints.txt`), visit
each tree (in any order – it no longer matters) and feed it just the
umbrella file as a constraint, along with its own `*.in` file as the
input.
Chaining is no longer necessary, because the umbrella file already
contains all version constraints for all the packages one tree could
possibly need, and then some.

This technique should reduce manual pinning inside `*.in` files, and
makes sure that computed version numbers no longer contradict each other
across trees.

[1]: From a graph theory point of view, I’m being blatantly incorrect
here; those dependency graphs are usually not trees, because they have
cycles. I’m still going to call them "trees" for the sake of this
discussion, because the word "tree" feels less abstract and intimidating
and hopefully more relatable.
2025-03-02 02:50:03 +01:00
Paul Gauthier
51cf241dae copy 2025-02-26 09:05:16 -08:00
Paul Gauthier (aider)
30332c2ba5 style: Apply linter formatting to issues.py script 2025-02-10 11:37:35 -08:00
Paul Gauthier (aider)
17919d7503 refactor: Add priority label check to prevent bot actions on priority issues 2025-02-10 11:37:30 -08:00
Paul Gauthier (aider)
3877ab1f00 style: Apply linter formatting to blame.py 2025-02-07 10:57:42 -08:00
Paul Gauthier (aider)
2425322e8d refactor: Improve test file filtering logic in blame script 2025-02-07 10:57:38 -08:00
Paul Gauthier (aider)
3f80a113d1 style: Lint and format blame.py script 2025-02-07 10:56:50 -08:00
Paul Gauthier (aider)
9ad20849d3 feat: Include language test files in blame script 2025-02-07 10:56:46 -08:00
Paul Gauthier
c8c58280d8 refactor: Modify file filtering logic in blame script 2025-02-07 10:56:44 -08:00
Paul Gauthier
4251e976b3 copy 2025-01-13 14:28:34 -08:00
Paul Gauthier
73c89e8c00 copy 2025-01-10 15:53:17 -08:00
Paul Gauthier (aider)
fcc499e401 refactor: normalize deepseek model names to deepseek-chat 2025-01-10 15:51:53 -08:00
Paul Gauthier
6e8efe22aa refactor: Combine deepseek/deepseek-coder into chat AI in model stats 2025-01-10 15:51:52 -08:00
Paul Gauthier
2c963b389c include author in history updates 2025-01-09 12:03:05 -08:00
Paul Gauthier (aider)
76404004a4 feat: include author info in git log output for history updates 2025-01-09 11:57:23 -08:00
Paul Gauthier
867aaa5864 copy 2025-01-04 06:36:22 -08:00
Paul Gauthier (aider)
59cf823d56 style: Run linter on blame.py 2024-12-17 08:25:08 -08:00
Paul Gauthier (aider)
70312c58be feat: Add exclude_files list and filter in blame script 2024-12-17 08:25:04 -08:00
Paul Gauthier
4942366271 feat: Add exclude_files list to blame script 2024-12-17 08:25:03 -08:00
Paul Gauthier
85218d74d4 don't block pre-commit for faq cog 2024-12-16 12:47:06 -08:00
Paul Gauthier
01382527f5 cleanup cog of toml 2024-12-16 12:08:08 -08:00
Paul Gauthier (aider)
8c10cb6230 style: Fix linting issues in my_models.py 2024-12-13 13:22:59 -08:00
Paul Gauthier (aider)
c8894bcead feat: Conditionally add redacted model note to script 2024-12-13 13:22:55 -08:00
Paul Gauthier
edc602c33a copy 2024-12-13 12:55:33 -08:00
Paul Gauthier (aider)
a691d1750a style: Apply linter formatting 2024-12-13 12:34:34 -08:00
Paul Gauthier (aider)
834e2f9304 refactor: Separate data, text, and HTML formatting into functions 2024-12-13 12:34:31 -08:00
Paul Gauthier (aider)
66e5e9c1ce feat: Add percentage column to model token usage summary 2024-12-13 12:33:14 -08:00
Paul Gauthier (aider)
2d5f613984 feat: Process only last 1000 lines of analytics file 2024-12-13 12:32:28 -08:00
Paul Gauthier (aider)
868e7a278f feat: Sort model token usage by count descending 2024-12-13 12:31:38 -08:00
Paul Gauthier
f953d17889 chore: Make my_models.py executable 2024-12-13 12:31:37 -08:00
Paul Gauthier (aider)
3473969aae fix: Remove unused os import in my_models.py 2024-12-13 12:31:09 -08:00
Paul Gauthier (aider)
ec11ae7c40 style: Fix linting issues in my_models.py 2024-12-13 12:31:03 -08:00
Paul Gauthier (aider)
8217ee1bbb feat: Add script to analyze model token usage 2024-12-13 12:30:59 -08:00
Paul Gauthier
1ad3ee0aec feat: Add my_models.py script 2024-12-13 12:30:59 -08:00
Paul Gauthier (aider)
b3e9a2fede feat: Allow version arg for blame script, default to v0.1.0 2024-12-13 11:49:15 -08:00
Paul Gauthier
2f5d6bf909 feat: Take version as optional arg for blame script 2024-12-13 11:49:14 -08:00
Paul Gauthier (aider)
df8c88cef4 style: Fix line length in issues.py 2024-12-13 08:46:57 -08:00
Paul Gauthier (aider)
844e12769c feat: Handle "bug" label like "enhancement" for closing 2024-12-13 08:46:53 -08:00
Paul Gauthier (aider)
b982626ac4 style: Fix line length in comment 2024-12-13 08:46:02 -08:00
Paul Gauthier (aider)
517b2b42a6 fix: Fix long lines in closing comment 2024-12-13 08:45:58 -08:00
Paul Gauthier (aider)
6778c33628 style: Apply linter fixes 2024-12-13 08:45:47 -08:00
Paul Gauthier (aider)
bc0b11e1ef feat: Add fixed enhancement issue closing 2024-12-13 08:45:43 -08:00
Paul Gauthier (aider)
6f266c0090 fix: Skip test fixture watch files in blame script 2024-12-11 20:38:11 -08:00