jamesamcl / pysbolgraph

Simple native Python library to read and write Synthetic Biology Open Language (SBOL) files 🐍
http://sbolstandard.org
BSD 2-Clause "Simplified" License
5 stars 5 forks source link

Should each class be in a separate file? #13

Open jamesamcl opened 5 years ago

jamesamcl commented 5 years ago

Currently, we have a different file for each class in SBOL, as with the Java and JavaScript libraries. However, this may not be typical Python style. A more experienced Python developer may be able to advise.

sahitpj commented 5 years ago

A python package is usually divided into components - 1. main src, 2. Utils, 3. tests and other external functions which must be written.

Inside the src we again have the same structure, however this time instead of src, we have our object we have defined. This forms a recurring nested structure.

Classes which form a basis for other classes (the heart of the package and are independent) are generally deeper into the package (if that makes sense) compared to classes which are dependent on other classes. This thus forms a nested structure, and allows developers to better understand which class is dependent on the other. Makes debugging and version improvement.

I could help restructure the package if that would be okay? I am planning of applying for GSoC 2019, and I think this could be a good place to start 😄

jamesamcl commented 5 years ago

Hi! Sorry for the late reply. It would be great to see some ideas as to how we might better structure things. :+1:

jamesamcl commented 5 years ago

(closed the issue by accident ...)

sahitpj commented 5 years ago

Would it be okay, if I open A pull request with the structure which I was talking about?

jamesamcl commented 5 years ago

Yes, that would be great.