POSYDON-code / POSYDON-code/POSYDON
Better handle of None objects
Open
@kkovlakas is already working on this.
Since Jan 9, 2024.
enhancement
help wanted
P3 - low priority
- Dominant language
- Python
- Stars
- 45
- Forks
- 37
- Avg merge
- 8d 20h
- Merged PRs (30d)
- 5
Description
In the code an object is set to None, if not defined. This requires careful usage.
- Trying to access a sub-object/function, e.g.
None.dtypewill always fail. -> We always need to check for None before performing a sub-function or requesting a sub-object. - Any mathematical operator will fail, if one of the variables is of
NoneType. -> We shouldn't useNonefor any float or integer variables, butnp.naninstead.
I'm not sure, whether there are other things, so feel free to add possible issues occurring from None objects!
Maybe there are some functions, which don't work with None objects, but most should. Thus, whenever you add a new function (including ones imported from modules) check that they can handle Nones or make sure, that there is a check before in the code!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.