@gruncellka/porto-features
v0.2.1
Published
Shared BDD feature files for Porto SDKs
Downloads
439
Maintainers
Readme
Porto Features
Structured feature specifications for Porto SDKs
A validated collection of Gherkin feature files and JSON fixtures that define behavioral contracts for Python and TypeScript SDKs. Files are checked in CI and packaged for distribution on npm and PyPI.
Install
TypeScript / JavaScript (npm, scope: @gruncellka)
pnpm add -D @gruncellka/porto-features
yarn add -D @gruncellka/porto-features
npm install -D @gruncellka/porto-featuresUse this npm package in both TypeScript and JavaScript projects.
Python (PyPI)
pip install "gruncellka-porto-features[dev]"
uv add --dev gruncellka-porto-features
poetry add --group dev gruncellka-porto-featuresThe package includes porto_features/features/*.feature and porto_features/fixtures/**/*.json, so SDK tests can run offline with the same source of truth in both ecosystems.
- Python (PyPI): access files from the installed
porto_featurespackage directory (porto_features/featuresandporto_features/fixtures). - TypeScript / JavaScript (npm): access the same files from the package root (
@gruncellka/porto-features/porto_features/...).
Use cases
SDK contract tests (Python/TypeScript parity), BDD documentation, regression safety during SDK releases.
Validate locally
make setup
make quality
make test-coverageThis runs feature/fixture validation, Gherkin linting, Python lint/format checks, type checks, and test coverage gates used by CI.
Feature statistics
9 feature files; 80+ scenarios across API, CLI, pricing, restrictions, validation, services, and stamp generation. Address fixtures include DE, FR, CH, GB, NO, UA, US, and DE sender origin.
Feature and fixture overview
| File | Description |
| ------------------------------------------ | ----------------------------------- |
| api_comprehensive_testing.feature | End-to-end API behavior scenarios |
| cli.feature | CLI usage and output behavior |
| data_access.feature | Data loading and access behavior |
| pricing.feature | Pricing logic by type/zone/weight |
| resolution.feature | Resolution workflow behavior |
| restrictions.feature | Restrictions and sanctions behavior |
| services.feature | Service catalog behavior |
| stamp_generation.feature | Stamp generation behavior |
| validation.feature | Validation and error behavior |
| porto_features/fixtures/addresses/*.json | Test addresses by country/zone |
Feature files are validated via scripts/validate_features.py, and fixture JSON files are validated via scripts/validate_fixtures.py. Fixtures are shipped for deterministic tests.
Standards
- Feature format: Gherkin (
.feature), Cucumber-compatible - Fixture format: JSON (
.json) - Country codes: ISO 3166-1 alpha-2 (
DE,US,FR,UA)
Disclaimer
This is reference feature specification data for Porto SDKs. Always verify that SDK implementations and runtime behavior match these specifications before shipping to production.
Related resources
🔳 gruncellka
