PTB-MR / mrpro

MR image reconstruction and processing.
https://ptb-mr.github.io/mrpro/
Apache License 2.0
13 stars 3 forks source link

file.flush() after file.write() in examples #374

Closed ckolbPTB closed 1 month ago

ckolbPTB commented 2 months ago

the flush is requiered

python -c "import tempfile; import pathlib; a=tempfile.NamedTemporaryFile(); a.write(bytes('1'*500, 'utf-8'));import numpy; print(numpy.loadtxt(a.name)>0);" fails

also, without the last few bytes might be missing from the h5. this will be difficult to tourbleshoot

Originally posted by @fzimmermann89 in https://github.com/PTB-MR/mrpro/issues/287#issuecomment-2225801925

github-actions[bot] commented 2 months ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/mrpro/algorithms/csm
   iterative_walsh.py15193%38
src/mrpro/algorithms/dcf
   dcf_voronoi.py53492%15, 48–49, 76
src/mrpro/algorithms/optimizers
   adam.py17194%64
src/mrpro/algorithms/reconstruction
   DirectReconstruction.py613641%52–57, 74–82, 94–96, 112–119, 133–144
   Reconstruction.py8188%20
src/mrpro/data
   AcqInfo.py123298%162, 200
   CsmData.py21386%14, 58–60
   DcfData.py37295%17, 65
   IData.py61395%124, 130, 134
   IHeader.py65297%76, 103
   KHeader.py1611293%23, 125–129, 164, 214, 225, 232–233, 236, 243
   KNoise.py24962%39–52
   MoveDataMixin.py1261489%14, 108, 124, 138–140, 201, 264, 278, 357, 377–378, 395–396
   QData.py32197%42
   SpatialDimension.py44198%64
   TrajectoryDescription.py14193%23
   acq_filters.py10190%47
src/mrpro/data/_kdata
   KData.py97991%107–108, 117, 125, 179–180, 215, 220–221
   KDataRemoveOsMixin.py29293%43, 45
   KDataSelectMixin.py20290%46, 62
   KDataSplitMixin.py48394%49, 79, 88
src/mrpro/data/traj_calculators
   KTrajectoryCalculator.py25292%23, 45
   KTrajectoryIsmrmrd.py13285%41, 50
   KTrajectoryPulseq.py29197%54
src/mrpro/operators
   CartesianSamplingOp.py50982%49–50, 55–56, 61–62, 88, 91, 114
   ConstraintsOp.py60297%46, 48
   EndomorphOperator.py51296%209, 213
   FiniteDifferenceOp.py27293%48, 113
   FourierOp.py77199%131
   GridSamplingOp.py122993%59–60, 69–70, 77–78, 81, 83, 85
   LinearOperator.py80495%32, 131, 251, 256
   Operator.py52198%21
   SliceProjectionOp.py166895%39, 46, 48, 54, 191, 212, 245, 285
   ZeroPadOp.py16194%30
src/mrpro/utils
   Rotation.py4532894%58–66, 106, 283, 369, 371, 398, 453, 458, 461, 476, 493, 498, 642, 647, 650, 666, 670, 745, 747, 755–756, 996, 1078
   filters.py61297%43, 48
   slice_profiles.py45687%18, 34, 111–114, 147
   sliding_window.py34197%34
   split_idx.py10280%43, 47
   zero_pad_or_crop.py31681%26, 30, 54, 57, 60, 63
TOTAL329619994% 

Tests Skipped Failures Errors Time
751 0 :zzz: 0 :x: 0 :fire: 1m 13s :stopwatch: