Skip to content

Commit ad6bc19

Browse files
committed
fix pypi release
add ga4 proxy and client update tests
1 parent 45c6f3d commit ad6bc19

28 files changed

Lines changed: 1410 additions & 212 deletions

.devcontainer/devcontainer.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
33
{
4-
"name": "Python 3",
5-
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
4+
"name": "Python 3",
5+
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
66

7-
// Configure tool-specific properties.
8-
"customizations": {
9-
// Configure properties specific to VS Code.
10-
"vscode": {
11-
// Set *default* container specific settings.json values on container create.
12-
"settings": {
13-
"python.defaultInterpreterPath": "/usr/local/bin/python",
14-
"python.testing.pytestEnabled": true,
15-
"python.testing.unittestEnabled": false,
16-
"files.exclude": {
17-
".coverage": true,
18-
".pytest_cache": true,
19-
"__pycache__": true
20-
}
21-
},
22-
23-
// Add the IDs of extensions you want installed when the container is created.
24-
"extensions": [
25-
"ms-python.python",
26-
"charliermarsh.ruff",
27-
"ms-python.black-formatter"
28-
]
7+
// Configure tool-specific properties.
8+
"customizations": {
9+
// Configure properties specific to VS Code.
10+
"vscode": {
11+
// Set *default* container specific settings.json values on container create.
12+
"settings": {
13+
"python.defaultInterpreterPath": "/usr/local/bin/python",
14+
"python.testing.pytestEnabled": true,
15+
"python.testing.unittestEnabled": false,
16+
"files.exclude": {
17+
".coverage": true,
18+
".pytest_cache": true,
19+
"__pycache__": true
2920
}
30-
},
21+
},
22+
23+
// Add the IDs of extensions you want installed when the container is created.
24+
"extensions": [
25+
"ms-python.python",
26+
"charliermarsh.ruff",
27+
"ms-python.black-formatter"
28+
]
29+
}
30+
},
3131

32-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
33-
// "forwardPorts": [],
32+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
33+
// "forwardPorts": [],
3434

35-
// Use 'postCreateCommand' to run commands after the container is created.
36-
"postCreateCommand": "pip3 install --user -r requirements-dev.txt && pre-commit install",
35+
// Use 'postCreateCommand' to run commands after the container is created.
36+
"postCreateCommand": "pip3 install --user -r requirements-dev.txt && pre-commit install",
3737

38-
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
39-
"remoteUser": "vscode"
38+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
39+
"remoteUser": "vscode"
4040
}

.github/workflows/cd.yml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
push:
77
branches:
88
- main
9+
tags:
10+
- "v*.*.*"
911
release:
1012
types:
1113
- published
@@ -15,8 +17,6 @@ concurrency:
1517
cancel-in-progress: true
1618

1719
env:
18-
# Many color libraries just need this to be set to any value, but at least
19-
# one distinguishes color depth, where "3" -> "256-bit color".
2020
FORCE_COLOR: 3
2121

2222
jobs:
@@ -29,7 +29,39 @@ jobs:
2929
with:
3030
fetch-depth: 0
3131

32-
- uses: hynek/build-and-inspect-python-package@v2
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: "3.x"
35+
36+
- uses: astral-sh/setup-uv@v6
37+
38+
- name: build
39+
run: uv sync && uv build --sdist
40+
41+
- uses: actions/upload-artifact@v4
42+
with:
43+
name: Packages
44+
path: dist
45+
46+
release:
47+
needs: [dist]
48+
name: Create GitHub Release
49+
runs-on: ubuntu-latest
50+
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'rc')
51+
permissions:
52+
contents: write
53+
54+
steps:
55+
- uses: actions/download-artifact@v4
56+
with:
57+
name: Packages
58+
path: dist
59+
60+
- name: Create Release
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
files: dist/*
64+
generate_release_notes: true
3365

3466
publish:
3567
needs: [dist]
@@ -40,21 +72,12 @@ jobs:
4072
attestations: write
4173
contents: read
4274
runs-on: ubuntu-latest
43-
if: github.event_name == 'release' && github.event.action == 'published'
75+
if: startsWith(github.ref, 'refs/tags/v')
4476

4577
steps:
4678
- uses: actions/download-artifact@v4
4779
with:
4880
name: Packages
4981
path: dist
5082

51-
- name: Generate artifact attestation for sdist and wheel
52-
uses: actions/attest-build-provenance@v2
53-
with:
54-
subject-path: "dist/*"
55-
5683
- uses: pypa/gh-action-pypi-publish@release/v1
57-
with:
58-
# Remember to tell (test-)pypi about this repo before publishing
59-
# Remove this line to publish to PyPI
60-
repository-url: https://test.pypi.org/legacy/

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
27+
2728
- uses: actions/setup-python@v5
2829
with:
2930
python-version: "3.x"
@@ -33,6 +34,7 @@ jobs:
3334
- uses: pre-commit/action@v3.0.1
3435
with:
3536
extra_args: --hook-stage manual --all-files
37+
3638
- name: Run Pylint
3739
run: uvx nox -s pylint -- --output-format=github
3840

CHANGELOG.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
## [project-title] Changelog
22

33
<a name="x.y.z"></a>
4+
45
# x.y.z (yyyy-mm-dd)
56

6-
*Features*
7-
* ...
7+
_Features_
8+
9+
- ...
10+
11+
_Bug Fixes_
12+
13+
- ...
814

9-
*Bug Fixes*
10-
* ...
15+
_Breaking Changes_
1116

12-
*Breaking Changes*
13-
* ...
17+
- ...

CONTRIBUTING.md

Lines changed: 68 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,93 @@
11
# Contributing to [project-title]
22

3-
This project welcomes contributions and suggestions. Most contributions require you to agree to a
4-
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
5-
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
6-
7-
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
8-
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
9-
provided by the bot. You will only need to do this once across all repos using our CLA.
10-
11-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
12-
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
13-
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
14-
15-
- [Code of Conduct](#coc)
16-
- [Issues and Bugs](#issue)
17-
- [Feature Requests](#feature)
18-
- [Submission Guidelines](#submit)
3+
This project welcomes contributions and suggestions. Most contributions require
4+
you to agree to a Contributor License Agreement (CLA) declaring that you have
5+
the right to, and actually do, grant us the rights to use your contribution. For
6+
details, visit https://cla.opensource.microsoft.com.
7+
8+
When you submit a pull request, a CLA bot will automatically determine whether
9+
you need to provide a CLA and decorate the PR appropriately (e.g., status check,
10+
comment). Simply follow the instructions provided by the bot. You will only need
11+
to do this once across all repos using our CLA.
12+
13+
This project has adopted the
14+
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
15+
For more information see the
16+
[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
17+
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any
18+
additional questions or comments.
19+
20+
- [Code of Conduct](#coc)
21+
- [Issues and Bugs](#issue)
22+
- [Feature Requests](#feature)
23+
- [Submission Guidelines](#submit)
1924

2025
## <a name="coc"></a> Code of Conduct
21-
Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
26+
27+
Help us keep this project open and inclusive. Please read and follow our
28+
[Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
2229

2330
## <a name="issue"></a> Found an Issue?
24-
If you find a bug in the source code or a mistake in the documentation, you can help us by
25-
[submitting an issue](#submit-issue) to the GitHub Repository. Even better, you can
26-
[submit a Pull Request](#submit-pr) with a fix.
31+
32+
If you find a bug in the source code or a mistake in the documentation, you can
33+
help us by [submitting an issue](#submit-issue) to the GitHub Repository. Even
34+
better, you can [submit a Pull Request](#submit-pr) with a fix.
2735

2836
## <a name="feature"></a> Want a Feature?
29-
You can *request* a new feature by [submitting an issue](#submit-issue) to the GitHub
30-
Repository. If you would like to *implement* a new feature, please submit an issue with
31-
a proposal for your work first, to be sure that we can use it.
3237

33-
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
38+
You can _request_ a new feature by [submitting an issue](#submit-issue) to the
39+
GitHub Repository. If you would like to _implement_ a new feature, please submit
40+
an issue with a proposal for your work first, to be sure that we can use it.
41+
42+
- **Small Features** can be crafted and directly
43+
[submitted as a Pull Request](#submit-pr).
3444

3545
## <a name="submit"></a> Submission Guidelines
3646

3747
### <a name="submit-issue"></a> Submitting an Issue
38-
Before you submit an issue, search the archive, maybe your question was already answered.
48+
49+
Before you submit an issue, search the archive, maybe your question was already
50+
answered.
3951

4052
If your issue appears to be a bug, and hasn't been reported, open a new issue.
4153
Help us to maximize the effort we can spend fixing issues and adding new
42-
features, by not reporting duplicate issues. Providing the following information will increase the
43-
chances of your issue being dealt with quickly:
44-
45-
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
46-
* **Version** - what version is affected (e.g. 0.1.2)
47-
* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
48-
* **Browsers and Operating System** - is this a problem with all browsers?
49-
* **Reproduce the Error** - provide a live example or a unambiguous set of steps
50-
* **Related Issues** - has a similar issue been reported before?
51-
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
52-
causing the problem (line of code or commit)
53-
54-
You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/[organization-name]/[repository-name]/issues/new].
54+
features, by not reporting duplicate issues. Providing the following information
55+
will increase the chances of your issue being dealt with quickly:
56+
57+
- **Overview of the Issue** - if an error is being thrown a non-minified stack
58+
trace helps
59+
- **Version** - what version is affected (e.g. 0.1.2)
60+
- **Motivation for or Use Case** - explain what are you trying to do and why the
61+
current behavior is a bug for you
62+
- **Browsers and Operating System** - is this a problem with all browsers?
63+
- **Reproduce the Error** - provide a live example or a unambiguous set of steps
64+
- **Related Issues** - has a similar issue been reported before?
65+
- **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point
66+
to what might be causing the problem (line of code or commit)
67+
68+
You can file new issues by providing the above information at the corresponding
69+
repository's issues link:
70+
https://github.com/[organization-name]/[repository-name]/issues/new].
5571

5672
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
73+
5774
Before you submit your Pull Request (PR) consider the following guidelines:
5875

59-
* Search the repository (https://github.com/[organization-name]/[repository-name]/pulls) for an open or closed PR
60-
that relates to your submission. You don't want to duplicate effort.
76+
- Search the repository
77+
(https://github.com/[organization-name]/[repository-name]/pulls) for an open
78+
or closed PR that relates to your submission. You don't want to duplicate
79+
effort.
80+
81+
- Make your changes in a new git fork:
6182

62-
* Make your changes in a new git fork:
83+
- Commit your changes using a descriptive commit message
84+
- Push your fork to GitHub:
85+
- In GitHub, create a pull request
86+
- If we suggest changes then:
6387

64-
* Commit your changes using a descriptive commit message
65-
* Push your fork to GitHub:
66-
* In GitHub, create a pull request
67-
* If we suggest changes then:
68-
* Make the required updates.
69-
* Rebase your fork and force push to your GitHub repository (this will update your Pull Request):
88+
- Make the required updates.
89+
- Rebase your fork and force push to your GitHub repository (this will update
90+
your Pull Request):
7091

7192
```shell
7293
git rebase master -i

0 commit comments

Comments
 (0)