Decide and create the initial project structure
Closed this issue · 2 comments
rickstaa commented
User story
As a developer, I want to start with a clear project structure for the machine learning framework, so that developers can easily extend upon it later and users find it easy to use.
Considerations
Attributes
Things that were already decided
- We are going to use American English for both the code, comments and documentation.
- We are going to use a structure similar to openai gym for defining the environments.
- We are going to use a structure similar to openai spinning up for the learning algorithms.
- We are going to use subfolders for the 4 main framework components (control, modelling, simzoo, hardware).
- We are going to add new environments as a git submodule as they can get quite complex. Algorithms will be added as a folder.
- We are going to use Python 3 for the majority of the codebase. In case we are going to resolve to C++ or other lower-level languages.
- We are going to use pytorch instead of tensorflow because of its shallow learning curve and easy of use.
- We are going to use sphinx together with breathe for generating the documentation.
- Third-party algorithms will be imported from pipy or included as a submodule to be able to run them inside the run.py script.
- The documentation will be published on a separate
gh-pages
branch.
Things we still have to decide on
- We are going to use the semantic versioning style for versioning the project (versioning tags: 0.0.0).
- @panweihit we can also use v0.0.0 doesn't matter too much.
- We are going to use a code formatter in order to keeps the code clean and consistent.
- We can use [black, autopep8, yapf (https://github.com/google/yapf#knobs)). I mostly use black since it is easy to read and it uses double quotes it, however, is slightly more lengthy than autopep8 and yapf. @panweihit and @hongpengzhou let me know which style you prefer.
- We are going to use the google style for formatting our comments see the difference heere.
- I mostly used NumPy in the past as it was the standard in the companies I worked. Nevertheless, I think google style is more human-readable. This is also the style openai spinning up and openai gym uses. @panweihit, @hongpengzhou.
- We need to decide on the structure for the modelling packages. @hongpengzhou maybe you can propose something for the modelling (System identification) package. I think we can decide later on the structure of the hardware package as implementing this is as far as I understood it not yet on the horizon.
Project structure overview
For a first project, structure draft see the setup_folder_structure branch. The main chooses that were made are:
- Each simulation environment will have its own repository and will be included as a git submodule.
- Each algorithm will be placed in its own folder and is not a repository.
rickstaa commented
@panweihit, @hongpengzhou let me know what you think. Feel free to suggest other points that are not yet on the list. I will also double-check the list later to see if I missed something.
rickstaa commented
This proposal was accepted.