openenergyid 0.1.21__tar.gz → 0.1.29__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.

Potentially problematic release.


This version of openenergyid might be problematic. Click here for more details.

Files changed (78) hide show
  1. openenergyid-0.1.29/PKG-INFO +30 -0
  2. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/__init__.py +1 -1
  3. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/baseload/analysis.py +5 -3
  4. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/dyntar/models.py +2 -12
  5. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/models.py +5 -1
  6. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/mvlr/mvlr.py +3 -3
  7. openenergyid-0.1.29/openenergyid.egg-info/PKG-INFO +30 -0
  8. openenergyid-0.1.29/openenergyid.egg-info/SOURCES.txt +33 -0
  9. openenergyid-0.1.29/openenergyid.egg-info/dependency_links.txt +1 -0
  10. openenergyid-0.1.29/openenergyid.egg-info/requires.txt +3 -0
  11. openenergyid-0.1.29/openenergyid.egg-info/top_level.txt +1 -0
  12. openenergyid-0.1.29/pyproject.toml +58 -0
  13. openenergyid-0.1.29/setup.cfg +4 -0
  14. openenergyid-0.1.21/.devcontainer/devcontainer.json +0 -42
  15. openenergyid-0.1.21/.devcontainer/post-install.sh +0 -22
  16. openenergyid-0.1.21/.gitattributes +0 -21
  17. openenergyid-0.1.21/.github/workflows/python-publish.yml +0 -38
  18. openenergyid-0.1.21/.github/workflows/ruff.yml +0 -8
  19. openenergyid-0.1.21/.gitignore +0 -168
  20. openenergyid-0.1.21/.pre-commit-config.yaml +0 -43
  21. openenergyid-0.1.21/.vscode/settings.json +0 -4
  22. openenergyid-0.1.21/DEVELOPERS.md +0 -63
  23. openenergyid-0.1.21/PKG-INFO +0 -50
  24. openenergyid-0.1.21/data/PP/energy_use.json +0 -35042
  25. openenergyid-0.1.21/data/PP/energy_use2Vin.ndjson +0 -35040
  26. openenergyid-0.1.21/data/PP/energy_use_big.ndjson +0 -29664
  27. openenergyid-0.1.21/data/PP/energy_use_test1.ndjson +0 -35040
  28. openenergyid-0.1.21/data/PP/energy_use_test2.ndjson +0 -28896
  29. openenergyid-0.1.21/data/capacity/capacity_output.json +0 -327
  30. openenergyid-0.1.21/data/capacity/power_sample.json +0 -3473
  31. openenergyid-0.1.21/data/da_prices_be.json +0 -291657
  32. openenergyid-0.1.21/data/dyntar/demo_dyntar_analysis.html +0 -8725
  33. openenergyid-0.1.21/data/dyntar/sample.json +0 -1
  34. openenergyid-0.1.21/data/dyntar/sample_output.json +0 -240540
  35. openenergyid-0.1.21/data/energiedelen/Optimaal_1.png +0 -0
  36. openenergyid-0.1.21/data/energiedelen/Optimaal_2.png +0 -0
  37. openenergyid-0.1.21/data/energiedelen/Relatief.png +0 -0
  38. openenergyid-0.1.21/data/energiedelen/Vast.png +0 -0
  39. openenergyid-0.1.21/data/energiedelen/sample_input.json +0 -1
  40. openenergyid-0.1.21/data/mvlr/sample_gas.json +0 -1869
  41. openenergyid-0.1.21/data/mvlr/sample_solar.json +0 -2586
  42. openenergyid-0.1.21/demo_baseLoad.ipynb +0 -271
  43. openenergyid-0.1.21/demo_capacity_analysis.ipynb +0 -472
  44. openenergyid-0.1.21/demo_dyntar_analysis.ipynb +0 -1243
  45. openenergyid-0.1.21/demo_energiedelen.ipynb +0 -1184
  46. openenergyid-0.1.21/demo_energyid_download.ipynb +0 -152
  47. openenergyid-0.1.21/demo_mvlr.ipynb +0 -118
  48. openenergyid-0.1.21/download_prices.ipynb +0 -110
  49. openenergyid-0.1.21/performance_testing.ipynb +0 -164
  50. openenergyid-0.1.21/poetry.lock +0 -3869
  51. openenergyid-0.1.21/pyproject.toml +0 -78
  52. openenergyid-0.1.21/requirements-dev.txt +0 -128
  53. openenergyid-0.1.21/requirements.txt +0 -19
  54. openenergyid-0.1.21/tests/__init__.py +0 -0
  55. openenergyid-0.1.21/tests/data/mvlr/sample.dat +0 -2585
  56. openenergyid-0.1.21/tests/nb.py +0 -38
  57. {openenergyid-0.1.21 → openenergyid-0.1.29}/LICENSE +0 -0
  58. {openenergyid-0.1.21 → openenergyid-0.1.29}/README.md +0 -0
  59. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/baseload/__init__.py +0 -0
  60. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/baseload/exceptions.py +0 -0
  61. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/baseload/models.py +0 -0
  62. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/capacity/__init__.py +0 -0
  63. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/capacity/main.py +0 -0
  64. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/capacity/models.py +0 -0
  65. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/const.py +0 -0
  66. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/dyntar/__init__.py +0 -0
  67. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/dyntar/const.py +0 -0
  68. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/dyntar/main.py +0 -0
  69. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/energysharing/__init__.py +0 -0
  70. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/energysharing/const.py +0 -0
  71. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/energysharing/data_formatting.py +0 -0
  72. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/energysharing/main.py +0 -0
  73. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/energysharing/models.py +0 -0
  74. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/enums.py +0 -0
  75. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/mvlr/__init__.py +0 -0
  76. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/mvlr/helpers.py +0 -0
  77. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/mvlr/main.py +0 -0
  78. {openenergyid-0.1.21 → openenergyid-0.1.29}/openenergyid/mvlr/models.py +0 -0
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: openenergyid
3
+ Version: 0.1.29
4
+ Summary: Open Source Python library for energy analytics and simulations
5
+ Author-email: Jan Pecinovsky <jan@energieid.be>, Max Helskens <max@energieid.be>, Oscar Swyns <oscar@energieid.be>
6
+ License-Expression: MIT
7
+ Keywords: energy,analytics,simulation
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Natural Language :: English
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
16
+ Classifier: Topic :: Scientific/Engineering :: Physics
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: pandera[polars]>=0.22.1
22
+ Requires-Dist: pydantic>=2.8.2
23
+ Requires-Dist: statsmodels>=0.14.2
24
+ Dynamic: license-file
25
+
26
+ # OpenEnergyID
27
+
28
+ Open Source Python library for energy data analytics and simulations
29
+
30
+ [*more info for developers*](DEVELOPERS.md)
@@ -1,6 +1,6 @@
1
1
  """Open Energy ID Python SDK."""
