mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-22 12:23:54 +01:00
create python directory and add TODO objectives
This commit is contained in:
parent
621f4bc8b1
commit
6ce91a6669
@ -15,7 +15,9 @@ python3 -m pip install dist/pytrexio-0.1-cp38-cp38-linux_x86_64.whl
|
||||
# Binary wheel 'pytrexio-0.1-cp38-cp38-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'.
|
||||
# when uploading the wheel instead of the tar.gz file to testpypi
|
||||
# This is a well-known issue, see https://stackoverflow.com/questions/59451069/binary-wheel-cant-be-uploaded-on-pypi-using-twine
|
||||
|
||||
python3 -m twine upload --repository testpypi dist/pytrexio-0.1.tar.gz
|
||||
|
||||
# TODO: see how SQLite does things since it-s similar to out problem in a way that the have src/ directory with C source and header files and they have master setup.py script to compile and ship it
|
||||
|
||||
#python3 -m twine upload --repository testpypi dist/pytrexio-0.1.tar.gz
|
||||
|
||||
rm -rf build dist pytrexio.egg-info
|
@ -4,6 +4,15 @@ import shutil
|
||||
|
||||
from pytrexio import *
|
||||
|
||||
# TODO: make a user-friendly more pythonic API that will have to be autogenerated
|
||||
# add Exception handling
|
||||
# check of dimensions and call to safe API
|
||||
# conversion to and from numpy arrays
|
||||
|
||||
# automatically download (hopefully the latest version) numpy.i using
|
||||
# wget https://raw.githubusercontent.com/numpy/numpy/main/tools/swig/numpy.i
|
||||
# but also keep the original copy in case if wget fails
|
||||
|
||||
#=========================================================#
|
||||
#======== SETUP THE BACK END AND OUTPUT FILE NAME ========#
|
||||
#=========================================================#
|
||||
@ -82,14 +91,18 @@ assert rc==TREXIO_SUCCESS
|
||||
|
||||
test_file2 = trexio_open(output_filename, 'r', TEST_TREXIO_BACKEND)
|
||||
|
||||
# TODO: think about adding exception handling if rc != TREXIO_SUCCESS throw an exception but do not return the code itself and then there is less arguments
|
||||
# TODO: maybe also for the write
|
||||
|
||||
result = trexio_read_nucleus_num(test_file2)
|
||||
assert result[0]==0
|
||||
assert result[0]==TREXIO_SUCCESS
|
||||
assert result[1]==nucleus_num
|
||||
#print(result)
|
||||
|
||||
charges2 = doubleArray(nucleus_num)
|
||||
for i in range(nucleus_num):
|
||||
charges2[i] = -1.
|
||||
print(charges2[3])
|
||||
#for i in range(nucleus_num):
|
||||
# charges2[i] = -1.
|
||||
|
||||
rc = trexio_read_nucleus_charge(test_file2, charges2)
|
||||
assert rc==TREXIO_SUCCESS
|
Loading…
Reference in New Issue
Block a user