feat(make): improve local cleanup and installation #24
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.
What was done?
This PR improves the local cleanup and installation process. The changes include:
cleanup
command in the Makefile now also uninstalls thegpt-pr
package.install
command now runscleanup
andrequirements
before installing, and usespip install .
instead ofpython setup.py install
.version
argument has been added to therun
function inmain.py
, which prints the current version of the package.version.py
file has been added, which is automatically generated when the package is released and contains the current version.setup.py
file now writes the current version toversion.py
when the package is installed.How was it done?
The changes were made by modifying the Makefile and several Python files. The
cleanup
andinstall
commands in the Makefile were updated to improve the cleanup and installation process. Therun
function inmain.py
was updated to add a newversion
argument. A newversion.py
file was added to store the current version of the package, and thesetup.py
file was updated to write the current version to this file.How was it tested?
The changes were tested by running the updated
cleanup
andinstall
commands and checking that they work as expected. The newversion
argument was tested by running therun
function with this argument and checking that it prints the correct version. The newversion.py
file was tested by checking that it is correctly generated when the package is released and contains the correct version. The updatedsetup.py
file was tested by installing the package and checking that it correctly writes the current version toversion.py
.