[FEATURE] Adjust the project structure, and allow installation via pip #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The structure of the project was reorganized in this PR. The main files of the current project are as follows:
data_save
folder is used to store additional data, such as function call information (funcs.json
) and vector database files.gpttrace
folder contains the main code of the project, whereGPTtrace.py
defines the entry function for GPTtrace.cmd.py
,execute.py
, andgenerate.py
correspond to the three options of thegpttrace
command:--cmd
,--execute
, and--generate
, respectively.config.py
is the project's configuration file.utils
folder contains other miscellaneous functions.pyproject.toml
defines the project's build environment and contents.The reorganized code structure has become clearer, and any further suggestions for improvement are welcomed.
Using the
pyproject.toml
file, gpttrace can be built usingpython -m build
and uploaded to PyPI. Refer to https://packaging.python.org/en/latest/tutorials/packaging-projects/ for more information. #9Currently, gpttrace can be installed using a more convenient way:
I have tested the above command and it currently installs and runs the gpttrace command properly.
I have registered a PyPI account, and currently, gpttrace is hosted under my account. Additionally, I have applied for an organization named eunomia-bpf. Once this application is approved, I will transfer the gpttrace project to the eunomia-bpf organization.