pyspark-fluvius 0.1.0__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.
Files changed (30) hide show
  1. pyspark_fluvius-0.1.0/.github/workflows/publish.yml +45 -0
  2. pyspark_fluvius-0.1.0/.github/workflows/test.yml +26 -0
  3. pyspark_fluvius-0.1.0/.gitignore +145 -0
  4. pyspark_fluvius-0.1.0/LICENSE +661 -0
  5. pyspark_fluvius-0.1.0/PKG-INFO +203 -0
  6. pyspark_fluvius-0.1.0/README.md +175 -0
  7. pyspark_fluvius-0.1.0/examples/sample_production.py +239 -0
  8. pyspark_fluvius-0.1.0/examples/sample_sandbox.py +202 -0
  9. pyspark_fluvius-0.1.0/pyproject.toml +63 -0
  10. pyspark_fluvius-0.1.0/src/pyspark_fluvius/__init__.py +71 -0
  11. pyspark_fluvius-0.1.0/src/pyspark_fluvius/converters/__init__.py +6 -0
  12. pyspark_fluvius-0.1.0/src/pyspark_fluvius/converters/energy_converter.py +427 -0
  13. pyspark_fluvius-0.1.0/src/pyspark_fluvius/converters/mandates_converter.py +52 -0
  14. pyspark_fluvius-0.1.0/src/pyspark_fluvius/datasources/__init__.py +6 -0
  15. pyspark_fluvius-0.1.0/src/pyspark_fluvius/datasources/energy.py +100 -0
  16. pyspark_fluvius-0.1.0/src/pyspark_fluvius/datasources/mandates.py +76 -0
  17. pyspark_fluvius-0.1.0/src/pyspark_fluvius/readers/__init__.py +6 -0
  18. pyspark_fluvius-0.1.0/src/pyspark_fluvius/readers/energy_reader.py +91 -0
  19. pyspark_fluvius-0.1.0/src/pyspark_fluvius/readers/mandates_reader.py +120 -0
  20. pyspark_fluvius-0.1.0/src/pyspark_fluvius/schemas/__init__.py +6 -0
  21. pyspark_fluvius-0.1.0/src/pyspark_fluvius/schemas/energy_schema.py +62 -0
  22. pyspark_fluvius-0.1.0/src/pyspark_fluvius/schemas/mandates_schema.py +17 -0
  23. pyspark_fluvius-0.1.0/src/pyspark_fluvius/utils/__init__.py +5 -0
  24. pyspark_fluvius-0.1.0/src/pyspark_fluvius/utils/credentials.py +62 -0
  25. pyspark_fluvius-0.1.0/tests/__init__.py +1 -0
  26. pyspark_fluvius-0.1.0/tests/conftest.py +76 -0
  27. pyspark_fluvius-0.1.0/tests/test_energy_datasource.py +243 -0
  28. pyspark_fluvius-0.1.0/tests/test_integration.py +329 -0
  29. pyspark_fluvius-0.1.0/tests/test_mandates_datasource.py +165 -0
  30. pyspark_fluvius-0.1.0/uv.lock +630 -0
