diff --git a/dev/prerelease.py b/dev/prerelease.py index be7f48a2..7f9f31b1 100644 --- a/dev/prerelease.py +++ b/dev/prerelease.py @@ -5,7 +5,7 @@ if sys.version_info.major != 3 and sys.version_info.minor != 11: raise ValueError("""This prerelease script will only run on Python 3.11. Some parts of a library change the last few decimals numbers between releases, -and other parts only have obsolete dependencies i.e. pint on Python 2. +and other parts only have obsolete dependencies i.e. pint on earlier Python versions. For that reason, while the pytest test suite runs everywhere, the notebooks and doctests only run on one platform.""") @@ -56,4 +56,4 @@ def set_file_modification_time(filename, mtime): import pytest os.chdir(main_dir) -pytest.main(["--doctest-glob='*.rst'", "--doctest-modules", "--nbval", "-n", "2", "--dist", "loadscope", "-v"]) +pytest.main(["--doctest-glob='*.rst'", "--doctest-modules", "--nbval", "-n", "8", "--dist", "loadscope", "-v"]) diff --git a/docs/Examples/Crane TP 410 Solved Problems/7.12 Orifice Size for Given Pressure Drop and Velocity.ipynb b/docs/Examples/Crane TP 410 Solved Problems/7.12 Orifice Size for Given Pressure Drop and Velocity.ipynb index 938f4218..f8d98124 100644 --- a/docs/Examples/Crane TP 410 Solved Problems/7.12 Orifice Size for Given Pressure Drop and Velocity.ipynb +++ b/docs/Examples/Crane TP 410 Solved Problems/7.12 Orifice Size for Given Pressure Drop and Velocity.ipynb @@ -31,19 +31,16 @@ "output_type": "stream", "text": [ "Numerical solver progress:\n", - "131456.15219585435 0.5 0.6039115256189872\n", - "131207.12176475654 0.50015 0.6039153509057876\n", - "45473.862634446166 0.5791807761904849 0.6054825449702658\n", - "22370.32441146282 0.6210574900828658 0.6055902955169561\n", - "7540.117114796503 0.6616052047236758 0.6047579998102253\n", - "1943.8952815589291 0.6822208651128452 0.603821274023946\n", - "240.43355375056126 0.689381890202793 0.6033941586008842\n", - "9.046411468669248 0.6903926265655572 0.6033292369143312\n", - "0.0442207298365247 0.6904321427501375 0.6033266747856294\n", - "8.184524631360546e-06 0.6904323368622791 0.6033266621954346\n", - "4.729372449219227e-11 0.6904323368982127 0.6033266621931039\n", + "131456.14904692862 0.5 0.6039115256189872\n", + "131207.12017516745 0.50015 0.6039153509057876\n", + "45473.52362140946 0.5791812700976602 0.6054825503405404\n", + "22370.19792138349 0.6210577694292391 0.6055902934716847\n", + "7540.056806983848 0.6616054200344094 0.6047579920946973\n", + "1943.8664434596685 0.6822209749771645 0.6038212679012359\n", + "240.43098826401547 0.6893818974732472 0.6033941581381093\n", + "9.046744122446398 0.6903926241593472 0.6033292370702888\n", "Size is:\n", - "8.241152594519694 inch\n" + "8.241150267140824 inch\n" ] } ], @@ -108,7 +105,7 @@ " err = (calc_dP - dP_meter).to_base_units()\n", " print(err.magnitude, beta, C.magnitude)\n", " return err.magnitude\n", - "beta = newton(to_solve, .5, tol=1e-13)\n", + "beta = newton(to_solve, .5, tol=1e-4)\n", "print('Size is:')\n", "print((Di*beta).to(u.inch))" ] diff --git a/docs/Examples/Crane TP 410 Solved Problems/7.30 Nozzle Sizing Calculations.ipynb b/docs/Examples/Crane TP 410 Solved Problems/7.30 Nozzle Sizing Calculations.ipynb index 65b7fecd..025edf52 100644 --- a/docs/Examples/Crane TP 410 Solved Problems/7.30 Nozzle Sizing Calculations.ipynb +++ b/docs/Examples/Crane TP 410 Solved Problems/7.30 Nozzle Sizing Calculations.ipynb @@ -57,7 +57,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Nozzle diameter found to be 2.405956560384601 inch.\n" + "Nozzle diameter found to be 2.405956564895703 inch.\n" ] } ], @@ -98,13 +98,13 @@ { "data": { "text/html": [ - "0.983900143257091 dimensionless" + "0.9839001432452787 dimensionless" ], "text/latex": [ - "$0.983900143257091\\ dimensionless$" + "$0.9839001432452787\\ dimensionless$" ], "text/plain": [ - "0.983900143257091 " + "0.9839001432452787 " ] }, "execution_count": 3, @@ -126,13 +126,13 @@ { "data": { "text/html": [ - "1.2691031737597416 pound_force_per_square_inch" + "1.2691031722533113 pound_force_per_square_inch" ], "text/latex": [ - "$1.2691031737597416\\ \\mathrm{pound\\_force\\_per\\_square\\_inch}$" + "$1.2691031722533113\\ \\mathrm{pound\\_force\\_per\\_square\\_inch}$" ], "text/plain": [ - "1.2691031737597416 " + "1.2691031722533113 " ] }, "execution_count": 4, diff --git a/docs/developers.rst b/docs/developers.rst index 54c37319..069dbc82 100644 --- a/docs/developers.rst +++ b/docs/developers.rst @@ -135,11 +135,11 @@ On UNIX/Mac OS/WSL, the notebook results can be regenerated with the following s for i in *.ipynb ; do python3 -m nbconvert --to notebook --inplace --ClearMatadataPreprocessor.clear_cell_metadata=True --ClearMetadataPreprocessor.enabled=True --ClearMetadataPreprocessor.clear_notebook_metadata=True --execute "$i" ; done -Or to do the same on all notebooks in all directories: +Or to do the same on all notebooks in all directories, in parallel (4 processes): .. code-block:: bash - find . -iname '*.ipynb' -exec python3 -m nbconvert --to notebook --inplace --ClearMatadataPreprocessor.clear_cell_metadata=True --ClearMetadataPreprocessor.enabled=True --ClearMetadataPreprocessor.clear_notebook_metadata=True --execute {} \; + find . -iname '*.ipynb' -print0 | xargs -0 -P 4 -I {} python3 -m nbconvert --to notebook --inplace --ClearMatadataPreprocessor.clear_cell_metadata=True --ClearMetadataPreprocessor.enabled=True --ClearMetadataPreprocessor.clear_notebook_metadata=True --execute {} Continuous Integration ---------------------- diff --git a/fluids/__init__.py b/fluids/__init__.py index 675728c6..f1d11055 100644 --- a/fluids/__init__.py +++ b/fluids/__init__.py @@ -156,7 +156,7 @@ def load_types(): type_module(m) -__version__ = '1.0.25' +__version__ = '1.0.26' try: fluids_dir = os.path.dirname(__file__) diff --git a/setup.py b/setup.py index 1641f3b5..e5860221 100644 --- a/setup.py +++ b/setup.py @@ -67,8 +67,8 @@ name='fluids', packages=['fluids'], license='MIT', - version='1.0.25', - download_url='https://github.com/CalebBell/fluids/tarball/1.0.25', + version='1.0.26', + download_url='https://github.com/CalebBell/fluids/tarball/1.0.26', description=description, long_description=open('README.rst').read(), install_requires=["numpy>=1.5.0", "scipy>=1.6.0"],