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

Refactoring and test modules #1049

Open
Ealb opened this issue Mar 6, 2019 · 5 comments
Open

Refactoring and test modules #1049

Ealb opened this issue Mar 6, 2019 · 5 comments
Assignees

Comments

@Ealb
Copy link
Collaborator

Ealb commented Mar 6, 2019

Lord Brimstone has been doing some code streamlining and working to add test modules to ensure integrity - which is kinda important given how sprawling and random NG runtime behavior is, and how unlikely certain outcomes can be to arise in practice. This is a catch-all issue for general refactoring and such.

@elmokki
Copy link
Owner

elmokki commented Mar 6, 2019

That's great. I made him a collaborator to streamline things.

I will have to remark that while it would be a massive job, simply rewriting some things from scratch might be worth it. There's no real need to even consider keeping the current algorithms because they're pretty much ad hoc stuff anyway. As long as the end result makes NationGen-level of sense it's all good.

@lord-brimstone
Copy link
Collaborator

Thanks for the collaborator access! I might very well end up rewriting some things from scratch, but I'll have to be very careful with that because I don't want to miss something I didn't even know NationGen could do. So for now my plan was just to try to break down some of the larger classes and methods into smaller more manageable pieces so that I can unit test them. Easier said than done, I know =)

@lord-brimstone
Copy link
Collaborator

I've pushed a major code refactor to a new branch called "data-integrity". I don't want to push it to master until others have a chance to test out my changes and make sure I haven't royally screwed anything up. So, @Ealb , if you don't mind, would you please take my code for a test-drive?

@Ealb
Copy link
Collaborator Author

Ealb commented Apr 2, 2020

@lord-brimstone , is this issue complete, or would you consider it still open?

@lord-brimstone
Copy link
Collaborator

It's probably close to being complete. I think it could still use some more testing, though. My goal is to A) minimize data errors via unit tests, and B) give useful exception messages for data errors during runtime. All other errors are likely refactoring mistakes on my part (like the null pointer you messaged me about), and those need to be ironed out before I'm satisfied.

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