flixopt 2.1.9__py3-none-any.whl → 2.1.10__py3-none-any.whl

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 flixopt might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flixopt
3
- Version: 2.1.9
3
+ Version: 2.1.10
4
4
  Summary: Vector based energy and material flow optimization framework in Python.
5
5
  Author-email: "Chair of Building Energy Systems and Heat Supply, TU Dresden" <peter.stange@tu-dresden.de>, Felix Bumann <felixbumann387@gmail.com>, Felix Panitz <baumbude@googlemail.com>, Peter Stange <peter.stange@tu-dresden.de>
6
6
  Maintainer-email: Felix Bumann <felixbumann387@gmail.com>, Peter Stange <peter.stange@tu-dresden.de>
@@ -53,6 +53,7 @@ Requires-Dist: werkzeug<4,>=3.0.0; extra == "full"
53
53
  Requires-Dist: flask<4,>=3.0.0; extra == "full"
54
54
  Provides-Extra: dev
55
55
  Requires-Dist: pytest==8.4.2; extra == "dev"
56
+ Requires-Dist: pytest-xdist==3.8.0; extra == "dev"
56
57
  Requires-Dist: nbformat==5.10.4; extra == "dev"
57
58
  Requires-Dist: ruff==0.13.0; extra == "dev"
58
59
  Requires-Dist: pre-commit==4.3.0; extra == "dev"
@@ -41,16 +41,17 @@ flixopt/results.py,sha256=121FoO3WrAuHm18_-OP93_-9JxuCVVm5JWvmC33P3-8,40682
41
41
  flixopt/solvers.py,sha256=m38Smc22MJfHYMiqfNf1MA3OmvbTRm5OWS9nECkDdQk,2355
42
42
  flixopt/structure.py,sha256=vyD1lc80NH3JLexKJuar9btgHhEbcNEmihCQkBWea8k,26254
43
43
  flixopt/utils.py,sha256=a-YKR7C7HtD8dSIcxzlJTgryV5HMS7zELSXNYr_Lz9Q,1775
44
- flixopt-2.1.9.dist-info/licenses/LICENSE,sha256=HKsZnbrM_3Rvnr_u9cWSG90cBsj5_slaqI_z_qcxnGI,1118
44
+ flixopt-2.1.10.dist-info/licenses/LICENSE,sha256=HKsZnbrM_3Rvnr_u9cWSG90cBsj5_slaqI_z_qcxnGI,1118
45
45
  pics/architecture_flixOpt-pre2.0.0.png,sha256=9RWSA3vys588aadr2437zor-_-xBTQNQ0bAf8xGcu5g,70605
46
46
  pics/architecture_flixOpt.png,sha256=KjN1bJwESbkHmTW7UsJ7dZyiKZlTO7Dx20dg8KlR1HU,260219
47
47
  pics/flixOpt_plotting.jpg,sha256=zn7ZPAtXm5eRTxtOj86e4-PPhHpCar1jqGh7vMBgQGY,518862
48
48
  pics/flixopt-icon.svg,sha256=_1a6bk2pDOVEy233LC1nM6jZ35NdzD8Hd3UqGxW1Xpg,135341
49
49
  pics/pics.pptx,sha256=ImWeGGvjtWJ6BGruipsnZYmWtHj5sWdbw1NSFePbkC8,683344
50
+ scripts/extract_changelog.py,sha256=jWoP_zp5sxvTVfH8HIcQI42R9FO-gRdzRwq0L4lhuHQ,5034
50
51
  scripts/extract_release_notes.py,sha256=3UUE4hWhdd2t2m2x0ZpchGP-A0MvfqO2Wc5EdNN-fgE,1249
51
52
  scripts/gen_ref_pages.py,sha256=7bxRu2VfqFrnr7wln1BjMAqpQUzuTkLPJSBh83uikIQ,1948
52
53
  tests/ressources/Zeitreihen2020.csv,sha256=kbsDTKZS0iUsNZAS7m3DohzZI_OHHWe44s3GwLvcTLw,1918412
