Skip to content

Commit afa75ce

Browse files
committed
Merge branch 'topic/default/metadata_in_functions' into 'branch/default'
Metadata in functions to avoid issues with Pythran and Windows See merge request fluiddyn/transonic!144
2 parents bb318a9 + 161a31b commit afa75ce

File tree

105 files changed

+395
-170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+395
-170
lines changed

CHANGES.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Release notes
22

33
See also the
4-
[unreleased changes](https://foss.heptapod.net/fluiddyn/transonic/-/compare/0.7.1...branch%2Fdefault).
4+
[unreleased changes](https://foss.heptapod.net/fluiddyn/transonic/-/compare/0.7.2...branch%2Fdefault).
5+
6+
## [0.7.2] (2024-08-26)
7+
8+
- Metadata stored in functions to avoid issues with Pythran on Windows
59

610
## [0.7.1] (2024-07-24)
711

@@ -280,3 +284,4 @@ See also the
280284
[0.6.4]: https://foss.heptapod.net/fluiddyn/transonic/-/compare/0.6.3...0.6.4
281285
[0.7.0]: https://foss.heptapod.net/fluiddyn/transonic/-/compare/0.6.4...0.7.0
282286
[0.7.1]: https://foss.heptapod.net/fluiddyn/transonic/-/compare/0.7.0...0.7.1
287+
[0.7.2]: https://foss.heptapod.net/fluiddyn/transonic/-/compare/0.7.1...0.7.2

data_tests/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11

22
clean:
3-
rm -rf __cython__ __numba__ __pythran__ __python__
3+
rm -rf __cython__ __numba__ __pythran__ __python__ __jax__
44

55
all:
66
transonic -b pythran -nc *.py
77
transonic -b python -nc *.py
88
transonic -b cython -nc *.py
99
transonic -b numba -nc *.py
10+
transonic -b jax -nc *.py
1011

1112
meld_pythran:
1213
meld __pythran__ saved__backend__/pythran
@@ -20,6 +21,9 @@ meld_cython:
2021
meld_numba:
2122
meld __numba__ saved__backend__/numba
2223

24+
meld_jax:
25+
meld __numba__ saved__backend__/numba
26+
2327
saved__backend__/%: __%__ FORCE
2428
rsync -aP $< $@
2529

data_tests/saved__backend__/cython/add_inline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ def use_add(n=10000):
1515
return tmp
1616

1717

18-
__transonic__ = ("0.3.3",)
18+
def __transonic__():
19+
return "0.7.1"

data_tests/saved__backend__/cython/assign_func_boost.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ def func(x):
88
return x**2
99

1010

11-
__transonic__ = ("0.3.3",)
11+
def __transonic__():
12+
return "0.7.1"

data_tests/saved__backend__/cython/block_fluidsim.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@ def rk2_step0(state_spect_n12, state_spect, tendencies_n, diss2, dt):
1515
state_spect_n12[:] = (state_spect + dt / 2 * tendencies_n) * diss2
1616

1717

18-
arguments_blocks = {
19-
"rk2_step0": ["state_spect_n12", "state_spect", "tendencies_n", "diss2", "dt"]
20-
}
18+
def arguments_blocks():
19+
return {
20+
"rk2_step0": [
21+
"state_spect_n12",
22+
"state_spect",
23+
"tendencies_n",
24+
"diss2",
25+
"dt",
26+
]
27+
}
2128

22-
__transonic__ = ("0.3.3",)
29+
30+
def __transonic__():
31+
return "0.7.1"

data_tests/saved__backend__/cython/blocks_type_hints.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ def block0(a, b, n):
1818
return result
1919

2020

21-
arguments_blocks = {"block0": ["a", "b", "n"]}
21+
def arguments_blocks():
22+
return {"block0": ["a", "b", "n"]}
2223

23-
__transonic__ = ("0.3.3",)
24+
25+
def __transonic__():
26+
return "0.7.1"

data_tests/saved__backend__/cython/boosted_class_use_import.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ def __for_method__MyClass2__myfunc(self_attr0, self_attr1, arg):
1111
return self_attr1 + self_attr0 + np.abs(arg) + func_import()
1212

1313

14-
__code_new_method__MyClass2__myfunc = """
14+
def __code_new_method__MyClass2__myfunc():
15+
return """
1516
1617
def new_method(self, arg):
1718
return backend_func(self.attr0, self.attr1, arg)
1819
1920
"""
2021

21-
__transonic__ = ("0.3.3",)
22+
23+
def __transonic__():
24+
return "0.7.1"

data_tests/saved__backend__/cython/boosted_func_use_import.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ def func(a, b):
1111
return (a * np.log(b)).max() + func_import()
1212

1313

14-
__transonic__ = ("0.3.3",)
14+
def __transonic__():
15+
return "0.7.1"

data_tests/saved__backend__/cython/class_blocks.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ def block1(a, b, n):
4141
return result
4242

4343

44-
arguments_blocks = {"block0": ["a", "b", "n"], "block1": ["a", "b", "n"]}
44+
def arguments_blocks():
45+
return {"block0": ["a", "b", "n"], "block1": ["a", "b", "n"]}
4546

46-
__transonic__ = ("0.3.3",)
47+
48+
def __transonic__():
49+
return "0.7.1"

data_tests/saved__backend__/cython/class_rec_calls.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ def __for_method__Myclass__func(self_attr, self_attr2, arg):
1818
)
1919

2020

21-
__code_new_method__Myclass__func = """
21+
def __code_new_method__Myclass__func():
22+
return """
2223
2324
def new_method(self, arg):
2425
return backend_func(self.attr, self.attr2, arg)
2526
2627
"""
2728

28-
__transonic__ = ("0.3.3",)
29+
30+
def __transonic__():
31+
return "0.7.1"

0 commit comments

Comments
 (0)