Skip to content

Commit 53b6c25

Browse files
authored
Merge pull request #4 from vlymar1/release/v1.0.0
Release v1.0.0 — core refactor, docs and packaging
2 parents 829ee88 + a7365f7 commit 53b6c25

56 files changed

Lines changed: 2676 additions & 1554 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,16 @@ jobs:
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222

23-
- name: Install dependencies
23+
- name: Install hatch and create env
2424
run: |
2525
python -m pip install --upgrade pip
26-
pip install poetry
27-
poetry config virtualenvs.create false
28-
poetry install --no-interaction --no-ansi --no-root
26+
pip install hatch
2927
3028
- name: Run linting
31-
run: poetry run ruff check . --output-format=github
29+
run: hatch run lint
3230

3331
- name: Run type check
34-
run: poetry run mypy vinted_api_kit/
32+
run: hatch run type-check
3533

3634
- name: Run tests (no coverage)
37-
run: poetry run pytest -v --tb=short
35+
run: hatch run test

.github/workflows/coverage.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
pip install poetry
24-
poetry config virtualenvs.create false
25-
poetry install --no-interaction --no-ansi --no-root
23+
pip install hatch
2624
2725
- name: Run tests with coverage
28-
run: poetry run pytest --cov=vinted_api_kit --cov-branch --cov-report=xml
26+
run: hatch run pytest --cov=vinted --cov-branch --cov-report=xml
2927

3028
- name: Upload results to Codecov
3129
uses: codecov/codecov-action@v5

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,7 @@ __marimo__/
212212
dev/
213213
reports/
214214

215-
cookies*.pk
215+
cookies*.*
216+
217+
# MacOS
218+
.DS_Store

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@ repos:
1919
- --fix
2020
- id: ruff-format
2121
types: [python]
22+
23+
- repo: https://github.com/pre-commit/mirrors-mypy
24+
rev: v1.13.0
25+
hooks:
26+
- id: mypy
27+
additional_dependencies: [curl-cffi]

CHANGELOG.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11-
- User profile retrieval functionality
12-
- Support for fetching user's own items
13-
- Enhanced error handling for network timeouts
11+
12+
13+
### Changed
14+
15+
16+
### Fixed
17+
18+
19+
20+
## [1.0.0] - 2026-01-05
21+
22+
### Added
23+
- Multiple cookie storage backends: `json`, `mozilla`, and `pickle`
24+
- Dataclass-based models (`CatalogItem`, `DetailedItem`) for performance and clarity
25+
- Custom exception hierarchy to surface network, auth, and validation errors distinctly
26+
- Automatic locale detection from target Vinted URLs
27+
- `SortOrder` and `StorageFormat` type literals for improved typing
28+
29+
### Changed
30+
- Refactored architecture: separated `api/`, `storage/`, and `models/` layers for better maintainability
31+
- Default cookie storage format changed to `json` for security hardening
32+
- SSL verification enabled by default for all HTTP requests
33+
- Proxy configuration simplified to a single string parameter (`proxy="user:pass@host:port"`)
34+
- Cookie persistence now uses strategy pattern
35+
36+
### Fixed
37+
- JWT token expiration parsing (base64url padding handling)
38+
- Retry/logging behavior for authentication failures
39+
- Cookie persistence reliability
40+
- Proxy handling edge cases
41+
- Token expiration detection accuracy
1442

1543
## [0.1.0.post1] - 2025-08-07
1644

@@ -35,6 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3563
- CI/CD pipeline with GitHub Actions
3664
- 80%+ test coverage
3765

38-
[Unreleased]: https://github.com/vlymar-dev/vinted-api-kit/compare/v0.1.0...HEAD
39-
[0.1.0.post1]: https://github.com/vlymar-dev/vinted-api-kit/compare/v0.1.0...v0.1.0.post1
40-
[0.1.0]: https://github.com/vlymar-dev/vinted-api-kit/releases/tag/v0.1.0
66+
[Unreleased]: https://github.com/vlymar1/vinted-api-kit/compare/v1.0.0...HEAD
67+
[1.0.0]: https://github.com/vlymar1/vinted-api-kit/compare/v0.1.0...v1.0.0
68+
[0.1.0.post1]: https://github.com/vlymar1/vinted-api-kit/compare/v0.1.0...v0.1.0.post1
69+
[0.1.0]: https://github.com/vlymar1/vinted-api-kit/releases/tag/v0.1.0