53
- flixopt-2.1.9.dist-info/METADATA,sha256=Nss3DrhLRoWw8XBa73OyIKYN_Fx34uo4y4gptjXu8Qc,8432
54
- flixopt-2.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
55
- flixopt-2.1.9.dist-info/top_level.txt,sha256=DEuo4R1z7GmEp5R3pjbQEJbaPRjKHFvNX2ceiBnVOL0,32
56
- flixopt-2.1.9.dist-info/RECORD,,
54
+ flixopt-2.1.10.dist-info/METADATA,sha256=AxM_a6vkLqyGH0qHhp_K1FEQ81boAP1oRZ0F57jqwyg,8484
55
+ flixopt-2.1.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
56
+ flixopt-2.1.10.dist-info/top_level.txt,sha256=DEuo4R1z7GmEp5R3pjbQEJbaPRjKHFvNX2ceiBnVOL0,32
57
+ flixopt-2.1.10.dist-info/RECORD,,
@@ -0,0 +1,148 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Extract individual releases from CHANGELOG.md to docs/changelog/
4
+ Simple script to create one file per release.
5
+ """
6
+
7
+ import os
8
+ import re
9
+ from pathlib import Path
10
+
11
+ from packaging.version import InvalidVersion, Version
12
+ from packaging.version import parse as parse_version
13
+
14
+
15
+ def extract_releases():
16
+ """Extract releases from CHANGELOG.md and save to individual files."""
17
+
18
+ changelog_path = Path('CHANGELOG.md')
19
+ output_dir = Path('docs/changelog')
20
+
21
+ if not changelog_path.exists():
22
+ print('❌ CHANGELOG.md not found')
23
+ return
24
+
25
+ # Create output directory
26
+ output_dir.mkdir(parents=True, exist_ok=True)
27
+
28
+ # Read changelog
29
+ with open(changelog_path, encoding='utf-8') as f:
30
+ content = f.read()
31
+
32
+ # Remove template section (HTML comments)
33
+ content = re.sub(r'<!-- This text won\'t be rendered.*?Until here -->', '', content, flags=re.DOTALL)
34
+
35
+ # Split by release headers
36
+ sections = re.split(r'^## \[', content, flags=re.MULTILINE)
37
+
38
+ releases = []
39
+ for section in sections[1:]: # Skip first empty section
40
+ # Extract version and date from start of section
41
+ match = re.match(r'([^\]]+)\] - ([^\n]+)\n(.*)', section, re.DOTALL)
42
+ if match:
43
+ version, date, release_content = match.groups()
44
+ releases.append((version, date.strip(), release_content.strip()))
45
+
46
+ print(f'🔍 Found {len(releases)} releases')
47
+
48
+ # Sort releases by version (oldest first) to keep existing file prefixes stable.
49
+ def version_key(release):
50
+ try:
51
+ return parse_version(release[0])
52
+ except InvalidVersion:
53
+ return parse_version('0.0.0') # fallback for invalid versions
54
+
55
+ releases.sort(key=version_key, reverse=False)
56
+
57
+ # Show what we captured for debugging
58
+ if releases:
59
+ print(f'🔧 First release content length: {len(releases[0][2])}')
60
+
61
+ for i, (version_str, date, release_content) in enumerate(releases):
62
+ # Clean up version for filename with numeric prefix (newest first)
63
+ index = 99999 - i # Newest first, while keeping the same file names for old releases
64
+ prefix = f'{index:05d}' # Zero-padded 5-digit number
65
+ filename = f'{prefix}-v{version_str.replace(" ", "-")}.md'
66
+ filepath = output_dir / filename
67
+
68
+ # Clean up content - remove trailing --- separators and emojis from headers
69
+ cleaned_content = re.sub(r'\s*---\s*$', '', release_content.strip())
70
+
71
+ # Generate navigation links
72
+ nav_links = []
73
+
74
+ # Previous version (older release)
75
+ if i > 0:
76
+ prev_index = 99999 - (i - 1)
77
+ prev_version = releases[i - 1][0]
78
+ prev_filename = f'{prev_index:05d}-v{prev_version.replace(" ", "-")}.md'
79
+ nav_links.append(f'← [Previous: {prev_version}]({prev_filename})')
80
+
81
+ # Next version (newer release)
82
+ if i < len(releases) - 1:
83
+ next_index = 99999 - (i + 1)
84
+ next_version = releases[i + 1][0]
85
+ next_filename = f'{next_index:05d}-v{next_version.replace(" ", "-")}.md'
86
+ nav_links.append(f'[Next: {next_version}]({next_filename}) →')
87
+
88
+ # Always add link back to index
89
+ nav_links.append('[📋 All Releases](index.md)')
90
+ # Add GitHub tag link only for valid PEP 440 versions (skip e.g. "Unreleased")
91
+ ver_obj = parse_version(version_str)
92
+ if isinstance(ver_obj, Version):
93
+ nav_links.append(f'[🏷️ GitHub Release](https://github.com/flixOpt/flixopt/releases/tag/v{version_str})')
94
+ # Create content with navigation
95
+ content_lines = [
96
+ f'# {version_str} - {date.strip()}',
97
+ '',
98
+ ' | '.join(nav_links),
99
+ '',
100
+ '---',
101
+ '',
102
+ cleaned_content,
103
+ '',
104
+ '---',
105
+ '',
106
+ ' | '.join(nav_links),
107
+ ]
108
+
109
+ # Write file
110
+ with open(filepath, 'w', encoding='utf-8') as f:
111
+ f.write('\n'.join(content_lines))
112
+
113
+ print(f'✅ Created {filename}')
114
+
115
+ print(f'🎉 Extracted {len(releases)} releases to docs/changelog/')
116
+
117
+
118
+ def extract_index():
119
+ changelog_path = Path('CHANGELOG.md')
120
+ output_dir = Path('docs/changelog')
121
+ index_path = output_dir / 'index.md'
122
+
123
+ if not changelog_path.exists():
124
+ print('❌ CHANGELOG.md not found')
125
+ return
126
+
127
+ # Create output directory
128
+ output_dir.mkdir(parents=True, exist_ok=True)
129
+
130
+ # Read changelog
131
+ with open(changelog_path, encoding='utf-8') as f:
132
+ content = f.read()
133
+
134
+ intro_match = re.search(r'# Changelog\s+([\s\S]*?)(?=<!--)', content)
135
+ if not intro_match:
136
+ raise ValueError('Intro section not found before comment block')
137
+ final_content = intro_match.group(1).strip()
138
+
139
+ # Write file
140
+ with open(index_path, 'w', encoding='utf-8') as f:
141
+ f.write('\n'.join(['# Changelog\n', final_content]))
142
+
143
+ print('✅ Created index.md')
144
+
145
+
146
+ if __name__ == '__main__':
147
+ extract_releases()
148
+ extract_index()