akaps / hanabi_ai

AI competition of the card game Hanabi, where the best AI is measured as the most cooperative and contributes to the highest scoring games
MIT License
1 stars 2 forks source link

Add __init__.py to root directory, travis tests fail #119

Closed akaps closed 5 years ago

akaps commented 5 years ago

Describe the bug We break relative imports by adding init.py to the root directory. We intend to do this to support linting the project

To Reproduce Steps to reproduce the behavior. Minimum expected steps:

  1. add init.py to root directory (see init_break branch for example)
  2. run a build on travis (see run 146 for example)
  3. Scripts pass. Tests fail for one of two reasons: a. import goes tools., when it should be hanabi_ai.tools. b. import playgame, which is now in a package (should be hanabi_ai.playgame)

Expected behavior No major changes to project, tests and scripts pass

Additional context Add any other context about the problem here.

akaps commented 5 years ago

Hey @C-Saunders, could you help me out? I'm at a loss. I think the idea is the root isn't a package directory (but it is if you have an init.py file, dammit), so you have to use relative paths. Once you support absolute paths you're mix and matching and getting bad results depending on how you are invoking playgame. What the solution is, I'm not sure. You can see all my failed attempts in #121

akaps commented 5 years ago

See #123 for how this was resolved