Automating the pypi release process by 1) automate versioning for releases with bump2version (https://github.com/c4urself/bump2version), 2) also publishes LI internal use packages to li-detext.
For new releases, dev team need to
1) run the pypi_release.sh script.
2) merge the updated version into master
It'll publish two packages to detext (public use) and li-detext (LI internal use without dependencies). See RELEASING.md for more info.
Fixes # (issue)
Having to manually versioning and releasing internal/external packages separately.
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
List all changes
Please list all changes in the commit.
Refactored setup.py for VERSION, and move all dependencies to one line for easier sed command
In pypi_release.sh script, two packages are prepared. For LI usage, 2 sed commands are used for changing the package name and removing dependencies in setup.py. The original setup.py is restored afterwards. Sed is used as it's difficult to pass custom arguments into setup.py without breaking the installation.
Updated RELEASING.md
(minor) Updated python-app-py3.yml workflow to upgrade setuptools before installing dependencies to fix workflow failure
Testing
Tested both the public package pip install detext==2.0.8 and python setup.py develop
Verified li-detext==2.0.8 does not include the dependencies and can be imported to LI internally.
Test Configuration:
Firmware version:
Hardware:
Toolchain:
SDK:
Checklist
[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
Hi @zhoutong-fu @StarWang could you please help review the new changes when you get a chance? I added bump2version support for automatic versioning when publishing. Thanks!
Description
Automating the pypi release process by 1) automate versioning for releases with bump2version (https://github.com/c4urself/bump2version), 2) also publishes LI internal use packages to
li-detext
.For new releases, dev team need to 1) run the
pypi_release.sh
script. 2) merge the updated version into master It'll publish two packages todetext
(public use) andli-detext
(LI internal use without dependencies). SeeRELEASING.md
for more info.Fixes # (issue) Having to manually versioning and releasing internal/external packages separately.
Type of change
Please delete options that are not relevant.
List all changes
Please list all changes in the commit.
setup.py
forVERSION
, and move all dependencies to one line for easier sed commandpypi_release.sh
script, two packages are prepared. For LI usage, 2 sed commands are used for changing the package name and removing dependencies insetup.py
. The originalsetup.py
is restored afterwards. Sed is used as it's difficult to pass custom arguments intosetup.py
without breaking the installation.RELEASING.md
python-app-py3.yml
workflow to upgrade setuptools before installing dependencies to fix workflow failureTesting
Tested both the public package
pip install detext==2.0.8
andpython setup.py develop
Verifiedli-detext==2.0.8
does not include the dependencies and can be imported to LI internally.Test Configuration:
Checklist