2
2
 
3
- __version__ = "0.1.21"
3
+ __version__ = "0.1.28"
4
4
 
5
5
  from .enums import Granularity
6
6
  from .models import TimeDataFrame, TimeSeries
@@ -163,11 +163,13 @@ class BaseloadAnalyzer:
163
163
  pl.col("total_consumption_in_kilowatthour")
164
164
  - pl.col("consumption_due_to_baseload_in_kilowatthour")
165
165
  ).alias("consumption_not_due_to_baseload_in_kilowatthour"),
166
- # What fraction of total energy was from baseload
167
- (
166
+ pl.when(pl.col("total_consumption_in_kilowatthour") != 0)
167
+ .then(
168
168
  pl.col("consumption_due_to_baseload_in_kilowatthour")
169
169
  / pl.col("total_consumption_in_kilowatthour")
170
- ).alias("baseload_ratio"),
170
+ )
171
+ .otherwise(None)
172
+ .alias("baseload_ratio"),
171
173
  ]
172
174
  )
173
175
  )
@@ -95,16 +95,6 @@ class DynamicTariffAnalysisOutputSummary(BaseModel):
95
95
  class DynamicTariffAnalysisOutput(TimeDataFrame):
96
96
  """Output frame for dynamic tariff analysis."""
97
97
 
