Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into potel-base
Browse files Browse the repository at this point in the history
  • Loading branch information
sl0thentr0py committed Feb 21, 2025
2 parents 24229eb + 48ebd73 commit 79480b9
Show file tree
Hide file tree
Showing 16 changed files with 410 additions and 45 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ jobs:
with:
python-version: 3.12

- run: |
- name: Detect unexpected changes to tox.ini or CI
run: |
pip install -e .
pip install -r scripts/populate_tox/requirements.txt
python scripts/populate_tox/populate_tox.py --fail-on-changes
pip install -r scripts/split_tox_gh_actions/requirements.txt
python scripts/split_tox_gh_actions/split_tox_gh_actions.py --fail-on-changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
gevent
shibuya
sphinx
sphinx<8.2
sphinx-autodoc-typehints[type_comments]>=1.8.0
typing-extensions
35 changes: 35 additions & 0 deletions scripts/populate_tox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ integration_name: {
rule2: [package3, package4, ...],
},
"python": python_version_specifier,
"include": package_version_specifier,
}
```

When talking about version specifiers, we mean
[version specifiers as defined](https://packaging.python.org/en/latest/specifications/version-specifiers/#id5)
by the Python Packaging Authority. See also the actual implementation
in [packaging.specifiers](https://packaging.pypa.io/en/stable/specifiers.html).

### `package`

The name of the third party package as it's listed on PyPI. The script will
Expand Down Expand Up @@ -118,6 +124,35 @@ metadata or the SDK is explicitly not supporting some packages on specific
Python versions (because of, for example, broken context vars), the `python`
key can be used.

### `include`

Sometimes we only want to consider testing some specific versions of packages.
For example, the Starlite package has two alpha prereleases of version 2.0.0, but
we do not want to test these, since Starlite 2.0 was renamed to Litestar.

The value of the `include` key expects a version specifier defining which
versions should be considered for testing. For example, since we only want to test
versions below 2.x in Starlite, we can use

```python
"starlite": {
"include": "<2",
...
}
```

The `include` key can also be used to exclude a set of specific versions by using
`!=` version specifiers. For example, the Starlite restriction above could equivalently
be expressed like so:


```python
"starlite": {
"include": "!=2.0.0a1,!=2.0.0a2",
...
}
```


## How-Tos

Expand Down
1 change: 1 addition & 0 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
],
},
"python": "<=3.11",
"include": "!=2.0.0a1,!=2.0.0a2", # these are not relevant as there will never be a stable 2.0 release (starlite continues as litestar)
},
"statsig": {
"package": "statsig",
Expand Down
Loading

0 comments on commit 79480b9

Please sign in to comment.