fdict icon indicating copy to clipboard operation
fdict copied to clipboard

Clarify the api

Open LecrisUT opened this issue 2 years ago • 2 comments

It is not so clear what the api for the dictionary and variable are. Ideally there should be a table matching the C++/Python interface to the fortran one. Basic API that should be documented:

  • [ ] Constructor
  • [ ] Adding a kv pair. If it already exists error/throw
  • [ ] Assigning a value to a key. If it doesn't exist error/throw
  • [ ] Add or assign
  • [ ] Get value
  • [ ] Delete key (deleting pointer or not)
  • [ ] Delete dictionary (deleting pointer or not)
  • [ ] Pop key
  • [ ] Itteration
  • [ ] Get size
  • [ ] Check if key exist

Those are dictionary, but for variable, that does not have a clear C++/Python counterpart, so I'm not sure what needs to be documented.

LecrisUT avatar Jun 09 '23 17:06 LecrisUT

I agree, this was largely a small library that I never got around to document heavily. But clearly it should be :)

Due to the small size I put small examples in the README.md, but even that isn't complete.

zerothi avatar Jun 09 '23 18:06 zerothi

I would first suggest that the README.md to only have a simple mwe example and move other documentation to a proper markdown page that can be rendered in ReadTheDocs. (Not sure how well doxygen for fortran is working these days).

Otherwise, the documentation in the README.md is still confusing, e.g. it is not clear that assign is usable for dictionary as well as variable.

LecrisUT avatar Jun 09 '23 18:06 LecrisUT