LICENSE

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+
23+
DISCLAIMER:
24+
This software is intended for personal and lawful use only.
25+
The authors and copyright holders are not responsible for any misuse of the
26+
software, including but not limited to violations of applicable laws,
27+
regulations, or terms of service of third-party platforms.

Makefile

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,91 @@
1-
package_dir := vinted_api_kit
1+
package_dir := vinted
22
tests_dir := tests
33
reports_dir := reports
44

55
# ===========
66
# Environment
77
# ===========
8-
98
.PHONY: clean
109
clean:
1110
rm -rf `find . -name __pycache__`
12-
rm -f `find . -type f -name '*.py[co]' `
13-
rm -f `find . -type f -name '*~' `
14-
rm -f `find . -type f -name '.*~' `
11+
rm -f `find . -type f -name '*.py[co]'`
12+
rm -f `find . -type f -name '*~'`
13+
rm -f `find . -type f -name '.*~'`
1514
rm -rf `find . -name .pytest_cache`
1615
rm -rf *.egg-info
1716
rm -f report.html
1817
rm -f .coverage
19-
rm -rf {build,dist,.cache,.mypy_cache,.ruff_cache,reports,.tox}
18+
rm -rf {build,dist,.cache,.mypy_cache,.ruff_cache,.hatch,reports,.tox}
19+
rm -rf htmlcov/
20+
21+
22+
# ===========
23+
# Development
24+
# ===========
25+
.PHONY: install
26+
install:
27+
pip install hatch
28+
29+
.PHONY: install-dev
30+
install-dev:
31+
hatch env create
32+
2033

2134
# ============
2235
# Code quality
2336
# ============
37+
.PHONY: lint
38+
lint:
39+
hatch run lint
2440

2541
.PHONY: lint-check
2642
lint-check:
27-
ruff check $(package_dir)
28-
mypy $(package_dir)
43+
hatch run ruff check $(package_dir)
44+
hatch run mypy $(package_dir)
2945

30-
.PHONY: lint-reformat
31-
lint-reformat:
32-
ruff check --fix $(package_dir)
33-
ruff format $(package_dir)
46+
.PHONY: format
47+
format:
48+
hatch run format
49+
50+
.PHONY: type-check
51+
type-check:
52+
hatch run type-check
3453

3554
# ======
3655
# Tests
3756
# ======
38-
.PHONY: test-coverage
57+
.PHONY: test
58+
test:
59+
hatch run test
60+
61+
.PHONY: test-cov
3962
test-coverage:
4063
mkdir -p $(reports_dir)/tests/
41-
pytest --cov=vinted_api_kit --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/
42-
coverage html -d $(reports_dir)/coverage
64+
hatch run pytest --cov=$(package_dir) --cov-report=html:$(reports_dir)/coverage --cov-report=term-missing --html=$(reports_dir)/tests/index.html $(tests_dir)
4365

4466
.PHONY: test-coverage-view
45-
test-coverage-view:
46-
coverage html -d $(reports_dir)/coverage
47-
python -c "import webbrowser; webbrowser.open('file://$(shell pwd)/reports/coverage/index.html')"
67+
test-coverage-view: test-coverage
68+
python -c "import webbrowser; webbrowser.open('file://$(shell pwd)/$(reports_dir)/coverage/index.html')"
69+
70+
71+
# =====
72+
# Build
73+
# =====
74+
.PHONY: build
75+
build: clean
76+
hatch build
77+
78+
.PHONY: publish
79+
publish: build
80+
hatch publish
81+
82+
.PHONY: publish-test
83+
publish-test: build
84+
hatch publish -r test
85+
86+
# ===
87+
# All
88+
# ===
89+
.PHONY: all
90+
all:
91+
hatch run all

0 commit comments

Comments
 (0)