superstar54 / weas-widget

A widget to visualize and edit atomic structures in Jupyter Notebook
https://weas-widget.readthedocs.io/en/latest/index.html
MIT License
19 stars 3 forks source link

decide on snake case vs camel case #42

Closed ltalirz closed 5 months ago

ltalirz commented 6 months ago

The current API mixes snake case and camel case

viewer.from_ase(atoms)
viewer.volumetricData = {"values": volume}
viewer.isoSettings = [{"isovalue": 0.0001, "mode": 0}]

Pythonic would be snake case

superstar54 commented 6 months ago

The reason they are mixed for the moment: the camel case is common in javascript, and is used in WEAS code. For the traits, e.g., volumetricData, there is also a counterpart in the WEAS code, facilitating straightforward synchronization without the need for a naming conversion map. For from_ase, it is only used in the Python code.

Pythonic would be snake case

Yes, it's better not to mix different styles. I would also like to use the snake case. Later, I will try to make a name map to do this, like:

{"volumetric_data": "volumetricData"}