98
- columns: list[OutputColumns] = Field(
99
- min_length=1,
100
- max_length=len(OutputColumns.__args__),
101
- examples=[OutputColumns.__args__],
102
- )
103
- data: list[
104
- conlist(
105
- item_type=confloat(allow_inf_nan=True),
106
- min_length=1,
107
- max_length=len(OutputColumns.__args__),
108
- ) # type: ignore
109
- ] = Field(examples=[[0.0] * len(OutputColumns.__args__)])
98
+ columns: list[str]
99
+ data: list[list[float | None]]
110
100
  summary: DynamicTariffAnalysisOutputSummary | None = None
@@ -88,7 +88,11 @@ class TimeSeries(TimeSeriesBase):
88
88
  @classmethod
89
89
  def from_pandas(cls, data: pd.Series) -> Self:
90
90
  """Create from a Pandas Series."""
91
- return cls(name=str(data.name), data=data.tolist(), index=data.index.tolist())
91
+ if not hasattr(data, "name") or data.name is None:
92
+ name = None
93
+ else:
94
+ name = str(data.name)
95
+ return cls(name=name, data=data.tolist(), index=data.index.tolist())
92
96
 
93
97
  def to_pandas(self, timezone: str = "UTC") -> pd.Series:
94
98
  """Convert to a Pandas Series."""
@@ -206,9 +206,9 @@ class MultiVariableLinearRegression:
206
206
 
207
207
  def _do_analysis_cross_validation(self):
208
208
  """Find the best model (fit) based on cross-valiation (leave one out)"""
209
- assert (
210
- len(self.data) < 15
211
- ), "Cross-validation is not implemented if your sample contains more than 15 datapoints"
209
+ assert len(self.data) < 15, (
210
+ "Cross-validation is not implemented if your sample contains more than 15 datapoints"
211
+ )
212
212
 
213
213
  # initialization: first model is the mean, but compute cv correctly.
