TODO: TODO_24_49_18_17.fix_proto_code_terms.md: kernel_copy has no proto in it for clarity. Merge concept with proto_kernel?
kernel_copy¶
What is kernel_copy?¶
kernel_copy is a copy of protoprimer.primer_kernel module
stored together with the client code in the target client repo.
kernel_copy vs proto_kernel vs primer_kernel¶
The 3 are nearly identical but intentionally distinct:
kernel_copyis a concept - a copy ofprotoprimer.primer_kernelmodule.proto_kernel.pyis specific name that depends on the host repo choice (not always the same).The actual file name
proto_kernel.pyis the default (but can be almost anything).primer_kernelis intentionally different fromproto_kernel.py(to avoid confusing imports).
Only a single own copy of [proto_kernel.py][local_proto_kernel.py] is needed per repo to be used by all "entry scripts".
The kernel_copy for this repo is stored at:
./cmd/proto_code/proto_kernel.py
With some config, the copy can be moved (under any directory, under any name).
Although it is possible to run the copy directly, it is more flexible to use entry scripts (wrappers):
Entry script [
./prime][local_prime] relies on theboot_envfunction (to prepare thevenv).Entry scripts in the [
./cmd][cmd_dir] dir mostly rely on thestart_appfunction (to start code from thevenv).
How is kernel_copy updated?¶
Specifically, for this repo, any changes to protoprimer.primer_kernel:
./src/protoprimer/main/protoprimer/primer_kernel.py
will be automatically reflected in kernel_copy:
./cmd/proto_code/proto_kernel.py
after running bootstrap via:
./prime
TODO: FT_34_97_51_30.optional_module.md:
Review this section if/when proto_code becomes a combination of multiple files.