mayankkejriwal/GNOME-p3

Add __init__.py file to the monopoly_simulator directory and clarify build

Opened this issue · 0 comments

fsaad commented

The existing monopoly_simulator directory is treated as a Python project, for example:

from monopoly_simulator import location
from monopoly_simulator.dice import Dice
from monopoly_simulator.bank import Bank

but it does not contain an __init__.py file that specifies the directory is a Python package.

In the absence of a top-level setup.py script and monopoly_simulator/__init__.py file, it is not evident how to correctly run this code either from first principles or from the README.md file. While certain work-around involving symlinks or running python -m might work, in my sandbox these turned out to be brittle and nonstandard solutions (even for research-ware!).

Specifically, the recommendation is:

  1. Create __init__.py in monopoly_simulator/ making it a Python package.
  2. Write a minimal setup.py script that builds the software so that it can be executed and imported like any Python package.
  3. Document the steps needed to build and run the package in the README.md so that new users can reliably build the system in a standard way.