add option to only save certain particle props#1273
Conversation
Analysis for project
|
| Tool | Category | Rule | Count | |
|---|---|---|---|---|
| black | Style | Incorrect formatting, autoformat by running qlty fmt. |
1 | ❌ |
@qltysh one-click actions:
- Auto-fix formatting (
qlty fmt && git push)
| exportRasters = False | ||
| # use LZW compression when writing TIFF raster files | ||
| useCompression = True | ||
| # particle properties - list all properties that shall be saved, t is always added |
There was a problem hiding this comment.
Add info that particle property list can be found in the documentation
| if isinstance(dictList, list): | ||
| for dict in dictList: | ||
| if particleProperties != "": | ||
| particlesToSave = {key: dict[key] for key in particleProperties} |
There was a problem hiding this comment.
Here (and further down): if key is not available (eg. typo) it just fails with KeyError. Maybe validate the particle properties first in this function and throw an error right away with info about the wrong key.
| particlesToSave = dictList | ||
| fi = open(outDir / ("particles_%s_%09.4f.pickle" % (logName, dictList["t"])), "wb") | ||
| pickle.dump(dictList, fi) | ||
| pickle.dump(particlesToSave, fi) |
There was a problem hiding this comment.
This and the above could be written in only one statement after the if/else block
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Components (1)
Modified Files with Diff Coverage (1)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|

No description provided.