Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Minimum Product: moved managers to their own package #263

Closed
wants to merge 3 commits into from

Conversation

danalex97
Copy link
Contributor

Fixes #257

@OlafSzmidt
Copy link
Contributor

Ah... It's the os.path I missed. Good job:)

OlafSzmidt
OlafSzmidt previously approved these changes Sep 29, 2017
@danalex97
Copy link
Contributor Author

danalex97 commented Sep 29, 2017

Also changed it to work on Windows just now. It was using /../...

@OlafSzmidt
Copy link
Contributor

Does this now work on both UNIX and Windows?

@danalex97
Copy link
Contributor Author

danalex97 commented Sep 29, 2017

This particular class, I think so.

@OlafSzmidt
Copy link
Contributor

OlafSzmidt commented Sep 29, 2017

Just pulled from your fork. Works on UNIX (but more and more often I'm starting to see the socket error with an address being in use now and I need to kill processes manually. That's a different story though and could be because I stop tests mid-way sometimes).

Can't approve as I'm not requested.

@OlafSzmidt
Copy link
Contributor

Would it be possible to replace the '..', '..', '..' with an absolute path?

@CelineBoudier
Copy link
Contributor

We need to be cross platform, anything with / inside won't work on Windows

@danalex97
Copy link
Contributor Author

@CelineBoudier Removed the remaining "/". Good catch 👍
@OlafSzmidt There are some solutions here, but I don't find those nicer. 😞

Regarding the socket error, that is probably due to the tests being stopped halfway. We could catch the signal and kill those automatically, but idk if is worthed spending time on that. You can do something like pkill -9 python to kill by hand if you work on only one Python project at a time.

@ramonfmir
Copy link
Contributor

pkill -9 python... classic @danalex97

OlafSzmidt
OlafSzmidt previously approved these changes Sep 29, 2017
from .dummy_avatar import WaitDummy
from simulation.managers.turn_manager import ConcurrentTurnManager, SequentialTurnManager
from .dummy_avatar import DummyAvatarManager, MoveEastDummy, MoveNorthDummy
from .dummy_avatar import MoveSouthDummy, MoveWestDummy, WaitDummy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might make more sense to import WaitDummy and DummyAvatarManager then the Directions one separately?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@OlafSzmidt
Copy link
Contributor

Squash?

@danalex97
Copy link
Contributor Author

danalex97 commented Sep 29, 2017

👍

@OlafSzmidt
Copy link
Contributor

Can't approve. @CelineBoudier

@danalex97
Copy link
Contributor Author

Apparently, one can re-request reviews? 🤔

OlafSzmidt
OlafSzmidt previously approved these changes Sep 29, 2017
@OlafSzmidt
Copy link
Contributor

Github isn't smart enough to notice that a rebase is actually a change, so you need to dismiss old review and request a new one, yep :P

Copy link
Contributor

@CelineBoudier CelineBoudier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve when it's more squashed :)

@OlafSzmidt OlafSzmidt added this to the Minimum Lovable Product milestone Sep 29, 2017
CelineBoudier
CelineBoudier previously approved these changes Sep 29, 2017
@CelineBoudier
Copy link
Contributor

So actually, I think that:

  • We should maybe think about keeping workers with workers and turns with turns rather than creating a manager folder?
  • If a WorkerManager is actually the Worker service, while not call it Worker without the manager? If it does something specific, we should name it so we understand what is actually managed if it makes sense?

@danalex97
Copy link
Contributor Author

danalex97 commented Oct 4, 2017

@CelineBoudier I don't find this harmful nor beneficial, so I guess we could leave it like it is. Regarding the naming I think the name WorkerManager is quite good, as its only purpose is actually keeping an updated set of workers that can be pinged for actions by the TurnManager.

Should we close this, then?

Another comment not necessarily on this topic, but on refactoring: If the purpose of restructuring the folder structure is to group the dependencies together, I think the main concern should be breaking the world_map class in smaller components and removing unnecessary dependencies. (as I think that is the hardest class to work with and will probably change a lot as new features appear)

@OlafSzmidt
Copy link
Contributor

#282.

@OlafSzmidt OlafSzmidt closed this Oct 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants