Skip to content

Conversation

@rahulr-NI
Copy link
Contributor

@rahulr-NI rahulr-NI commented Apr 8, 2025

  • This contribution adheres to CONTRIBUTING.md.
    CONTRIBUTING.md was modified to include the new parameters added while post-release, release using build_release.py file.

- [ ] I've updated CHANGELOG.md if applicable.
- [ ] I've added tests applicable for this pull request

What does this Pull Request accomplish?

These changes will give flexibility of releasing only necessary package of nimi-python individually.
In "tools\build_release.py", are modified as below

--drivers parameter is included to accept the driver names specifically. If this parameter is not fed as input, all the drivers are considered. If incorrect driver names are provided as input, an appropriate error is given.

--update input is converted as below inputs.
--increment-major-version : Will give an ability to increment the version to (N+1).X.X.dev0 .
--increment-minor-version : Will give an ability to increment the version to X.(N+1).X.dev0 .
--increment-patch-version : Will give an ability to increment the version to X.X.(N+1).dev0 .

--update-for-release is added as a replacement of --release. It also removes the "devN" from the version number. It can be done specifically for each driver based on the --drivers parameter fed as input. If the current version doesn't has "devN" , it gives appropriate error.

updateReleaseInfo.py file is updated to support the changes done for tools\build_release.py

For ReadTheDocs changed with respect to individual versioning , the python regex is modified to accept "driver-X.X.X" as release tags so that the new versions gets generated whenever there is a release tagging done.

List issues fixed by this Pull Request below, if any.

No Issues fixed

What testing has been done?

Below are the version bumping test cases executed.

<style> </style>
Test Case Command Expected
When the current version is dev0 python tools//build_release.py --drivers nidcpower --increment-patch-version Dev version found, updating 1.4.10.dev0 to 1.4.11.dev0 for nidcpower
Patch version bumping python tools//build_release.py --increment-patch-version -v updating 1.4.10.dev1 to 1.4.11.dev0 for all drivers based  on their numbers. If nidcpower had version of 1.4.11.dev1, it will be changed to 1.4.12.dev0
Minor Version bumping python tools//build_release.py --increment-minor-version -v updating 1.4.11.dev0 to 1.5.0.dev0
Major version bumping python tools//build_release.py --increment-major-version -v updating 1.5.0.dev0 to 2.0.0.dev0
Release command python tools//build_release.py --update-for-release -v updating 2.0.0.dev0 to 2.0.0  and LATEST_RELEASE file for all drivers
Release on release version (Ex :Current version is 1.4.11) python tools//build_release.py --update-for-release -v Error: Attempting to release an already released version for all each drivers
Update with single driver python tools//build_release.py --drivers nidcpower --increment-patch-version updating 1.4.10.dev0 to 1.4.11.dev0 for nidcpower
Update with Multiple drivers python tools//build_release.py --drivers nidcpower,niscope --increment-patch-version updating 1.4.10.dev0 to 1.4.11.dev0 for nidcpower,scope
Update with Wrong drivers python tools//build_release.py --drivers nidcpower,testdriver --increment-patch-version The following drivers are invalid: testdriver. Valid drivers are: nidcpower,nidigital,nidmm,nifake,niswitch,nimodinst,nifgen,niscope,nise,nitclk
Buld released versions python tools//build_release.py --build builds tox commands, cleans and generated respective files
More inputs for version bump python tools//build_release.py --increment-patch-version --increment-minor-version -v "Only one of --increment-major-version, --increment-minor-version, --increment-patch-version or --update-for-release can be provided."

@codecov-commenter
Copy link

codecov-commenter commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.34%. Comparing base (96b2711) to head (e874c59).
Report is 2 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (96b2711) and HEAD (e874c59). Click for more details.

HEAD has 9 uploads less than BASE
Flag BASE (96b2711) HEAD (e874c59)
nimodinstsystemtests 1 0
nisesystemtests 1 0
niswitchsystemtests 1 0
nidmmsystemtests 1 0
niscopesystemtests 1 0
nifgensystemtests 1 0
nidcpowersystemtests 1 0
nitclksystemtests 1 0
nidigitalsystemtests 1 0
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2090      +/-   ##
==========================================
- Coverage   91.34%   82.34%   -9.01%     
==========================================
  Files          66       28      -38     
  Lines       16292     4004   -12288     
==========================================
- Hits        14882     3297   -11585     
+ Misses       1410      707     -703     
Flag Coverage Δ
codegenunittests 84.95% <ø> (ø)
nidcpowersystemtests ?
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests ?
nidigitalunittests 68.44% <ø> (ø)
nidmmsystemtests ?
nifakeunittests 87.24% <ø> (ø)
nifgensystemtests ?
nimodinstsystemtests ?
nimodinstunittests 94.20% <ø> (ø)
niscopesystemtests ?
niscopeunittests 43.20% <ø> (ø)
nisesystemtests ?
niswitchsystemtests ?
nitclksystemtests ?
nitclkunittests 98.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 42 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96b2711...e874c59. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rahulr-NI rahulr-NI marked this pull request as draft April 8, 2025 06:40
@rahulr-NI rahulr-NI marked this pull request as ready for review April 8, 2025 12:53
@ni-jfitzger
Copy link
Collaborator

You're going to need to run flake8 on the Python scripts you touched and fix any failures.

@bkeryan
Copy link
Contributor

bkeryan commented Apr 8, 2025

@rahulr-NI You should always set the PR title. Don't use GitHub's default PR title.

@ni-jfitzger
Copy link
Collaborator

Release on release version python tools//build_release.py --increment-minor-version --update-for-release -v Error: Attempting to release an already released version for all each drivers

This seems wrong. Wouldn't that command lead to a different error because you can't specify 2 of those arguments together?

@ni-jfitzger ni-jfitzger linked an issue Apr 8, 2025 that may be closed by this pull request
@ni-jfitzger ni-jfitzger changed the title Proposal approach for Individual release of drivers in nimi-python Support releasing individual packages in nimi-python Apr 18, 2025
@ni-jfitzger
Copy link
Collaborator

No need to rerun the system tests. The only thing that's changed since we last ran them is the check_latest_release workflow.

@ni-jfitzger ni-jfitzger merged commit 8b52559 into ni:master Apr 24, 2025
10 checks passed
@rahulr-NI rahulr-NI deleted the users/rahur/release_indivitual_driver_version branch July 10, 2025 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update release process for independent package versioning

4 participants