@@ -0,0 +1,45 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ env:
16
+ FLUVIUS_SUBSCRIPTION_KEY: ${{ secrets.FLUVIUS_SUBSCRIPTION_KEY }}
17
+ FLUVIUS_SANDBOX_CLIENT_ID: ${{ secrets.FLUVIUS_SANDBOX_CLIENT_ID }}
18
+ FLUVIUS_TENANT_ID: ${{ secrets.FLUVIUS_TENANT_ID }}
19
+ FLUVIUS_SCOPE: ${{ secrets.FLUVIUS_SCOPE }}
20
+ FLUVIUS_DATA_ACCESS_CONTRACT_NUMBER: ${{ secrets.FLUVIUS_DATA_ACCESS_CONTRACT_NUMBER }}
21
+ FLUVIUS_SANDBOX_CLIENT_SECRET: ${{ secrets.FLUVIUS_SANDBOX_CLIENT_SECRET }}
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - uses: astral-sh/setup-uv@v5
25
+ - run: uv python install
26
+ - run: uv sync --all-extras --dev
27
+ - run: uv run pytest
28
+ - run: uv build
29
+ - uses: actions/upload-artifact@v4
30
+ with:
31
+ name: python-package-distributions
32
+ path: dist/
33
+
34
+ publish:
35
+ needs: build
36
+ runs-on: ubuntu-latest
37
+ environment:
38
+ name: pypi
39
+ url: https://pypi.org/p/pyspark-fluvius
40
+ steps:
41
+ - uses: actions/download-artifact@v4
42
+ with:
43
+ name: python-package-distributions
44
+ path: dist/
45
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,26 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ env:
14
+ FLUVIUS_SUBSCRIPTION_KEY: ${{ secrets.FLUVIUS_SUBSCRIPTION_KEY }}
15
+ FLUVIUS_SANDBOX_CLIENT_ID: ${{ secrets.FLUVIUS_SANDBOX_CLIENT_ID }}
16
+ FLUVIUS_TENANT_ID: ${{ secrets.FLUVIUS_TENANT_ID }}
17
+ FLUVIUS_SCOPE: ${{ secrets.FLUVIUS_SCOPE }}
18
+ FLUVIUS_DATA_ACCESS_CONTRACT_NUMBER: ${{ secrets.FLUVIUS_DATA_ACCESS_CONTRACT_NUMBER }}
19
+ FLUVIUS_SANDBOX_CLIENT_SECRET: ${{ secrets.FLUVIUS_SANDBOX_CLIENT_SECRET }}
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: astral-sh/setup-uv@v5
23
+ - run: uv python install
24
+ - run: uv sync --all-extras --dev
25
+ - run: uv run pytest
26
+ - run: uv build
@@ -0,0 +1,145 @@
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
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ *.py,cover
48
+ .hypothesis/
49
+ .pytest_cache/
50
+
51
+ # Translations
52
+ *.mo
53
+ *.pot
54
+
55
+ # Django stuff:
56
+ *.log
57
+ local_settings.py
58
+ db.sqlite3
59
+ db.sqlite3-journal
60
+
61
+ # Flask stuff:
62
+ instance/
63
+ .webassets-cache
64
+
65
+ # Scrapy stuff:
66
+ .scrapy
67
+
68
+ # Sphinx documentation
69
+ docs/_build/
70
+
71
+ # PyBuilder
72
+ .pybuilder/
73
+ target/
74
+
75
+ # Jupyter Notebook
76
+ .ipynb_checkpoints
77
+
78
+ # IPython
79
+ profile_default/
80
+ ipython_config.py
81
+
82
+ # pyenv
83
+ .python-version
84
+
85
+ # pipenv
86
+ Pipfile.lock
87
+
88
+ # PEP 582
89
+ __pypackages__/
90
+
91
+ # Celery stuff
92
+ celerybeat-schedule
93
+ celerybeat.pid
94
+
95
+ # SageMath parsed files
96
+ *.sage.py
97
+
98
+ # Environments
99
+ .env
100
+ .venv
101
+ env/
102
+ venv/
103
+ ENV/
104
+ env.bak/
105
+ venv.bak/
106
+
107
+ # Spyder project settings
108
+ .spyderproject
109
+ .spyproject
110
+
111
+ # Rope project settings
112
+ .ropeproject
113
+
114
+ # mkdocs documentation
115
+ /site
116
+
117
+ # mypy
118
+ .mypy_cache/
119
+ .dmypy.json
120
+ dmypy.json
121
+
122
+ # Pyre type checker
123
+ .pyre/
124
+
125
+ # pytype static type analyzer
126
+ .pytype/
127
+
128
+ # Cython debug symbols
129
+ cython_debug/
130
+
131
+ # IDE
132
+ .idea/
133
+ .vscode/
134
+ *.swp
135
+ *.swo
136
+ *~
137
+
138
+ # OS
139
+ .DS_Store
140
+ Thumbs.db
141
+
142
+ # Spark
143
+ derby.log
144
+ metastore_db/
145
+ spark-warehouse/