Check Out What You'll Make
00:00 Project Overview. On-screen, you can see the expected file structure of the project. Once finished, the project’s file and directory tree will look like this. Yes, that is a lot of files, but don’t worry.
00:28 Granularity like this plays an important role in Python projects with larger codebases. It avoids the notorious circular dependency area that you may encounter if various parts of the code were in one big file.
src/ subfolder contains your Python modules and packages for the maze solver project. The
maze_solver package consists of several subpackages that group logically related code fragments, including models, the building blocks of the maze and its solution; view, the visualization of the graph with scalable vector graphics.
This structure will be added to in part two of this course, when you add extra features, such as binary file storage and solving the maze. There will also be the special
.__main__.py file, which makes the enclosing package runnable so that you will eventually be able to execute it directly from the command line using Python’s
-m option. When
01:28 launched like this, the package will read the specified file with your maze. After solving the maze, it renders the solution into an SVG format embedded in a temporary HTML file. The file is automatically opened in the default web browser.
pyproject.toml provides your project’s configuration, metadata, and dependencies defined in the TOML format. Eventually, the project will depend on one external library, which you’ll use to find the shortest path in the maze represented as a graph.
02:19 There is quite a bit of code involved in this project, so if you get stuck at any point, remember to download the accompanying materials and compare your code with the final code that’s provided.
Become a Member to join the conversation.