Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-test-publish-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ defaults:

jobs:
build-test-publish-wheel:
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_test_publish_wheel.yml@v0.77.1
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_test_publish_wheel.yml@v0.88.1
with:
dry-run: true
python-package: nemo_run
python-version: "3.10"
packaging: hatch
packaging: setuptools
secrets:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
Expand Down
38 changes: 27 additions & 11 deletions nemo_run/package_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,35 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from packaging.version import Version

__version__ = "0.10.0rc0.dev0"
MAJOR = 0
MINOR = 10
PATCH = 0
PRE_RELEASE = ""

MAJOR = Version(__version__).major
MINOR = Version(__version__).minor
PATCH = Version(__version__).micro
if pre := Version(__version__).pre:
_PRE_RELEASE = "".join(map(str, pre))
else:
_PRE_RELEASE = ""
PRE_RELEASE = _PRE_RELEASE
DEV = Version(__version__).dev
# Use the following formatting: (major, minor, patch, pre-release)
VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE)

__shortversion__ = ".".join(map(str, VERSION[:3]))
__version__ = ".".join(map(str, VERSION[:3])) + "".join(VERSION[3:])

import os as _os # noqa: E402, I001
import subprocess as _subprocess # noqa: E402


if not int(_os.getenv("NO_VCS_VERSION", "0")):
try:
_git = _subprocess.run(
["git", "rev-parse", "--short", "HEAD"],
capture_output=True,
cwd=_os.path.dirname(_os.path.abspath(__file__)),
check=True,
universal_newlines=True,
)
except (_subprocess.CalledProcessError, OSError):
pass
else:
__version__ += f"+{_git.stdout.strip()}"

__package_name__ = "nemo_run"
__contact_names__ = "NVIDIA"
Expand Down
19 changes: 8 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ dependencies = [
"networkx >= 3.3",
"omegaconf>=2.3.0",
"leptonai>=0.26.6",
"packaging",
"toml",
]
readme = "README.md"
Expand Down Expand Up @@ -96,8 +95,14 @@ docs = [
]

[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
include = ["nemo_run*"]

[tool.setuptools.dynamic]
version = { attr = "nemo_run.package_info.__version__" }

[tool.uv]
managed = true
Expand Down Expand Up @@ -150,14 +155,6 @@ ignore_errors = true
[tool.coverage.html]
directory = "coverage_html_report"

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
packages = ["nemo_run"]

[tool.hatch.version]
path = "nemo_run/package_info.py"

[tool.ruff]
line-length = 100
11 changes: 6 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading