-
Notifications
You must be signed in to change notification settings - Fork 317
Prepare for 0.7.3 release #744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
53a8076
Bump nixtla release version
gee-senbong fa6635d
Fix package_and_upload_nixtla
gee-senbong fd8fcad
Revise fix
gee-senbong 3883ae0
Merge branch 'main' into senbong/release-0.7.3
gee-senbong 46a8496
Versioning in pyproject.toml & remove setup tool
gee-senbong 78178c7
Revise package_and_upload_nixtla
gee-senbong e15597b
Fix lint type warnings in snowflake_install_nixtla.py
gee-senbong b19be0d
Fix nixtla/scripts/snowflake_install_nixtla.py format issue
gee-senbong 7644691
Fix nixtla/scripts/snowflake_install_nixtla.py lint issues
gee-senbong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| __version__ = "0.7.2" | ||
| __version__ = "0.7.3" | ||
| __all__ = ["NixtlaClient"] | ||
| from .nixtla_client import NixtlaClient | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -582,33 +582,46 @@ def detect_package_installer() -> tuple[list[str], bool]: | |||||||||
| ) | ||||||||||
|
|
||||||||||
|
|
||||||||||
| def package_and_upload_nixtla(session: Session, stage: str) -> None: | ||||||||||
| def package_and_upload_nixtla( | ||||||||||
| session: Session, stage: str, fallback_package_source: Optional[str] = None | ||||||||||
| ) -> None: | ||||||||||
| """ | ||||||||||
| Package nixtla client and upload to Snowflake stage. | ||||||||||
|
|
||||||||||
| Args: | ||||||||||
| session: Active Snowflake session | ||||||||||
| stage: Stage name to upload to | ||||||||||
| fallback_package_source: Local path to nixtla package (e.g. project root) | ||||||||||
| used as a fallback when the current version is not yet on PyPI. | ||||||||||
| """ | ||||||||||
| with TemporaryDirectory() as tmpdir: | ||||||||||
| # Import version from nixtla package | ||||||||||
| from nixtla import __version__ as nixtla_version | ||||||||||
|
|
||||||||||
| # Detect package installer | ||||||||||
| pip_cmd, use_uv = detect_package_installer() | ||||||||||
|
|
||||||||||
| # Install packages with appropriate flags | ||||||||||
| # UV uses --target instead of -t | ||||||||||
| install_args = pip_cmd + [ | ||||||||||
| # Build base install args (shared between PyPI and fallback attempts) | ||||||||||
| base_args = pip_cmd + [ | ||||||||||
| "--target" if use_uv else "-t", | ||||||||||
| tmpdir, | ||||||||||
| f"nixtla=={nixtla_version}", | ||||||||||
| "utilsforecast", | ||||||||||
| "httpx", | ||||||||||
| "--no-deps", # Avoid pulling in heavy things like pandas/numpy into the ZIP | ||||||||||
| ] | ||||||||||
| extra_deps = ["utilsforecast", "httpx"] | ||||||||||
| no_deps_flag = ["--no-deps"] # Avoid pulling in heavy things like pandas/numpy | ||||||||||
|
|
||||||||||
| subprocess.run(install_args, check=True) | ||||||||||
| # Try the released PyPI version first | ||||||||||
| pypi_args = base_args + [f"nixtla=={nixtla_version}"] + extra_deps + no_deps_flag | ||||||||||
| pip_result = subprocess.run(pypi_args) | ||||||||||
|
|
||||||||||
| if pip_result.returncode != 0 and fallback_package_source is not None: | ||||||||||
| print( | ||||||||||
| f"[yellow]nixtla=={nixtla_version} not found on PyPI, " | ||||||||||
| f"falling back to local package: {fallback_package_source}[/yellow]" | ||||||||||
| ) | ||||||||||
| fallback_args = base_args + [fallback_package_source] + extra_deps + no_deps_flag | ||||||||||
| subprocess.run(fallback_args, check=True) | ||||||||||
| elif pip_result.returncode != 0: | ||||||||||
| # No fallback available — surface the original error | ||||||||||
| pip_result.check_returncode() | ||||||||||
|
||||||||||
| elif pip_result.returncode != 0: | |
| # No fallback available — surface the original error | |
| pip_result.check_returncode() | |
| pip_result.check_returncode() |
How about we always use check_returncode() regardless of the state of returncode? Per my understanding, it enforces "Does nothing if the return code is 0 (indicating success)"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest that in the near future, we standardize the naming of version similar to what we do in the other repositories like https://github.com/Nixtla/datasetsforecast/pull/83/changes
We also need to revise pyproject.toml file