[v3-dev] Define a directory structure for the jupyter_ai
package
#1152
Labels
enhancement
New feature or request
jupyter_ai
package
#1152
Problem
The Python code under
packages/jupyter-ai/jupyter_ai
lacks a directory structure. The location of each file was just determined by whoever added it first.This brings about a few minor issues for contributors:
test/
directory, which is often far removed from the source code it is testing.Proposed Solution
Define a directory structure under the "top level", which we use to denote
packages/jupyter-ai/jupyter_ai
:__init__.py
file that exports everything from within that directory.README.md
file that explains the contents of that directory & their purpose.For example, if we follow this structure,
config_manager.py
should be broken down into 4 files under a newconfig_manager/
directory:config_manager/config_manager.py
: Implements the config manager.config_manager/__init__.py
: Exports the config manager.config_manager/tests/
: Contains unit tests for the config manager, e.g.test_config_manager.py
.config_manager/README.md
: Explain the contents of this directory to developers.Additional context
This can be documented in the contributor docs for v3, but I don't think that's really a priority / something that needs to be tracked. The directory structure proposed here was designed to be fairly intuitive & obvious for other contributors to follow.
The text was updated successfully, but these errors were encountered: