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 core SqftProForma implementation #17

Closed
pksohn opened this issue Feb 1, 2017 · 0 comments
Closed

Refactor core SqftProForma implementation #17

pksohn opened this issue Feb 1, 2017 · 0 comments

Comments

@pksohn
Copy link
Contributor

pksohn commented Feb 1, 2017

Goals we stated before are:

  • Better parameterization (too many hard-coded variables and path dependencies)
  • Better performance, if possible (probably mostly achieved by improving search in Improve search over feasible project configurations #13, reducing brute force complexity)
  • More readable/maintainable code

I've made some progress on this refactoring already, but figured I'd write this up here as well to stick with the process. The first step for better maintainability/readability is to bring much of the core functionality out of the SqftProForma class altogether. I've created new classes for:

  • The "reference table" that provides development possibilities for each combination of form and parking configuration (this was previously generated in the _generate_lookup method, but I wanted to distinguish names between this reference table and the actually "lookup" process that takes parcels are returns the most profitable configuration).
  • The lookup process itself

I keep the original SqftProForma for its loading and saving methods, and use it as a facade pattern to call the other stuff. This is a pretty simple use case for a facade but I think it makes it easier to read.

@pksohn pksohn modified the milestones: Version 0.1.0, v0.1.0, v0.1.1 Feb 1, 2017
@pksohn pksohn assigned conorhenley and martjanz and unassigned conorhenley Feb 10, 2017
@pksohn pksohn assigned conorhenley and unassigned martjanz Mar 1, 2017
@pksohn pksohn closed this as completed Mar 6, 2017
@pksohn pksohn modified the milestone: UDST v0.1 Mar 10, 2017
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

3 participants