Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 8 additions & 32 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Setup base (python, pip cache, tox)
name: Setup base (python, uv, tox)
inputs:
python:
description: "Python version to use"
Expand All @@ -11,41 +11,17 @@ outputs:
runs:
using: "composite"
steps:
- name: pip cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-pip-${{ inputs.python }}

- name: Cargo cache
uses: actions/cache/@v4
with:
path: "~/.cargo"
key: ${{ runner.os }}-cargo

- name: Poetry cache
uses: actions/cache/@v4
with:
path: "~/.cache/pypoetry"
key: ${{ runner.os }}-poetry-${{ inputs.python }}
restore-keys: |
${{ runner.os }}-poetry-

- uses: actions/setup-python@v6
id: python
with:
python-version: ${{ inputs.python }}

- name: upgrade pip and install tox
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Install tox and tox-uv
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

Step name is slightly misleading: this installs tox with both tox-uv and tox-gh-actions. Consider updating the step name to reflect the full set of tools being installed to reduce confusion when debugging CI.

Suggested change
- name: Install tox and tox-uv
- name: Install tox, tox-uv, and tox-gh-actions

Copilot uses AI. Check for mistakes.
shell: bash
run: |
python -m pip -q install --upgrade pip "setuptools==65.6.2"
pip -q install "tox<4" tox-gh-actions

- name: install Rust and Poetry
shell: bash
run : |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --profile minimal
source "$HOME/.cargo/env"
pip -q install poetry>=1.2.0
uv tool install tox --with tox-uv --with tox-gh-actions
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ jobs:
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/setup-semantic-release # node+semantic-release
- uses: ./.github/actions/setup # poetry
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
Comment on lines +73 to +76
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The release job no longer sets up a specific Python version (the previous composite ./.github/actions/setup did). Since the release flow runs uv build via semantic-release, consider adding an explicit actions/setup-python step (or otherwise pinning/ensuring the Python used for building) to avoid relying on whatever Python happens to be preinstalled on the runner.

Copilot uses AI. Check for mistakes.
- id: semantic-release # branch policies defined in .releaserc
env:
GIT_AUTHOR_NAME: appland-release
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.tool-versions

poetry.lock
uv.lock

__pycache__/
*.py[cod]
Expand All @@ -22,3 +23,4 @@ htmlcov/
/ruff.toml

appmap.log
*.sqlite3
2 changes: 1 addition & 1 deletion .releaserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ plugins:
- pyproject.toml
- - '@semantic-release/exec'
- prepareCmd: |
/bin/bash ./ci/scripts/build_with_poetry.sh
/bin/bash ./ci/scripts/build_with_uv.sh
- - '@semantic-release/github':
- assets:
- dist/*.whl
Expand Down
84 changes: 43 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ oldest version currently supported (see the

## Dependency management

[poetry](https://https://python-poetry.org/) for dependency management:
[uv](https://docs.astral.sh/uv/) is used for dependency management and provides fast package installation:

```
% brew install poetry
% cd appmap-python
% poetry install
```bash
# Install uv (macOS/Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install dependencies
cd appmap-python
uv sync --all-extras
```

### wrapt
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The wrapt section immediately following this heading still refers to dependency management via poetry (“not managed using poetry”), which is now outdated after the uv migration. Update that paragraph to reference uv/current tooling so the README doesn’t give conflicting guidance.

Copilot uses AI. Check for mistakes.
Expand All @@ -69,64 +72,63 @@ To update `wrapt`, use `tox` (described below) to run the `vendoring` environmen
## Linting
[pylint](https://www.pylint.org/) for linting:

```
% cd appmap-python
% poetry run pylint appmap
```bash
cd appmap-python
uv run tox -e lint

# Or run pylint directly
uv run pylint appmap

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

```

[Note that the current configuration has a threshold set which must be met for the Travis build to
pass. To make this easier to achieve, a number of checks have both been disabled. They should be
reenabled as soon as possible.]


## Testing
### pytest

Note that you must install the dependencies contained in
[requirements-dev.txt](requirements-dev.txt) before running tests. See the explanation in
[pyproject.toml](pyproject.toml) for details.
[pytest](https://docs.pytest.org/en/stable/) for testing:

Additionally, the tests currently require that you set `APPMAP=true` and
`APPMAP_DISPLAY_PARAMS=true`.
```bash
cd appmap-python

[pytest](https://docs.pytest.org/en/stable/) for testing:
# Run all tests
APPMAP_DISPLAY_PARAMS=true uv run appmap-python pytest

```
% cd appmap-python
% pip install -r requirements-test.txt
% APPMAP=true APPMAP_DISPLAY_PARAMS=true poetry run pytest
# Run tests with a specific Python version
APPMAP_DISPLAY_PARAMS=true uv run --python 3.9 appmap-python pytest

# Run tests in parallel
APPMAP_DISPLAY_PARAMS=true uv run appmap-python pytest -n auto
```

### tox
Additionally, the `tox` configuration provides the ability to run the tests for all
supported versions of Python and Django.
The `tox` configuration provides the ability to run the tests for all supported versions of Python and web frameworks (Django, Flask, SQLAlchemy).

`tox` requires that all the correct versions of Python to be available to create
the test environments. [pyenv](https://github.com/pyenv/pyenv) is an easy way to manage
multiple versions of Python, and the [xxenv-latest
plugin](https://github.com/momo-lab/xxenv-latest) can help get all the latest versions.
With `uv`, you don't need to pre-install Python versions - `uv` will automatically download and manage them:

```bash
cd appmap-python

# Run full test matrix (all Python versions and frameworks)
uv run tox

```sh
% brew install pyenv
% git clone https://github.com/momo-lab/xxenv-latest.git "$(pyenv root)"/plugins/xxenv-latest
% cd appmap-python
% pyenv latest local 3.{9,6,7,8}
% for v in 3.{9,6,7,8}; do pyenv latest install $v; done
% poetry run tox
# Run tests for a specific Python version
uv run tox -e py312-web

# Run tests for specific framework
uv run tox -e py312-django5

# Update vendored wrapt dependency
uv run tox -e vendoring sync
```

## Code Coverage
[coverage](https://coverage.readthedocs.io/) for coverage:

```
% cd appmap-python
% poetry run coverage run -m pytest
% poetry run coverage html
% open htmlcov/index.html
```bash
cd appmap-python
uv run coverage run -m pytest
uv run coverage html
open htmlcov/index.html
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ set -e
set -o pipefail

if [ -z "$DISTRIBUTION_NAME" ] || [ "$DISTRIBUTION_NAME" = "appmap" ] ; then
exec poetry build $*
exec uv build $*
fi

echo "Altering distribution name to $DISTRIBUTION_NAME"
echo "Altering distribution name to $DISTRIBUTION_NAME"

cp -v pyproject.toml /tmp/pyproject.bak
sed -i -e "s/^name = \".*\"/name = \"${DISTRIBUTION_NAME}\"/" pyproject.toml
grep -n 'name = "' pyproject.toml

poetry build $*
uv build $*

echo "Not patching artifacts with Provides-Dist, they won't work anyway (this flow is solely for publishing test)"
cp -v /tmp/pyproject.bak pyproject.toml
1 change: 0 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ recursive=no

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
Expand Down
Loading
Loading