weather-file-builder 2.0.4__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 (40) hide show
  1. weather_file_builder-2.0.4/.cursor/rules/Python-Rules.mdc +42 -0
  2. weather_file_builder-2.0.4/.github/workflows/publish.yml +38 -0
  3. weather_file_builder-2.0.4/.gitignore +145 -0
  4. weather_file_builder-2.0.4/LICENSE +21 -0
  5. weather_file_builder-2.0.4/PKG-INFO +697 -0
  6. weather_file_builder-2.0.4/README.md +657 -0
  7. weather_file_builder-2.0.4/examples/basic_usage.py +100 -0
  8. weather_file_builder-2.0.4/examples/nyc_project/config.json +14 -0
  9. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_dew point_2010-2020_40.71_-74.01.png +0 -0
  10. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_dhi_2010-2020_40.71_-74.01.png +0 -0
  11. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_dni_2010-2020_40.71_-74.01.png +0 -0
  12. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_ghi_2010-2020_40.71_-74.01.png +0 -0
  13. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_precipitation_2010-2020_40.71_-74.01.png +0 -0
  14. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_pressure_2010-2020_40.71_-74.01.png +0 -0
  15. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_relative humidity_2010-2020_40.71_-74.01.png +0 -0
  16. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_temperature_2010-2020_40.71_-74.01.png +0 -0
  17. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_wind direction_2010-2020_40.71_-74.01.png +0 -0
  18. weather_file_builder-2.0.4/examples/nyc_project/plots/tmy_wind speed_2010-2020_40.71_-74.01.png +0 -0
  19. weather_file_builder-2.0.4/examples/nyc_project/timeseries/timeseries_2010-01-01_2020-12-31_40.71_-74.01.feather +0 -0
  20. weather_file_builder-2.0.4/examples/tmy_construction.png +0 -0
  21. weather_file_builder-2.0.4/manual_debug-improvements.ipynb +457 -0
  22. weather_file_builder-2.0.4/pyproject.toml +68 -0
  23. weather_file_builder-2.0.4/release.sh +66 -0
  24. weather_file_builder-2.0.4/src/weather_file_builder/__init__.py +27 -0
  25. weather_file_builder-2.0.4/src/weather_file_builder/converters.py +221 -0
  26. weather_file_builder-2.0.4/src/weather_file_builder/core.py +456 -0
  27. weather_file_builder-2.0.4/src/weather_file_builder/epw.py +171 -0
  28. weather_file_builder-2.0.4/src/weather_file_builder/epw_data_dictionary.txt +255 -0
  29. weather_file_builder-2.0.4/src/weather_file_builder/tmy.py +255 -0
  30. weather_file_builder-2.0.4/src/weather_file_builder/utils.py +606 -0
  31. weather_file_builder-2.0.4/src/weather_file_builder/variables.py +118 -0
  32. weather_file_builder-2.0.4/src/weather_file_builder/visualization.py +272 -0
  33. weather_file_builder-2.0.4/tests/__init__.py +1 -0
  34. weather_file_builder-2.0.4/tests/conftest.py +33 -0
  35. weather_file_builder-2.0.4/tests/test_basic.py +75 -0
  36. weather_file_builder-2.0.4/tests/test_config_logging.py +141 -0
  37. weather_file_builder-2.0.4/tests/test_epw.py +95 -0
  38. weather_file_builder-2.0.4/tests/test_file_management.py +89 -0
  39. weather_file_builder-2.0.4/tests/test_latlon_integration.py +43 -0
  40. weather_file_builder-2.0.4/tests/test_timeseries.py +23 -0
@@ -0,0 +1,42 @@
1
+ ---
2
+ alwaysApply: true
3
+ ---
4
+
5
+ ---
6
+ description: Core project environment and conventions for weatherfilebuilder
7
+ alwaysApply: true
8
+ ---
9
+
10
+ # weatherfilebuilder Project Environment
11
+
12
+ ## Python Interpreter
13
+
14
+ Always use the `weatherfilebuilder` conda environment as the Python interpreter.
15
+
16
+ ```bash
17
+ # Activate before running anything
18
+ conda activate weatherfilebuilder
19
+
20
+ # Or invoke directly
21
+ ~/miniconda3/envs/weatherfilebuilder/bin/python
22
+ ```
23
+
24
+ When suggesting terminal commands, prefix with `conda run -n weatherfilebuilder` or assume the env is active.
25
+
26
+ ## Project Layout
27
+
28
+ - `weatherfilebuilder/` — main package source
29
+ - `weatherfilebuilder/tools/` — core pipeline modules (configuration, workflow, io, etc.)
30
+ - `tests/` — pytest test suite
31
+ - `gui/` — GUI front-end (see `gui/README.md`)
32
+ - `examples/` — usage notebooks/scripts
33
+
34
+ ## Running Tests
35
+
36
+ ```bash
37
+ conda run -n weatherfilebuilder pytest tests/
38
+ ```
39
+
40
+ ## Package Management
41
+
42
+ The project uses `hatchling` as the build backend (`pyproject.toml`). Do not add a `setup.py` or `setup.cfg`.
@@ -0,0 +1,38 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: '3.11'
18
+
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install hatch twine
23
+
24
+ - name: Build package
25
+ run: hatch build
26
+
27
+ - name: Publish to PyPI
28
+ env:
29
+ TWINE_USERNAME: __token__
30
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
31
+ run: twine upload dist/*
32
+
33
+ - name: Create GitHub Release
34
+ uses: softprops/action-gh-release@v2
35
+ with:
36
+ generate_release_notes: true
37
+ env:
38
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -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
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .nox/
42
+ .coverage
43
+ .coverage.*
44
+ .cache
45
+ nosetests.xml
46
+ coverage.xml
47
+ *.cover
48
+ *.py,cover
49
+ .hypothesis/
50
+ .pytest_cache/
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Django stuff:
57
+ *.log
58
+ local_settings.py
59
+ db.sqlite3
60
+ db.sqlite3-journal
61
+
62
+ # Flask stuff:
63
+ instance/
64
+ .webassets-cache
65
+
66
+ # Scrapy stuff:
67
+ .scrapy
68
+
69
+ # Sphinx documentation
70
+ docs/_build/
71
+
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
+ # IDE
126
+ .vscode/
127
+ *.code-workspace
128
+ .idea/
129
+ *.swp
130
+ *.swo
131
+ *~
132
+
133
+ # OS
134
+ .DS_Store
135
+ Thumbs.db
136
+
137
+ # Project specific
138
+ *.nc
139
+ *.epw
140
+ *.csv
141
+ data_*/
142
+ weather_*.csv
143
+ tmy_*.csv
144
+ era5_*.csv
145
+ downloads/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Justin McCarty
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.