@gruncellka/porto-data 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +131 -0
- package/LICENSE +2 -2
- package/README.md +10 -4
- package/package.json +7 -1
- package/porto_data/metadata.json +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.3.1]]
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Package metadata for PyPI/npm was expanded for better registry indexing and discoverability:
|
|
10
|
+
- PyPI: explicit `license` file mapping, MIT classifier, project URLs, and changelog URL in `pyproject.toml`.
|
|
11
|
+
- npm: added `author`, `homepage`, `bugs`, and included `CHANGELOG.md` in published `files`.
|
|
12
|
+
- `bump2version` auto-tagging is disabled (`tag = False`) to avoid creating tags from release branches; tags are now intended to be created manually on `main`.
|
|
13
|
+
- MIT `LICENSE` text was normalized to canonical ASCII quotes for tool/scanner compatibility.
|
|
14
|
+
|
|
15
|
+
## [0.3.0] - 2026-03-06
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **BREAKING**: Python baseline is now **3.13+** (`requires-python >=3.13`).
|
|
20
|
+
- **Tooling**: Ruff/MyPy targets are aligned to Python **3.13**.
|
|
21
|
+
- **npm runtime**: minimum Node.js is now **>=20** via `engines.node`.
|
|
22
|
+
- **TypeScript**: development/build baseline is now pinned to **5.9.x** (`~5.9.3`).
|
|
23
|
+
- **Pre-commit**: Ruff hook updated to a modern version that supports `py313`.
|
|
24
|
+
|
|
25
|
+
## [0.2.1] - 2026-03-01
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **npm**: `index.js` (main entry) and `index.d.ts` (TypeScript types) so the package has a valid entry point and typed exports; fixes registry EntryPointError.
|
|
30
|
+
- **PyPI**: `porto_data` package now exposes `metadata`, `__version__`, and `get_package_root()`; added `py.typed` (PEP 561) for type checkers.
|
|
31
|
+
- **Pre-publish test**: `tests/test_publish.sh` packs the npm tarball and builds the PyPI wheel, installs both and verifies imports; run via `make test-publish` or in the publish workflow.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- **Publish workflow**: Validate job now sets up Node.js and runs `tests/test_publish.sh` before build; publish is rejected if the test fails.
|
|
36
|
+
- **npm**: `.npmignore` documents exclusions; package contents remain controlled by `package.json` `files` (no Python in the npm package).
|
|
37
|
+
|
|
38
|
+
## [0.2.0] - 2026-02-28
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **What we publish**: Both npm and PyPI packages now ship only data (JSON + schemas). No CLI or tools in the published packages; use the repo for validation.
|
|
43
|
+
- **npm**: Publish uses Trusted Publishing (OIDC). No `NPM_TOKEN` secret; Node 22 and `--provenance` in CI.
|
|
44
|
+
- **Re-publish**: Manual workflow run lets you choose target `both`, `npm`, or `pypi` (e.g. re-publish only PyPI after a failure).
|
|
45
|
+
- **Versioning**: bump2version creates tag `v{new_version}` so the release workflow runs on tag push.
|
|
46
|
+
|
|
47
|
+
## [0.1.0] - 2025-12-21
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- Unified `porto` CLI command (replaces standalone Python scripts)
|
|
52
|
+
- New CLI subcommands:
|
|
53
|
+
- `porto validate` - Validate JSON schemas and data links
|
|
54
|
+
- `porto validate --type schema` - Validate JSON against schemas
|
|
55
|
+
- `porto validate --type links` - Validate data_links.json consistency
|
|
56
|
+
- `porto validate --type links --analyze` - Detailed links analysis
|
|
57
|
+
- `porto metadata` - Generate metadata.json with checksums
|
|
58
|
+
- Comprehensive test suite (107 tests, 87% coverage)
|
|
59
|
+
- Codecov integration for coverage tracking
|
|
60
|
+
- Test coverage reporting in CI/CD pipeline
|
|
61
|
+
- `scripts/validators/` package with modular validation architecture
|
|
62
|
+
- `scripts/data_files.py` - Centralized data file management
|
|
63
|
+
- Type-safe validation results with `ValidationResults` TypedDict
|
|
64
|
+
- Shared validation helpers in `scripts/validators/helpers.py`
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
|
|
68
|
+
- **BREAKING**: All imports now use proper `scripts.*` package paths
|
|
69
|
+
- Old: `from validators.links import ...`
|
|
70
|
+
- New: `from scripts.validators.links import ...`
|
|
71
|
+
- Refactored validation logic into organized modules:
|
|
72
|
+
- `scripts/validators/schema.py` - JSON schema validation
|
|
73
|
+
- `scripts/validators/links.py` - Data links validation
|
|
74
|
+
- `scripts/validators/base.py` - Type definitions
|
|
75
|
+
- Removed `sys.path` hacks in favor of proper package imports (full IDE support)
|
|
76
|
+
- Pre-commit hooks now format test files (`tests/`) and `metadata.json`
|
|
77
|
+
- Improved error messages and validation output
|
|
78
|
+
- CLI version now reads from package metadata (single source of truth)
|
|
79
|
+
|
|
80
|
+
### Technical
|
|
81
|
+
|
|
82
|
+
- Modular validation architecture with clear separation of concerns
|
|
83
|
+
- All imports resolvable by IDEs (syntax highlighting works)
|
|
84
|
+
- Removed E402 lint exceptions (no longer needed)
|
|
85
|
+
- Updated type checking to include both `scripts/` and `cli/` directories
|
|
86
|
+
- Centralized path constants in `scripts/data_files.py`
|
|
87
|
+
- Fail-fast validation of required entities at import time
|
|
88
|
+
- Improved test fixtures and utilities in `tests/conftest.py`
|
|
89
|
+
|
|
90
|
+
### Fixed
|
|
91
|
+
|
|
92
|
+
- IDE syntax highlighting for all imports
|
|
93
|
+
- Type checking errors with proper package imports
|
|
94
|
+
- Pre-commit hooks now catch formatting issues in test files
|
|
95
|
+
- `metadata.json` now automatically formatted on commit
|
|
96
|
+
|
|
97
|
+
## [0.0.1] - 2025-10-22
|
|
98
|
+
|
|
99
|
+
### Added
|
|
100
|
+
|
|
101
|
+
- Initial release of Porto Data v0.0.1
|
|
102
|
+
- 9 JSON data files with comprehensive Deutsche Post shipping data
|
|
103
|
+
- Complete JSON schemas for all data files
|
|
104
|
+
- Automated validation and quality checks
|
|
105
|
+
- GitHub Actions CI/CD workflow
|
|
106
|
+
- Pre-commit hooks for code quality
|
|
107
|
+
- Documentation and examples
|
|
108
|
+
|
|
109
|
+
### Data Files
|
|
110
|
+
|
|
111
|
+
- `products.json` - Shipping products (letters, merchandise)
|
|
112
|
+
- `services.json` - Additional services (registered mail, insurance)
|
|
113
|
+
- `prices.json` - Pricing tables by product, zone, and weight
|
|
114
|
+
- `zones.json` - Geographic zones and country mappings
|
|
115
|
+
- `weight_tiers.json` - Weight brackets for pricing
|
|
116
|
+
- `dimensions.json` - Size limits and specifications
|
|
117
|
+
- `restrictions.json` - Shipping restrictions and compliance frameworks
|
|
118
|
+
- `features.json` - Service features with German/English names
|
|
119
|
+
- `data_links.json` - Cross-references between data files
|
|
120
|
+
|
|
121
|
+
### Technical
|
|
122
|
+
|
|
123
|
+
- Python 3.11+ support
|
|
124
|
+
- JSON schema validation
|
|
125
|
+
- Automated metadata generation with checksums
|
|
126
|
+
- Ruff
|
|
127
|
+
- MyPy
|
|
128
|
+
|
|
129
|
+
### Fixed
|
|
130
|
+
|
|
131
|
+
- MyPy type checking issues
|
package/LICENSE
CHANGED
|
@@ -2,8 +2,8 @@ MIT License
|
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2025 gruncellka
|
|
4
4
|
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
|
7
7
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
8
|
|
|
9
|
-
THE SOFTWARE IS PROVIDED
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -11,22 +11,28 @@ A comprehensive, schema-validated dataset containing Deutsche Post pricing, rest
|
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
|
-
**npm
|
|
14
|
+
**TypeScript / JavaScript (npm, scope: `@gruncellka`)**
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
+
pnpm add @gruncellka/porto-data
|
|
18
|
+
yarn add @gruncellka/porto-data
|
|
17
19
|
npm install @gruncellka/porto-data
|
|
18
20
|
```
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
Use this npm package in both TypeScript and JavaScript projects.
|
|
23
|
+
|
|
24
|
+
**Python (PyPI)**
|
|
21
25
|
|
|
22
26
|
```bash
|
|
23
27
|
pip install gruncellka-porto-data
|
|
28
|
+
uv add gruncellka-porto-data
|
|
29
|
+
poetry add gruncellka-porto-data
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
The package includes `data/`, `schemas/`, `mappings.json`, and `metadata.json` so you can validate and use the data offline. Data files reference canonical schema URLs (GitHub); schemas are shipped in the package for local validation.
|
|
27
33
|
|
|
28
|
-
- **PyPI**:
|
|
29
|
-
- **npm**:
|
|
34
|
+
- **Python (PyPI)**: import `porto_data` and access packaged files under `porto_data/` (`data/`, `schemas/`, `mappings.json`, `metadata.json`).
|
|
35
|
+
- **TypeScript / JavaScript (npm)**: data lives under `porto_data/` (for example `porto_data/data/products.json`, `porto_data/schemas/`, `porto_data/mappings.json`, `porto_data/metadata.json`).
|
|
30
36
|
|
|
31
37
|
---
|
|
32
38
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gruncellka/porto-data",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Deutsche Post pricing and rules data with schema validation",
|
|
5
|
+
"author": "gruncellka",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
9
|
"url": "https://github.com/gruncellka/porto-data.git"
|
|
9
10
|
},
|
|
11
|
+
"homepage": "https://github.com/gruncellka/porto-data",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/gruncellka/porto-data/issues"
|
|
14
|
+
},
|
|
10
15
|
"keywords": [
|
|
11
16
|
"deutsche-post",
|
|
12
17
|
"shipping",
|
|
@@ -23,6 +28,7 @@
|
|
|
23
28
|
"porto_data/mappings.json",
|
|
24
29
|
"porto_data/metadata.json",
|
|
25
30
|
"README.md",
|
|
31
|
+
"CHANGELOG.md",
|
|
26
32
|
"LICENSE",
|
|
27
33
|
"index.js",
|
|
28
34
|
"index.d.ts"
|
package/porto_data/metadata.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"project": {
|
|
3
3
|
"name": "gruncellka-porto-data",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "Deutsche Post pricing and rules data with schema validation"
|
|
6
6
|
},
|
|
7
|
-
"generated_at": "2026-03-
|
|
7
|
+
"generated_at": "2026-03-12T07:45:47.468116Z",
|
|
8
8
|
"entities": {
|
|
9
9
|
"products": {
|
|
10
10
|
"data": {
|