insideapp-python-sdk 1.30.2__tar.gz
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.
- insideapp_python_sdk-1.30.2/.github/workflows/publish-to-pypi.yml +82 -0
- insideapp_python_sdk-1.30.2/.gitignore +133 -0
- insideapp_python_sdk-1.30.2/CHANGELOG.md +101 -0
- insideapp_python_sdk-1.30.2/LICENSE +21 -0
- insideapp_python_sdk-1.30.2/Makefile +116 -0
- insideapp_python_sdk-1.30.2/PKG-INFO +399 -0
- insideapp_python_sdk-1.30.2/README.md +332 -0
- insideapp_python_sdk-1.30.2/examples/ConfigurareSerii/design_facturi.py +63 -0
- insideapp_python_sdk-1.30.2/examples/ConfigurareSerii/lista_serii.py +50 -0
- insideapp_python_sdk-1.30.2/examples/ConfigurareSerii/serie_adauga.py +71 -0
- insideapp_python_sdk-1.30.2/examples/ConfigurareSerii/serie_modifica.py +72 -0
- insideapp_python_sdk-1.30.2/examples/ConfigurareSerii/serie_sterge.py +48 -0
- insideapp_python_sdk-1.30.2/examples/ConfigurareSerii/serie_sterge_logo.py +47 -0
- insideapp_python_sdk-1.30.2/examples/ConfigurareSerii/serie_vizualizare.py +52 -0
- insideapp_python_sdk-1.30.2/examples/ConturiBancare/adauga.py +54 -0
- insideapp_python_sdk-1.30.2/examples/ConturiBancare/lista.py +61 -0
- insideapp_python_sdk-1.30.2/examples/ConturiBancare/modifica.py +53 -0
- insideapp_python_sdk-1.30.2/examples/ConturiBancare/sterge.py +46 -0
- insideapp_python_sdk-1.30.2/examples/ConturiBancare/vizualizare.py +47 -0
- insideapp_python_sdk-1.30.2/examples/FacturiFiscale/emite_factura_fiscala.py +134 -0
- insideapp_python_sdk-1.30.2/examples/FacturiFiscale/marcheaza_factura_fiscala_incasata.py +50 -0
- insideapp_python_sdk-1.30.2/examples/FacturiFiscale/storneaza_factura_fiscala.py +48 -0
- insideapp_python_sdk-1.30.2/examples/FacturiFiscale/trimite_factura_manual_in_spv.py +49 -0
- insideapp_python_sdk-1.30.2/examples/FacturiFiscale/vizualizare_factura_fiscala.py +57 -0
- insideapp_python_sdk-1.30.2/examples/FacturiFiscale/vizualizare_toate_facturile_fiscale.py +62 -0
- insideapp_python_sdk-1.30.2/examples/FacturiProforme/emite_factura_fiscala_din_proforma.py +53 -0
- insideapp_python_sdk-1.30.2/examples/FacturiProforme/emite_factura_proforma.py +93 -0
- insideapp_python_sdk-1.30.2/examples/FacturiProforme/emite_proforma.py +92 -0
- insideapp_python_sdk-1.30.2/examples/FacturiProforme/vizualizare_factura_proforma.py +55 -0
- insideapp_python_sdk-1.30.2/examples/FacturiProforme/vizualizare_toate_facturile_proforme.py +62 -0
- insideapp_python_sdk-1.30.2/examples/Incasari/vizualizare_incasari.py +58 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorClienti/adauga.py +64 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorClienti/lista.py +70 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorClienti/modifica.py +65 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorClienti/sterge.py +45 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorClienti/vizualizare.py +47 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorProduseServicii/adauga.py +53 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorProduseServicii/lista.py +64 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorProduseServicii/modifica.py +53 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorProduseServicii/sterge.py +46 -0
- insideapp_python_sdk-1.30.2/examples/NomenclatorProduseServicii/vizualizare.py +47 -0
- insideapp_python_sdk-1.30.2/examples/README.md +264 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/eFactura_autorizare_noua.py +55 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/eFactura_autorizari_lista.py +52 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/eFactura_modifica_setarile.py +76 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/eFactura_vizualizare_setari.py +53 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/firma_activeaza.py +49 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/firma_adauga.py +76 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/firma_dezactiveaza.py +50 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/firma_modifica.py +79 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/firma_reset_credentiale_api.py +55 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/firma_vizualizare_credentiale_api.py +53 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/lista_firme.py +50 -0
- insideapp_python_sdk-1.30.2/examples/Reseller/vizualizare_firma.py +55 -0
- insideapp_python_sdk-1.30.2/examples/SPV/descarcare_factura_emisa.py +50 -0
- insideapp_python_sdk-1.30.2/examples/SPV/descarcare_factura_furnizor.py +50 -0
- insideapp_python_sdk-1.30.2/examples/SPV/incarca_factura_xml.py +57 -0
- insideapp_python_sdk-1.30.2/examples/SPV/lista_facturi_emise.py +62 -0
- insideapp_python_sdk-1.30.2/examples/SPV/lista_facturi_furnizori.py +62 -0
- insideapp_python_sdk-1.30.2/examples/SPV/status_trimitere_factura.py +64 -0
- insideapp_python_sdk-1.30.2/examples/SPV/vizualizare_factura_emisa.py +55 -0
- insideapp_python_sdk-1.30.2/examples/SPV/vizualizare_factura_furnizor.py +54 -0
- insideapp_python_sdk-1.30.2/examples/curs_valutar.py +69 -0
- insideapp_python_sdk-1.30.2/examples/example.py +64 -0
- insideapp_python_sdk-1.30.2/examples/info_cif.py +68 -0
- insideapp_python_sdk-1.30.2/examples/info_judete.py +62 -0
- insideapp_python_sdk-1.30.2/examples/info_localitati.py +67 -0
- insideapp_python_sdk-1.30.2/insideapp/__init__.py +34 -0
- insideapp_python_sdk-1.30.2/insideapp/client.py +1040 -0
- insideapp_python_sdk-1.30.2/insideapp/exceptions.py +37 -0
- insideapp_python_sdk-1.30.2/pyproject.toml +115 -0
- insideapp_python_sdk-1.30.2/requirements.txt +12 -0
- insideapp_python_sdk-1.30.2/scripts/build_and_publish.py +150 -0
- insideapp_python_sdk-1.30.2/tests/conftest.py +180 -0
- insideapp_python_sdk-1.30.2/tests/integration/test_api_integration.py +278 -0
- insideapp_python_sdk-1.30.2/tests/unit/test_client.py +289 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Publish Python Package to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Trigger on release creation
|
|
5
|
+
release:
|
|
6
|
+
types: [published]
|
|
7
|
+
|
|
8
|
+
# Allow manual workflow dispatch
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
target:
|
|
12
|
+
description: 'Publish target'
|
|
13
|
+
required: true
|
|
14
|
+
default: 'testpypi'
|
|
15
|
+
type: choice
|
|
16
|
+
options:
|
|
17
|
+
- testpypi
|
|
18
|
+
- pypi
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build-and-publish:
|
|
22
|
+
name: Build and publish to PyPI
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
id-token: write # Required for trusted publishing
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- name: 🛎️ Checkout repository
|
|
31
|
+
uses: actions/checkout@v4
|
|
32
|
+
|
|
33
|
+
- name: 🐍 Set up Python
|
|
34
|
+
uses: actions/setup-python@v4
|
|
35
|
+
with:
|
|
36
|
+
python-version: '3.12'
|
|
37
|
+
|
|
38
|
+
- name: 📦 Install build dependencies
|
|
39
|
+
run: |
|
|
40
|
+
python -m pip install --upgrade pip
|
|
41
|
+
pip install build twine pytest
|
|
42
|
+
|
|
43
|
+
- name: 🧪 Run tests
|
|
44
|
+
run: |
|
|
45
|
+
python -m pytest tests/unit/ -v
|
|
46
|
+
|
|
47
|
+
- name: 🔧 Build package
|
|
48
|
+
run: |
|
|
49
|
+
python -m build
|
|
50
|
+
|
|
51
|
+
- name: 🔍 Check distribution
|
|
52
|
+
run: |
|
|
53
|
+
python -m twine check dist/*
|
|
54
|
+
|
|
55
|
+
- name: 📋 List built packages
|
|
56
|
+
run: |
|
|
57
|
+
ls -la dist/
|
|
58
|
+
|
|
59
|
+
# Publish to Test PyPI (on manual dispatch with testpypi target)
|
|
60
|
+
- name: 🧪 Publish to Test PyPI
|
|
61
|
+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'testpypi'
|
|
62
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
63
|
+
with:
|
|
64
|
+
repository-url: https://test.pypi.org/legacy/
|
|
65
|
+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
66
|
+
|
|
67
|
+
# Publish to PyPI (on release or manual dispatch with pypi target)
|
|
68
|
+
- name: 🚀 Publish to PyPI
|
|
69
|
+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'pypi')
|
|
70
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
71
|
+
with:
|
|
72
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
73
|
+
|
|
74
|
+
- name: ✅ Success notification
|
|
75
|
+
if: success()
|
|
76
|
+
run: |
|
|
77
|
+
echo "🎉 Package successfully published!"
|
|
78
|
+
if [[ "${{ github.event_name }}" == "release" || "${{ github.event.inputs.target }}" == "pypi" ]]; then
|
|
79
|
+
echo "📦 Available at: https://pypi.org/project/insideapp-python-sdk/"
|
|
80
|
+
else
|
|
81
|
+
echo "📦 Available at: https://test.pypi.org/project/insideapp-python-sdk/"
|
|
82
|
+
fi
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
MANIFEST
|
|
27
|
+
|
|
28
|
+
# PyInstaller
|
|
29
|
+
*.manifest
|
|
30
|
+
*.spec
|
|
31
|
+
|
|
32
|
+
# Installer logs
|
|
33
|
+
pip-log.txt
|
|
34
|
+
pip-delete-this-directory.txt
|
|
35
|
+
|
|
36
|
+
# Unit test / coverage reports
|
|
37
|
+
htmlcov/
|
|
38
|
+
.tox/
|
|
39
|
+
.nox/
|
|
40
|
+
.coverage
|
|
41
|
+
.coverage.*
|
|
42
|
+
.cache
|
|
43
|
+
nosetests.xml
|
|
44
|
+
coverage.xml
|
|
45
|
+
*.cover
|
|
46
|
+
.hypothesis/
|
|
47
|
+
.pytest_cache/
|
|
48
|
+
|
|
49
|
+
# Translations
|
|
50
|
+
*.mo
|
|
51
|
+
*.pot
|
|
52
|
+
|
|
53
|
+
# Django stuff:
|
|
54
|
+
*.log
|
|
55
|
+
local_settings.py
|
|
56
|
+
db.sqlite3
|
|
57
|
+
|
|
58
|
+
# Flask stuff:
|
|
59
|
+
instance/
|
|
60
|
+
.webassets-cache
|
|
61
|
+
|
|
62
|
+
# Scrapy stuff:
|
|
63
|
+
.scrapy
|
|
64
|
+
|
|
65
|
+
# Sphinx documentation
|
|
66
|
+
docs/_build/
|
|
67
|
+
|
|
68
|
+
# PyBuilder
|
|
69
|
+
target/
|
|
70
|
+
|
|
71
|
+
# Jupyter Notebook
|
|
72
|
+
.ipynb_checkpoints
|
|
73
|
+
|
|
74
|
+
# IPython
|
|
75
|
+
profile_default/
|
|
76
|
+
ipython_config.py
|
|
77
|
+
|
|
78
|
+
# pyenv
|
|
79
|
+
.python-version
|
|
80
|
+
|
|
81
|
+
# celery beat schedule file
|
|
82
|
+
celerybeat-schedule
|
|
83
|
+
|
|
84
|
+
# SageMath parsed files
|
|
85
|
+
*.sage.py
|
|
86
|
+
|
|
87
|
+
# Environments
|
|
88
|
+
.env
|
|
89
|
+
.venv
|
|
90
|
+
env/
|
|
91
|
+
venv/
|
|
92
|
+
ENV/
|
|
93
|
+
env.bak/
|
|
94
|
+
venv.bak/
|
|
95
|
+
|
|
96
|
+
# Spyder project settings
|
|
97
|
+
.spyderproject
|
|
98
|
+
.spyproject
|
|
99
|
+
|
|
100
|
+
# Rope project settings
|
|
101
|
+
.ropeproject
|
|
102
|
+
|
|
103
|
+
# mkdocs documentation
|
|
104
|
+
/site
|
|
105
|
+
|
|
106
|
+
# mypy
|
|
107
|
+
.mypy_cache/
|
|
108
|
+
.dmypy.json
|
|
109
|
+
dmypy.json
|
|
110
|
+
|
|
111
|
+
# Pyre type checker
|
|
112
|
+
.pyre/
|
|
113
|
+
|
|
114
|
+
# IDE files
|
|
115
|
+
.vscode/
|
|
116
|
+
.idea/
|
|
117
|
+
*.swp
|
|
118
|
+
*.swo
|
|
119
|
+
*~
|
|
120
|
+
|
|
121
|
+
# macOS
|
|
122
|
+
.DS_Store
|
|
123
|
+
|
|
124
|
+
# Windows
|
|
125
|
+
Thumbs.db
|
|
126
|
+
ehthumbs.db
|
|
127
|
+
Desktop.ini
|
|
128
|
+
|
|
129
|
+
# Test credentials and sensitive files
|
|
130
|
+
.test_credentials
|
|
131
|
+
*.key
|
|
132
|
+
*.pem
|
|
133
|
+
.secrets
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.30.2] - 2024-02-24
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- 🐍 **Initial Python SDK Release**: Complete 1:1 port from PHP SDK
|
|
14
|
+
- 🌍 **Geographic Information Methods**:
|
|
15
|
+
- `info_judete()` - Complete list of Romanian counties (42 counties)
|
|
16
|
+
- `info_localitati(judet)` - Localities for specific county code
|
|
17
|
+
- 📋 **Complete Invoice Management**:
|
|
18
|
+
- Proforma invoices: `emite_proforma()`, `view_proforma()`, `factureaza_proforma()`
|
|
19
|
+
- Fiscal invoices: `emite_factura()`, `view_factura()`, `incaseaza_factura()`, `storneaza_factura()`
|
|
20
|
+
- Receipts: `emite_chitanta()`, `view_chitanta()`, `anuleaza_chitanta()`
|
|
21
|
+
- 🏛️ **Full SPV/eFactura Integration**:
|
|
22
|
+
- `e_factura_emise()`, `e_factura_furnizori()` - Lists from Private Virtual Space
|
|
23
|
+
- `e_factura_upload_xml()`, `e_factura_upload_status()` - XML upload to ANAF
|
|
24
|
+
- `e_factura_descarca_emise()`, `e_factura_descarca_furnizori()` - PDF downloads
|
|
25
|
+
- 👥 **Complete Data Management**:
|
|
26
|
+
- Clients: `clienti_lista()`, `clienti_adauga()`, `clienti_modifica()`, `clienti_sterge()`
|
|
27
|
+
- Products/Services: `produse_lista()`, `produse_adauga()`, `produse_modifica()`
|
|
28
|
+
- Bank Accounts: `conturi_bancare_lista()`, `conturi_bancare_adauga()`
|
|
29
|
+
- Series Configuration: `serie_lista()`, `serie_adauga()`, `serie_design()`
|
|
30
|
+
- 🏢 **Reseller API Support**:
|
|
31
|
+
- Company management: `firma_lista()`, `firma_adauga()`, `firma_activeaza()`
|
|
32
|
+
- API credentials: `firma_api()`, `firma_api_reset()`
|
|
33
|
+
- eFactura settings: `e_factura_vizualizare_setari()`, `e_factura_modifica_setarile()`
|
|
34
|
+
- 🔧 **Utility Functions**:
|
|
35
|
+
- `curs_valutar()` - Current exchange rates
|
|
36
|
+
- `info_cif(cif)` - CIF validation and company information
|
|
37
|
+
- 📝 **Comprehensive Examples**:
|
|
38
|
+
- Complete examples for all major functionalities
|
|
39
|
+
- Real API response structures documented
|
|
40
|
+
- Error handling demonstrations
|
|
41
|
+
- 🧪 **Testing Infrastructure**:
|
|
42
|
+
- Unit tests with 100% method coverage
|
|
43
|
+
- Integration tests with real API validation
|
|
44
|
+
- Performance tests with response time monitoring
|
|
45
|
+
- Mock fixtures for development
|
|
46
|
+
|
|
47
|
+
### Technical
|
|
48
|
+
- 🎯 **Python 3.8+ Support**: Modern Python type hints and async compatibility
|
|
49
|
+
- 📦 **PyPI Ready**: Professional packaging with pyproject.toml
|
|
50
|
+
- 🔒 **Structured Exception Handling**: Custom exception hierarchy
|
|
51
|
+
- `InsideAppAPIError`, `InsideAppAuthError`, `InsideAppTimeoutError`
|
|
52
|
+
- 🚀 **Performance Optimized**:
|
|
53
|
+
- Response times < 300ms for geographic methods
|
|
54
|
+
- HTTP session pooling and connection reuse
|
|
55
|
+
- Automatic timeout and retry handling
|
|
56
|
+
- 📊 **Type Safety**: Full type hints for IDE support and code quality
|
|
57
|
+
- 🛠️ **Development Tools**: Black formatting, flake8 linting, mypy type checking
|
|
58
|
+
|
|
59
|
+
### Developer Experience
|
|
60
|
+
- 📖 **Complete Documentation**: README with examples and API coverage
|
|
61
|
+
- 🎮 **Easy Testing**: Environment variable configuration
|
|
62
|
+
- 🔄 **1:1 PHP Parity**: Identical functionality and response structures
|
|
63
|
+
- 📱 **IDE Support**: IntelliSense and autocomplete for all methods
|
|
64
|
+
- 🐛 **Comprehensive Error Messages**: Detailed error context and debugging info
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Migration from PHP SDK
|
|
69
|
+
|
|
70
|
+
This Python SDK maintains complete compatibility with the PHP SDK:
|
|
71
|
+
|
|
72
|
+
### Method Naming Convention
|
|
73
|
+
- PHP `camelCase` → Python `snake_case`
|
|
74
|
+
- Same parameters and response structures
|
|
75
|
+
- Identical API endpoints and functionality
|
|
76
|
+
|
|
77
|
+
### Examples
|
|
78
|
+
- PHP: `$client->emiteFactura($data)`
|
|
79
|
+
- Python: `client.emite_factura(data)`
|
|
80
|
+
|
|
81
|
+
### Error Handling
|
|
82
|
+
- PHP: Generic exceptions
|
|
83
|
+
- Python: Structured exception hierarchy with context
|
|
84
|
+
|
|
85
|
+
### Performance
|
|
86
|
+
- Similar response times to PHP SDK
|
|
87
|
+
- Enhanced connection pooling in Python
|
|
88
|
+
- Better async compatibility for future versions
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Links
|
|
93
|
+
|
|
94
|
+
- [Repository GitHub](https://github.com/AninuApps/InsideApp-Python)
|
|
95
|
+
- [PyPI Package](https://pypi.org/project/insideapp-python-sdk/)
|
|
96
|
+
- [Documentation](https://doc.iapp.ro)
|
|
97
|
+
- [Support](mailto:support@iapp.ro)
|
|
98
|
+
- [PHP SDK (Original)](https://github.com/AninuApps/InsideApp-PHP)
|
|
99
|
+
|
|
100
|
+
[Unreleased]: https://github.com/AninuApps/InsideApp-Python/compare/v1.30.2...HEAD
|
|
101
|
+
[1.30.2]: https://github.com/AninuApps/InsideApp-Python/releases/tag/v1.30.2
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 InsideApp
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
.PHONY: install test test-unit test-integration lint format type-check build clean help
|
|
2
|
+
|
|
3
|
+
# Variables
|
|
4
|
+
PYTHON := python3
|
|
5
|
+
PIP := pip3
|
|
6
|
+
PYTEST := pytest
|
|
7
|
+
|
|
8
|
+
help: ## Show this help message
|
|
9
|
+
@echo "InsideApp Python SDK - Development Commands"
|
|
10
|
+
@echo "=========================================="
|
|
11
|
+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
|
12
|
+
|
|
13
|
+
install: ## Install package in development mode
|
|
14
|
+
$(PIP) install -e .
|
|
15
|
+
|
|
16
|
+
install-dev: ## Install with development dependencies
|
|
17
|
+
$(PIP) install -e .[dev]
|
|
18
|
+
|
|
19
|
+
install-test: ## Install with test dependencies
|
|
20
|
+
$(PIP) install -e .[test]
|
|
21
|
+
|
|
22
|
+
test: ## Run all tests
|
|
23
|
+
$(PYTEST) tests/ -v
|
|
24
|
+
|
|
25
|
+
test-unit: ## Run unit tests only
|
|
26
|
+
$(PYTEST) tests/unit/ -v
|
|
27
|
+
|
|
28
|
+
test-integration: ## Run integration tests (requires credentials)
|
|
29
|
+
$(PYTEST) tests/integration/ -v -m integration
|
|
30
|
+
|
|
31
|
+
test-coverage: ## Run tests with coverage report
|
|
32
|
+
$(PYTEST) tests/ --cov=insideapp --cov-report=html --cov-report=term
|
|
33
|
+
|
|
34
|
+
test-verbose: ## Run tests with detailed output
|
|
35
|
+
$(PYTEST) tests/ -v -s --tb=long
|
|
36
|
+
|
|
37
|
+
lint: ## Run flake8 linting
|
|
38
|
+
flake8 insideapp/ tests/ examples/
|
|
39
|
+
|
|
40
|
+
format: ## Format code with black
|
|
41
|
+
black insideapp/ tests/ examples/
|
|
42
|
+
|
|
43
|
+
format-check: ## Check code formatting
|
|
44
|
+
black --check insideapp/ tests/ examples/
|
|
45
|
+
|
|
46
|
+
type-check: ## Run type checking with mypy
|
|
47
|
+
mypy insideapp/
|
|
48
|
+
|
|
49
|
+
quality: lint format-check type-check ## Run all quality checks
|
|
50
|
+
|
|
51
|
+
build: clean ## Build package for distribution
|
|
52
|
+
$(PYTHON) -m build
|
|
53
|
+
|
|
54
|
+
build-check: ## Check built package
|
|
55
|
+
twine check dist/*
|
|
56
|
+
|
|
57
|
+
upload-test: build ## Upload to Test PyPI
|
|
58
|
+
twine upload --repository testpypi dist/*
|
|
59
|
+
|
|
60
|
+
upload-prod: build ## Upload to Production PyPI
|
|
61
|
+
twine upload dist/*
|
|
62
|
+
|
|
63
|
+
clean: ## Clean build artifacts
|
|
64
|
+
rm -rf build/
|
|
65
|
+
rm -rf dist/
|
|
66
|
+
rm -rf *.egg-info/
|
|
67
|
+
rm -rf .pytest_cache/
|
|
68
|
+
rm -rf htmlcov/
|
|
69
|
+
find . -type d -name __pycache__ -delete
|
|
70
|
+
find . -type f -name "*.pyc" -delete
|
|
71
|
+
|
|
72
|
+
docs: ## Generate documentation (if using sphinx)
|
|
73
|
+
cd docs && make html
|
|
74
|
+
|
|
75
|
+
example-basic: ## Run basic examples
|
|
76
|
+
cd examples && $(PYTHON) curs_valutar.py
|
|
77
|
+
cd examples && $(PYTHON) info_judete.py
|
|
78
|
+
|
|
79
|
+
example-invoice: ## Run invoice example
|
|
80
|
+
cd examples/FacturiFiscale && $(PYTHON) emite_factura_fiscala.py
|
|
81
|
+
|
|
82
|
+
dev-setup: install-dev ## Complete development setup
|
|
83
|
+
pre-commit install
|
|
84
|
+
|
|
85
|
+
release-check: quality test build-check ## Run all checks before release
|
|
86
|
+
@echo "✅ All checks passed! Ready for release."
|
|
87
|
+
|
|
88
|
+
# Environment setup for integration tests
|
|
89
|
+
test-env:
|
|
90
|
+
@echo "Set these environment variables for integration tests:"
|
|
91
|
+
@echo "export INSIDEAPP_TEST_USERNAME='your_username'"
|
|
92
|
+
@echo "export INSIDEAPP_TEST_PASSWORD='your_password'"
|
|
93
|
+
@echo "export INSIDEAPP_TEST_EMAIL='your@email.com'"
|
|
94
|
+
@echo "export INSIDEAPP_INTEGRATION_TESTS=true"
|
|
95
|
+
|
|
96
|
+
# Quick development workflow
|
|
97
|
+
dev: format lint test-unit ## Quick development workflow
|
|
98
|
+
|
|
99
|
+
# Full CI/CD workflow
|
|
100
|
+
ci: quality test build-check ## Full CI/CD pipeline
|
|
101
|
+
|
|
102
|
+
# Package information
|
|
103
|
+
info: ## Show package information
|
|
104
|
+
@echo "Package: insideapp-python-sdk"
|
|
105
|
+
@echo "Version: 1.30.2"
|
|
106
|
+
@echo "Python: $(shell $(PYTHON) --version)"
|
|
107
|
+
@echo "Pytest: $(shell $(PYTEST) --version)"
|
|
108
|
+
@echo "Location: $(shell pwd)"
|
|
109
|
+
|
|
110
|
+
# Virtual environment helpers
|
|
111
|
+
venv: ## Create virtual environment
|
|
112
|
+
$(PYTHON) -m venv venv
|
|
113
|
+
@echo "Activate with: source venv/bin/activate"
|
|
114
|
+
|
|
115
|
+
venv-activate: ## Show activation command
|
|
116
|
+
@echo "source venv/bin/activate"
|