Skip to content

Commit a03fb59

Browse files
committed
docs: update README, add py.typed, prepare for PyPI release
Rewrote README for assertpy2 with new badges, "What's new" section, and updated examples. Added py.typed marker, PyPI publish workflow, fixed CI branch trigger.
1 parent c4553cb commit a03fb59

7 files changed

Lines changed: 118 additions & 79 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
pull_request:
7-
branches: [master]
7+
branches: [main]
88

99
jobs:
1010
test:

‎.github/workflows/publish.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
environment: pypi
11+
permissions:
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v6
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.14"
23+
24+
- name: Build
25+
run: uv build
26+
27+
- name: Publish to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ dist
2020
# mac
2121
.DS_Store
2222

23+
# venv
24+
.venv
25+
2326
# IDE
2427
/.idea
2528
.vscode

‎CONTRIBUTING.md‎

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,22 @@
11
# Contributing
22

3-
Any contributions of docs or tests or code would be awesome.
4-
5-
Here's how:
3+
Contributions of docs, tests, or code are welcome.
64

75
1. Fork it
86
1. Clone your fork (`git clone https://my_fork`)
97
1. Create a branch (`git checkout -b my_branch`)
108
1. Commit your changes (`git commit -am "added some cool feature"`)
119
1. Push your branch to your fork (`git push origin my_branch`)
12-
1. Open a [Pull Request](http://github.com/assertpy/assertpy/pulls)
10+
1. Open a [Pull Request](http://github.com/Solganis/assertpy2/pulls)
1311
1. Respond to any questions during our review process
1412

1513
Read more about how pulls work on GitHub's [About pull requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) page.
1614

1715
## Running the Tests
1816

19-
Before even thinking about sending us a pull request, you must first write some tests (and
20-
eat some dogfood by using `assertpy` assertions in any tests you write).
21-
22-
Our favorite python test runner is [pytest](http://pytest.org/). To run all the
23-
tests, just execute `py.test` in the base project folder (above the `tests/` folder)
24-
like this:
25-
26-
```
27-
PYTHONPATH=. py.test -v tests
28-
```
29-
30-
Should produce output something like this:
17+
Before sending a pull request, write tests (and use `assertpy2` assertions in them).
3118

3219
```
33-
===== test session starts =====
34-
collected 589 items
35-
36-
tests/test_bool.py::test_is_true PASSED
37-
..
38-
tests/test_warn.py::test_failures PASSED
39-
40-
===== 589 passed in 1.91s =====
20+
uv sync
21+
uv run pytest -v
4122
```

0 commit comments

Comments
 (0)