214
214
  errors = []
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: openenergyid
3
+ Version: 0.1.29
4
+ Summary: Open Source Python library for energy analytics and simulations
5
+ Author-email: Jan Pecinovsky <jan@energieid.be>, Max Helskens <max@energieid.be>, Oscar Swyns <oscar@energieid.be>
6
+ License-Expression: MIT
7
+ Keywords: energy,analytics,simulation
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Natural Language :: English
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
16
+ Classifier: Topic :: Scientific/Engineering :: Physics
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: pandera[polars]>=0.22.1
22
+ Requires-Dist: pydantic>=2.8.2
23
+ Requires-Dist: statsmodels>=0.14.2
24
+ Dynamic: license-file
25
+
26
+ # OpenEnergyID
27
+
28
+ Open Source Python library for energy data analytics and simulations
29
+
30
+ [*more info for developers*](DEVELOPERS.md)
@@ -0,0 +1,33 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ openenergyid/__init__.py
5
+ openenergyid/const.py
6
+ openenergyid/enums.py
7
+ openenergyid/models.py
8
+ openenergyid.egg-info/PKG-INFO
9
+ openenergyid.egg-info/SOURCES.txt
10
+ openenergyid.egg-info/dependency_links.txt
11
+ openenergyid.egg-info/requires.txt
12
+ openenergyid.egg-info/top_level.txt
13
+ openenergyid/baseload/__init__.py
14
+ openenergyid/baseload/analysis.py
15
+ openenergyid/baseload/exceptions.py
16
+ openenergyid/baseload/models.py
17
+ openenergyid/capacity/__init__.py
18
+ openenergyid/capacity/main.py
19
+ openenergyid/capacity/models.py
20
+ openenergyid/dyntar/__init__.py
21
+ openenergyid/dyntar/const.py
22
+ openenergyid/dyntar/main.py
23
+ openenergyid/dyntar/models.py
24
+ openenergyid/energysharing/__init__.py
25
+ openenergyid/energysharing/const.py
26
+ openenergyid/energysharing/data_formatting.py
27
+ openenergyid/energysharing/main.py
28
+ openenergyid/energysharing/models.py
29
+ openenergyid/mvlr/__init__.py
30
+ openenergyid/mvlr/helpers.py
31
+ openenergyid/mvlr/main.py
32
+ openenergyid/mvlr/models.py
33
+ openenergyid/mvlr/mvlr.py
@@ -0,0 +1,3 @@
1
+ pandera[polars]>=0.22.1
2
+ pydantic>=2.8.2
3
+ statsmodels>=0.14.2
@@ -0,0 +1 @@
1
+ openenergyid
@@ -0,0 +1,58 @@
1
+ [project]
2
+ name = "openenergyid"
3
+ version = "0.1.29"
4
+ description = "Open Source Python library for energy analytics and simulations"
5
+ authors = [
6
+ { name = "Jan Pecinovsky", email = "jan@energieid.be" },
7
+ { name = "Max Helskens", email = "max@energieid.be" },
8
+ { name = "Oscar Swyns", email = "oscar@energieid.be" }
9
+ ]
10
+ readme = "README.md"
11
+ license = "MIT"
12
+ keywords = ["energy", "analytics", "simulation"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Intended Audience :: Developers",
16
+ "Intended Audience :: Science/Research",
17
+ "Natural Language :: English",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Topic :: Scientific/Engineering",
21
+ "Topic :: Scientific/Engineering :: Mathematics",
22
+ "Topic :: Scientific/Engineering :: Physics",
23
+ "Topic :: Software Development :: Libraries :: Python Modules"
24
+ ]
25
+ requires-python = ">=3.11"
26
+ dependencies = [
27
+ "pandera[polars]>=0.22.1",
28
+ "pydantic>=2.8.2",
29
+ "statsmodels>=0.14.2",
30
+ ]
31
+
32
+ [tool.ruff]
33
+ line-length = 100
34
+
35
+ [dependency-groups]
36
+ dev = [
37
+ "altair>=5.5.0",
38
+ "deptry>=0.23.0",
39
+ "energyid>=0.0.17",
40
+ "entsoe-py>=0.6.19",
41
+ "ipykernel>=6.29.5",
42
+ "jupyter>=1.1.1",
43
+ "matplotlib>=3.10.3",
44
+ "notebook>=7.4.3",
45
+ "pandoc>=2.4",
46
+ "pip>=25.1.1",
47
+ "plotly>=6.1.2",
48
+ "pyarrow>=20.0.0",
49
+ "pyinstrument>=5.0.2",
50
+ "pytest>=8.4.0",
51
+ "seaborn>=0.13.2",
52
+ "snakeviz>=2.2.2",
53
+ "vegafusion>=2.0.2",
54
+ "vl-convert-python>=1.8.0",
55
+ ]
56
+
57
+ [tool.setuptools.packages.find]
58
+ include = ["openenergyid*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -1,42 +0,0 @@
1
- {
2
- "name": "Python 3",
3
- "image": "mcr.microsoft.com/devcontainers/python:1.1.9-3.11-bookworm",
4
- "features": {},
5
- "postCreateCommand": "zsh -l .devcontainer/post-install.sh",
6
- // "postStartCommand": "",
7
- "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,consistency=cached",
8
- "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
9
- "remoteUser": "root",
10
- "customizations": {
11
- "vscode": {
12
- "extensions": [
13
- "ms-toolsai.jupyter",
14
- "charliermarsh.ruff",
15
- "ms-python.pylint",
16
- "ms-python.vscode-pylance",
17
- "visualstudioexptteam.vscodeintellicode",
18
- "esbenp.prettier-vscode",
19
- "GitHub.vscode-pull-request-github",
20
- "mhutchie.git-graph",
21
- "ms-toolsai.jupyter"
22
- ],
23
- "settings": {
24
- "python.pythonPath": "/usr/local/bin/python",
25
- "python.testing.pytestArgs": ["--no-cov"],
26
- "editor.formatOnPaste": false,
27
- "editor.formatOnSave": true,
28
- "editor.formatOnType": true,
29
- "files.trimTrailingWhitespace": true,
30
- "terminal.integrated.profiles.linux": {
31
- "zsh": {
32
- "path": "/usr/bin/zsh"
33
- }
34
- },
35
- "terminal.integrated.defaultProfile.linux": "zsh",
36
- "[python]": {
37
- "editor.defaultFormatter": "charliermarsh.ruff"
38
- }
39
- }
40
- }
41
- }
42
- }
@@ -1,22 +0,0 @@
1
- #!/bin/zsh -l
2
- # Add the current directory to Git's safe directory list
3
- git config --global --add safe.directory /workspaces/OpenEnergyID
4
-
5
- # Install Python tools
6
- pipx install ruff poetry pre-commit
7
-
8
- # Install project dependencies using Poetry
9
- poetry install
10
-
11
- # Install pre-commit hooks
12
- pre-commit install
13
-
14
- # Install ZSH plugins
15
- git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
16
- git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
17
-
18
- # Update .zshrc to enable plugins
19
- sed -i 's/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/' ~/.zshrc
20
-
21
- # Source the updated configuration
22
- source ~/.zshrc
@@ -1,21 +0,0 @@
1
- # Set default behavior to LF
2
- * text=auto eol=lf
3
-
4
- # Explicitly declare files that should always use LF
5
- *.py text eol=lf
6
- *.json text eol=lf
7
- *.md text eol=lf
8
- *.yaml text eol=lf
9
- *.yml text eol=lf
10
- *.sh text eol=lf
11
- *.ndjson text eol=lf
12
- *.html text eol=lf
13
- *.toml text eol=lf
14
- *.txt text eol=lf
15
- *.dat text eol=lf
16
- *.lock text eol=lf
17
-
18
- # Denote all files that are truly binary and should not be modified
19
- *.png binary
20
- *.jpg binary
21
- *.gif binary
@@ -1,38 +0,0 @@
1
- # This workflow will upload a Python Package using Twine when a release is created
2
- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
-
4
- # This workflow uses actions that are not certified by GitHub.
5
- # They are provided by a third-party and are governed by
6
- # separate terms of service, privacy policy, and support
7
- # documentation.
8
-
9
- name: Upload Python Package
10
-
11
- on:
12
- release:
13
- types: [published]
14
-
15
- permissions:
16
- contents: read
17
-
18
- jobs:
19
- deploy:
20
- runs-on: ubuntu-latest
21
- permissions:
22
- id-token: write
23
- environment: release
24
-
25
- steps:
26
- - uses: actions/checkout@v3
27
- - name: Set up Python
28
- uses: actions/setup-python@v3
29
- with:
30
- python-version: '3.x'
31
- - name: Install dependencies
32
- run: |
33
- python -m pip install --upgrade pip
34
- pip install build
35
- - name: Build package
36
- run: python -m build
37
- - name: Publish package
38
- uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,8 +0,0 @@
1
- name: Ruff
2
- on: [push, pull_request]
3
- jobs:
4
- ruff:
5
- runs-on: ubuntu-latest
6
- steps:
7
- - uses: actions/checkout@v3
8
- - uses: chartboost/ruff-action@v1
@@ -1,168 +0,0 @@
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
- # Usually these files are written by a python script from a template
31
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
- *.manifest
33
- *.spec
34
-
35
- # Installer logs
36
- pip-log.txt
37
- pip-delete-this-directory.txt
38
-
39
- # Unit test / coverage reports
40
- htmlcov/
41
- .tox/
42
- .nox/
43
- .coverage
44
- .coverage.*
45
- .cache
46
- nosetests.xml
47
- coverage.xml
48
- *.cover
49
- *.py,cover
50
- .hypothesis/
51
- .pytest_cache/
52
- cover/
53
-
54
- # Translations
55
- *.mo
56
- *.pot
57
-
58
- # Django stuff:
59
- *.log
60
- local_settings.py
61
- db.sqlite3
62
- db.sqlite3-journal
63
-
64
- # Flask stuff:
65
- instance/
66
- .webassets-cache
67
-
68
- # Scrapy stuff:
69
- .scrapy
70
-
71
- # Sphinx documentation
72
- docs/_build/
73
-
74
- # PyBuilder
75
- .pybuilder/
76
- target/
77
-
78
- # Jupyter Notebook
79
- .ipynb_checkpoints
80
-
81
- # IPython
82
- profile_default/
83
- ipython_config.py
84
-
85
- # pyenv
86
- # For a library or package, you might want to ignore these files since the code is
87
- # intended to run in multiple environments; otherwise, check them in:
88
- # .python-version
89
-
90
- # pipenv
91
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
- # install all needed dependencies.
95
- #Pipfile.lock
96
-
97
- # poetry
98
- # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
- # This is especially recommended for binary packages to ensure reproducibility, and is more
100
- # commonly ignored for libraries.
101
- # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
- #poetry.lock
103
-
104
- # pdm
105
- # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
- #pdm.lock
107
- # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
- # in version control.
109
- # https://pdm.fming.dev/#use-with-ide
110
- .pdm.toml
111
-
112
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
- __pypackages__/
114
-
115
- # Celery stuff
116
- celerybeat-schedule
117
- celerybeat.pid
118
-
119
- # SageMath parsed files
120
- *.sage.py
121
-
122
- # Environments
123
- .env
124
- .venv
125
- env/
126
- venv/
127
- ENV/
128
- env.bak/
129
- venv.bak/
130
-
131
- # Spyder project settings
132
- .spyderproject
133
- .spyproject
134
-
135
- # Rope project settings
136
- .ropeproject
137
-
138
- # mkdocs documentation
139
- /site
140
-
141
- # mypy
142
- .mypy_cache/
143
- .dmypy.json
144
- dmypy.json
145
-
146
- # Pyre type checker
147
- .pyre/
148
-
149
- # pytype static type analyzer
150
- .pytype/
151
-
152
- # Cython debug symbols
153
- cython_debug/
154
-
155
- # PyCharm
156
- # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
- # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
- # and can be added to the global gitignore or merged into this file. For a more nuclear
159
- # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
- #.idea/
161
- .DS_Store
162
- secrets.json
163
-
164
- private_data/
165
- figures/
166
- temp_notebooks/
167
- *.pkl
168
- vis/
@@ -1,43 +0,0 @@
1
- repos:
2
- - repo: https://github.com/astral-sh/ruff-pre-commit
3
- # Ruff version.
4
- rev: v0.5.5
5
- hooks:
6
- # Run the linter.
7
- - id: ruff
8
- types_or: [python, pyi, jupyter]
9
- args: [--fix]
10
- # Run the formatter.
11
- - id: ruff-format
12
- types_or: [python, pyi, jupyter]
13
-
14
- - repo: https://github.com/asottile/pyupgrade
15
- rev: v3.16.0
16
- hooks:
17
- - id: pyupgrade
18
- args: [--py311-plus]
19
-
20
- - repo: https://github.com/pre-commit/pre-commit-hooks
21
- rev: v4.6.0
22
- hooks:
23
- - id: mixed-line-ending
24
- args: [--fix=lf] # Force LF line endings
25
- - id: check-yaml
26
- - id: end-of-file-fixer
27
- - id: trailing-whitespace
28
- - id: check-added-large-files
29
-
30
- - repo: local
31
- hooks:
32
- - id: poetry-export-prod
33
- name: Poetry export production requirements
34
- entry: poetry export -f requirements.txt --output requirements.txt --without-hashes
35
- language: system
36
- pass_filenames: false
37
- files: ^(pyproject\.toml|poetry\.lock)$
38
- - id: poetry-export-dev
39
- name: Poetry export development requirements
40
- entry: poetry export -f requirements.txt --output requirements-dev.txt --without-hashes --only dev
41
- language: system
42
- pass_filenames: false
43
- files: ^(pyproject\.toml|poetry\.lock)$
@@ -1,4 +0,0 @@
1
- {
2
- "python.analysis.typeCheckingMode": "basic",
3
- "remote.autoForwardPortsFallback": 0
4
- }
@@ -1,63 +0,0 @@
1
- # Development Environment Setup
2
-
3
- This guide outlines the setup process for our development environment, focusing on packaging and dependency management.
4
-
5
- ## Info on dev setup
6
-
7
- ### Commit practices (pre-commit)
8
-
9
- we use [pre-commit ](https://pre-commit.com/)to run RUFF.
10
-
11
- ### Poetry for Packaging and Dependency Management
12
-
13
- We use [Poetry](https://python-poetry.org/docs/main/#installation) as our primary tool for packaging and managing dependencies. Poetry provides a simple yet powerful way to manage project dependencies and publish packages.
14
-
15
- For the most detailed and up-to-date information, please refer to the [official Poetry 📚](https://python-poetry.org/docs/main/#installation).
16
-
17
- ### Installing Python CLI Applications Globally with pipx
18
-
19
- To ensure that Python CLI applications are installed globally on your system while being isolated in their own virtual environments, we utilize `pipx`.
20
-
21
- ## Steps to Install pipx and Poetry
22
-
23
- 1. First, [install pipx](https://pipx.pypa.io/stable/installation/) following the instructions on the official website.
24
- 2. Once pipx is installed, you can easily install Poetry by running the following command in your terminal:
25
- `pipx install poetry`
26
- 3. (_optional_) [install](vscode:extension/zeshuaro.vscode-python-poetry) vscode extension for poetry
27
-
28
- ### Setup with Poetry
29
-
30
- ```shell
31
- poetry install
32
- ```
33
-
34
- ### publishing with poetry
35
-
36
- https://python-poetry.org/docs/repositories/
37
-
38
- ## Remarks for devcontainer
39
-
40
- You can also work inside a docker container(devcontainer).
41
-
42
- ```bash
43
- whoami
44
- sudo chown -R $USER:$USER /workspaces/ -R
45
- ```
46
-
47
- ### some info about devcontainers:
48
-
49
- - [poetry in a devcontainer](https://marioscalas.medium.com/using-python-and-poetry-inside-a-dev-container-33c80bc5a22c)
50
-
51
- - [our python/container version](https://github.com/devcontainers/images/blob/main/src/python/history/1.1.9.md#variant-311-bookworm)
52
-
53
- - notes on [devcontainer git authentication](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials). dont forget to ssh-add if you use keys.
54
-
55
- # Useful commands for dev work
56
-
57
- ## clean up
58
-
59
- [vulture](https://github.com/jendrikseipp/vulture) for finding dead python 🐍
60
- `pipx run vulture . --exclude venv`
61
-
62
- [deptry](https://github.com/fpgmaas/deptry) for checking dependencies
63
- `pipx run deptry . --ignore-notebooks`