diff --git a/.hgignore b/.hgignore index b82ac6ec572454308b0fbdf26b6da4d9241680e5_LmhnaWdub3Jl..4409494f5fb7c33f592a1339beedb00bf19ac59f_LmhnaWdub3Jl 100644 --- a/.hgignore +++ b/.hgignore @@ -51,8 +51,8 @@ */*.png */*_pythran.cpp -**/_pythran/_pythran_*.py -**/_pythran/_pythran_*.cpp +**/_pythran/_*.py +**/_pythran/_*.cpp bench/results_bench/*.json bench/oar_launcher_* diff --git a/bench/profile_time_stepping/init.py b/bench/profile_time_stepping/init.py index b82ac6ec572454308b0fbdf26b6da4d9241680e5_YmVuY2gvcHJvZmlsZV90aW1lX3N0ZXBwaW5nL2luaXQucHk=..4409494f5fb7c33f592a1339beedb00bf19ac59f_YmVuY2gvcHJvZmlsZV90aW1lX3N0ZXBwaW5nL2luaXQucHk= 100644 --- a/bench/profile_time_stepping/init.py +++ b/bench/profile_time_stepping/init.py @@ -28,6 +28,8 @@ print("used time stepping func:\n", sim.time_stepping._time_step_RK) """ +# cython +%timeit sim.time_stepping._time_step_RK() # numpy %timeit sim.time_stepping._time_step_RK2() # pythran @@ -50,4 +52,4 @@ 263 ms ± 5.38 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) 227 ms ± 9.36 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) -""" \ No newline at end of file +""" diff --git a/fluidsim/solvers/ns2d/strat/output/spatio_temporal_spectra.py b/fluidsim/solvers/ns2d/strat/output/spatio_temporal_spectra.py index b82ac6ec572454308b0fbdf26b6da4d9241680e5_Zmx1aWRzaW0vc29sdmVycy9uczJkL3N0cmF0L291dHB1dC9zcGF0aW9fdGVtcG9yYWxfc3BlY3RyYS5weQ==..4409494f5fb7c33f592a1339beedb00bf19ac59f_Zmx1aWRzaW0vc29sdmVycy9uczJkL3N0cmF0L291dHB1dC9zcGF0aW9fdGVtcG9yYWxfc3BlY3RyYS5weQ== 100644 --- a/fluidsim/solvers/ns2d/strat/output/spatio_temporal_spectra.py +++ b/fluidsim/solvers/ns2d/strat/output/spatio_temporal_spectra.py @@ -11,10 +11,6 @@ """ -from __future__ import division, print_function - -from builtins import range - import os import sys import time @@ -432,7 +428,7 @@ ax1.set_xlabel(r"$\omega / \omega_{i\omega}$") ax1.set_ylabel(r"$F(\omega)$") ax1.set_title( - "$\omega_+ ; (k_x, k_z) = ({:.2f}, {:.2f})$".format( + r"$\omega_+ ; (k_x, k_z) = ({:.2f}, {:.2f})$".format( self.sim.oper.kx[:: self.spatial_decimate][idx_mode], self.sim.oper.ky[:: self.spatial_decimate][idz_mode], ) @@ -449,7 +445,7 @@ ax2.set_xlabel(r"$\omega / \omega_{i\omega}$") ax2.set_ylabel(r"$F(\omega)$") ax2.set_title( - "$\omega_- ; (k_x, k_z) = ({:.2f}, {:.2f})$".format( + r"$\omega_- ; (k_x, k_z) = ({:.2f}, {:.2f})$".format( self.sim.oper.kx[:: self.spatial_decimate][idx_mode], self.sim.oper.ky[:: self.spatial_decimate][idz_mode], ) diff --git a/pyproject.toml b/pyproject.toml index b82ac6ec572454308b0fbdf26b6da4d9241680e5_cHlwcm9qZWN0LnRvbWw=..4409494f5fb7c33f592a1339beedb00bf19ac59f_cHlwcm9qZWN0LnRvbWw= 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,2 @@ [build-system] -requires = ["setuptools", "wheel", "numpy", "fluidpythran"] \ No newline at end of file +requires = ["setuptools", "wheel", "numpy", "fluidpythran>=0.0.3"] \ No newline at end of file diff --git a/setup.py b/setup.py index b82ac6ec572454308b0fbdf26b6da4d9241680e5_c2V0dXAucHk=..4409494f5fb7c33f592a1339beedb00bf19ac59f_c2V0dXAucHk= 100644 --- a/setup.py +++ b/setup.py @@ -51,6 +51,6 @@ here = Path(__file__).parent.absolute() -from fluidpythran.files_maker import create_pythran_files +from fluidpythran.files_maker import make_pythran_files paths = ["fluidsim/base/time_stepping/pseudo_spect.py"] @@ -55,6 +55,6 @@ paths = ["fluidsim/base/time_stepping/pseudo_spect.py"] -create_pythran_files([here / path for path in paths]) +make_pythran_files([here / path for path in paths]) time_start = time() config = get_config() @@ -123,7 +123,7 @@ "future >= 0.16", "h5py", "h5netcdf", - "fluidpythran", + "fluidpythran >= 0.0.3", ] if FFTW3: @@ -181,6 +181,7 @@ if use_pythran: ext_names = [] for root, dirs, files in os.walk("fluidsim"): + path_dir = Path(root) for name in files: if ( name.endswith("_pythran.py") @@ -184,7 +185,7 @@ for name in files: if ( name.endswith("_pythran.py") - or name.startswith("_pythran") + or path_dir.name == "_pythran" and name.endswith(".py") ): path = os.path.join(root, name) @@ -233,6 +234,4 @@ # ensure that you indicate whether you support Python 2, # Python 3 or both. "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", @@ -238,3 +237,2 @@ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", @@ -240,4 +238,5 @@ "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Cython", "Programming Language :: C", ], @@ -241,7 +240,7 @@ "Programming Language :: Cython", "Programming Language :: C", ], - python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", + python_requires=">=3.6", packages=find_packages(exclude=["doc", "examples"]), install_requires=install_requires, extras_require=dict(doc=["Sphinx>=1.1", "numpydoc"], parallel=["mpi4py"]),