Skip to content

Commit b63c1dc

Browse files
authored
chore: Bump next release to be 3.0 (#15783)
* chore: Bump next release to be 3.0 Signed-off-by: Charlie Truong <chtruong@nvidia.com> * Fix broken link in docs Signed-off-by: Charlie Truong <chtruong@nvidia.com> --------- Signed-off-by: Charlie Truong <chtruong@nvidia.com>
1 parent 73cfbcf commit b63c1dc

2 files changed

Lines changed: 34 additions & 4 deletions

File tree

docs/source/broken_links_false_positives.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,4 @@
8989
{ "filename": "asr/api.rst", "lineno": 1, "status": "broken", "code": 0, "uri": "https://docs.pytorch.org/docs/stable/tensor_attributes.html#torch.device", "info": "Anchor 'torch.device' not found" }
9090
{ "filename": "asr/api.rst", "lineno": 11, "status": "broken", "code": 0, "uri": "https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor", "info": "Anchor 'torch.Tensor' not found" }
9191
{ "filename": "audio/api.rst", "lineno": 1, "status": "broken", "code": 0, "uri": "https://docs.pytorch.org/docs/stable/tensor_attributes.html#torch.dtype", "info": "Anchor 'torch.dtype' not found" }
92+
{ "filename": "starthere/install.rst", "lineno": 27, "status": "broken", "code": 0, "uri": "https://docs.pytorch.org/docs/stable/notes/serialization.html#torch-load-with-weights-only-true", "info": "Anchor 'torch-load-with-weights-only-true' not found" }

nemo/package_info.py

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,45 @@
1313
# limitations under the License.
1414

1515

16-
MAJOR = 2
17-
MINOR = 8
16+
import os as _os # noqa: I001
17+
import subprocess as _subprocess
18+
from importlib.metadata import PackageNotFoundError as _PackageNotFoundError
19+
from importlib.metadata import version as _dist_version
20+
21+
22+
MAJOR = 3
23+
MINOR = 0
1824
PATCH = 0
19-
PRE_RELEASE = 'rc0'
25+
PRE_RELEASE = ""
2026

2127
# Use the following formatting: (major, minor, patch, pre-release)
2228
VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE)
2329

2430
__shortversion__ = ".".join(map(str, VERSION[:3]))
25-
__version__ = ".".join(map(str, VERSION[:3])) + "".join(VERSION[3:])
31+
_BASE_VERSION = __shortversion__ + "".join(VERSION[3:])
32+
33+
34+
def _source_tree_version() -> str:
35+
if int(_os.getenv("NO_VCS_VERSION", "0")):
36+
return _BASE_VERSION
37+
38+
try:
39+
git_sha = _subprocess.run(
40+
["git", "rev-parse", "--short", "HEAD"],
41+
capture_output=True,
42+
cwd=_os.path.dirname(_os.path.abspath(__file__)),
43+
check=True,
44+
text=True,
45+
).stdout.strip()
46+
except (_subprocess.CalledProcessError, OSError):
47+
return _BASE_VERSION
48+
return f"{_BASE_VERSION}+{git_sha}"
49+
50+
51+
try:
52+
__version__ = _dist_version("nemo-toolkit")
53+
except _PackageNotFoundError:
54+
__version__ = _source_tree_version()
2655

2756
__package_name__ = "nemo_toolkit"
2857
__contact_names__ = "NVIDIA"

0 commit comments

Comments
 (0)