Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor #50

Open
timothyb0912 opened this issue Sep 5, 2020 · 0 comments
Open

Refactor #50

timothyb0912 opened this issue Sep 5, 2020 · 0 comments
Assignees

Comments

@timothyb0912
Copy link
Owner

timothyb0912 commented Sep 5, 2020

Request

The current codebase should be substantially simplified and clarified. There are a number of code smells (e.g. mega classes with no separation of concerns), and the codebase could benefit from following object oriented programming principles (e.g. composition over inheritance, dependency injection, etc.). The internals of PyLogit should undergo a large architectural refactor.

Things to do include:

  • reflect on and make use of most appropriate design patterns whenever possible. (Helpful tools here)
  • systematically search for and eliminate code smells
  • make use of more classes internally and less reliance on passing tons of arguments around
  • implement composition over inheritance
  • create custom exceptions
  • use python-valid8 for argument validation in functions
  • use attrs for class definition and validation of class initialization arguments
  • use marshmallow or cattr for serialization
  • use pydeps to generate dependency diagrams showing how modules relate to each other
  • use jupytext to version control notebooks
  • grappa for assertions in tests
  • behavioral testing (in Gherkin / English) for user acceptance testing
  • hypothesis for property testing and finding limits to the code
  • papermill for testing that the example notebooks run successfully
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant