Commit Graph

463 Commits

Author SHA1 Message Date
Ian Bell
f0258a8d15 Prepare for cython 3.0
There is a bug in cython 3.0 with module-level dicts it seems
2023-08-06 11:56:09 -04:00
Ian Bell
de38f085cb Turn off the shared_ptr hacks 2023-08-06 11:55:05 -04:00
Ian Bell
39b5519ddb Make the AbstractState owned by State class public 2023-08-03 20:23:19 -04:00
Ian Bell
37c18d5006 Allow predefined mixtures to be added at runtime 2023-07-27 10:04:51 -04:00
Ian Bell
1c5f1768e5 Fix copying of State object with mixtures
need to keep phase imposed
2023-07-26 22:43:50 -04:00
Ian Bell
8066bc0a38 Fix two bugs in phase imposition for State class
The string comparison for phase will always fail because comparison is between bytes and str and phase setting should happen before update
2023-07-26 22:43:09 -04:00
Ian Bell
1ac6ee5383 Fix include path for fmtlib 2023-05-13 09:12:15 -04:00
Ian Bell
80c70e70f2 Fix fmtlib include path 2023-05-13 08:20:14 -04:00
Ian Bell
0ef60d9408 Also output the Fluid in State class 2023-02-04 13:29:18 -05:00
Jorrit Wronski
76daa5abe6 Force a native build on Linux instead of 64bit 2022-12-06 23:16:03 +01:00
Ian Bell
256b810f31 Fix constant generation after the clang-format 2022-04-06 10:54:40 -04:00
Julien Marrec
6913fc41dc Format macros, they keep getting picked incrementally by clang format + Strip trailing whitespaces
```
find . -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx|py)$' | xargs -I@ sed -i 's/[ \t]*$//' "@"
```
2022-04-01 07:39:35 -04:00
Julien Marrec
149a40d88b Add github action to build python wheels (including python 3.9 and 3.10) (#2097)
* Fix build error: `src/Backends/IF97/IF97Backend.h:54:34: error: call of overloaded ‘abs(double)’ is ambiguous`

Found with the manylinux_2_24_x86_64

gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

* Register MSVC 2019 and 2022 in setup.py

* setup.py: when calling cmake, build in parallel

* Enable using Env variables instead of passing them as args to setup.py

* Github actions for linux: try 1

* use actions/checkout@v3 for submodules

* mod setup.py:; typo

* Random shot for cibuildwheel for all platforms

* I thought package_dir was a flag, but it's positional

* typo in cmake_compiler

* add cython to setup_requires

* try a pryproject.toml to install cython

* try more requirements?

* pywin32 only found on win32 I guess

* Try with CIBW_BEFORE_BUILD instead

* try to enable msvc via vcvarsall on windows, and pass MACOSX_DEPLOYMENT_TARGET

* more tweaks for windoze

* disable tests for now (fails on windows)

* tweak mac again: it seems mac doesn't understand a C++ lambda, so like it's using pre C++11

* tweak

* try 10.15 for mac...

* try to  force C++11 since mac picks up the path where lambdas are used...

* Move back down to 10.9 now that C++11 is enabled and it works on mac, it should be enough

* Try to debug win32

* Enable part of the upload step (minus the upload) to list the wheels

* try to allow win32 to fail for now (instead of plain disabling)

* Disable the python_linux.yml workflow, so cibuildwheels works fine.

* Adjust the upload step to point to the right folder

* make LGTM python happy
2022-03-31 09:26:31 -04:00
Ian Bell
c06d2df794 Fix printing of State class 2021-10-02 15:05:56 -04:00
Ian Bell
64e27b95de Add function set_interaction_parameters 2021-07-27 14:50:09 -04:00
Bryan W. Weber
2ea29cfeaa Fix build on macOS (#2008)
The changes in #1990 require C++11 compiler support. On macOS 10.14 with
XCode 11.3, the -std=c++11 flag must be specified to the compiler.
2021-03-15 21:32:42 -04:00
Jorrit Wronski
7058c3f2df Reset the Python wrapper for PropsSI to a pre 47800331 state, should help with #1941 2020-07-28 16:07:39 +02:00
Ian Bell
e2b8d104b7 Fix docs for set_reference_stateD 2020-06-28 10:53:18 -04:00
Ian Bell
b73fc96895 Maybe this will work? 2020-06-05 20:59:20 -04:00
Ian Bell
dec07d1e93 Wrong argument, maybe this does it
See #1940 #1942
2020-06-02 22:28:08 -04:00
Ian Bell
4ea25dc0f1 Also add flags for cmake build 2020-06-02 22:14:20 -04:00
Ian Bell
b269a2f11e Fix(?) runtimes for python on windows
See #1940 and #1942
2020-06-02 22:13:46 -04:00
Jorrit Wronski
d6a983fdf9 This should fix #1941, validation is pending 2020-06-02 15:41:02 +02:00
Jorrit Wronski
2ab4cbf9ec Started to work on #1898, are we already done? 2020-05-13 10:41:50 +02:00
Jorrit Wronski
0b14b57fff Use the latest docker containers that include Python 3.8 - See also #1928 2020-05-09 23:58:41 +02:00
ian
db4520ebfa Maybe this includes python 3.3 for manylinux? 2020-05-08 23:53:33 -04:00
Ian Bell
ec2d8d9998 Hardcode compilation flags for py2.7 on windows
Couldn't get the tempfile compile tests to work in win10
2020-05-07 08:18:07 -04:00
Zach Baird
feec37f2d8 Fix pcsaft flash (#1913)
* fixing PC-SAFT flashes

* minor fixes from review

* corrections requested in review
2020-04-09 12:14:15 -04:00
ian
ceca199e73 Revert #1896 2020-02-22 14:07:18 -05:00
dailyllama
829e579ee3 Update init.py byte string in split for Py3.8 (#1896) 2020-02-07 13:27:22 -07:00
ian
4f2254f438 Seems a seek(0) is needed 2019-12-13 22:26:09 -07:00
ian
876d594fc0 Maybe fix shared_ptr in python too? 2019-12-13 20:23:10 -07:00
Zach Baird
8108b4b80b Adding PC-SAFT EOS (#1877)
* initial commit

* got pressure unit tests working

* Added density solver and tests

* Added enthalpy function

* Added unit tests for S and G

* partial addition of flash

* PCSAFT backend implemented

* added missing semicolon

* added missing semicolon
2019-12-12 20:49:22 -07:00
Ian Bell
5fbe19801f Py38 (#1878) 2019-12-12 20:34:00 -07:00
ian
e865dc94a5 Maybe this literal bytes isn't needed? 2019-12-02 19:17:34 -07:00
ian
13b4631b7a Fix list of fluids 2019-11-08 21:38:42 -07:00
ian
a95b1f4d45 Add compressibility_factor to Python; closes #1855 2019-09-19 22:25:29 -06:00
ian
07d9b1033a Let bitness not be specified 2019-08-11 22:00:52 -06:00
ian
84dcbda935 Allow REFPROP error threshold to be changed; closes #1847 2019-08-11 21:43:29 -06:00
Ian Bell
0e7437f95b More pep8 whitespace; see #1612 2019-01-12 20:48:56 -07:00
Ian Bell
3b1eb50324 More pep8 whitespace; see #1612 2019-01-12 20:45:25 -07:00
Ian Bell
8d131a2e59 More safe whitespace changes 2019-01-12 20:24:55 -07:00
Ian Bell
4423219f2b pep8 whitespace 2019-01-12 20:14:51 -07:00
Ian Bell
f5a2ab3de1 Maybe fix some doxylink errors 2019-01-12 17:19:29 -07:00
Ian Bell
13554d0047 Remove reference to unicode 2019-01-12 00:53:56 -07:00
Ian Bell
252d9faef9 Try without unicode 2019-01-12 00:15:21 -07:00
Ian Bell
8a59e56788 Also add six 2019-01-11 23:04:49 -07:00
Ian Bell
b3bc946e06 Another Py 2->3 2019-01-11 22:59:38 -07:00
Ian Bell
a73e447f92 Revert changes for FMT; should have been done in branch (sorry @jowr) 2019-01-11 21:27:56 -07:00
Ian Bell
a83b13d05c Python should add FMT header only? 2019-01-11 20:57:44 -07:00