Skip to content

Commit

Permalink
Unify Python SDK Build Version and decouple Feathr Maven Version (fea…
Browse files Browse the repository at this point in the history
…thr-ai#746)

* unify python package version and enable env setting for scala version

Signed-off-by: Yuqing Wei <[email protected]>

* update docs and decouple maven version

Signed-off-by: Yuqing Wei <[email protected]>

* change version back to 0.8.0 to avoid conflicts

Signed-off-by: Yuqing Wei <[email protected]>

* fix typo

Signed-off-by: Yuqing Wei <[email protected]>

Signed-off-by: Yuqing Wei <[email protected]>
  • Loading branch information
Yuqing-cat authored Oct 19, 2022
1 parent b8e3b27 commit fa10e72
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/dev_guide/feathr_overall_release_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ Read through the [commit log](https://github.com/feathr-ai/feathr/commits/main)
## Code Changes
Before the release is made, the version needs to be updated in following places
- [build.sbt](https://github.com/feathr-ai/feathr/blob/main/build.sbt#L3) - For Maven release version
- [setup.py](https://github.com/feathr-ai/feathr/blob/main/feathr_project/setup.py#L10) - For PyPi release version
- [version.py](https://github.com/feathr-ai/feathr/blob/main/feathr_project/feathr/version.py#L1) - For Feathr version
- [conf.py](https://github.com/feathr-ai/feathr/blob/main/feathr_project/docs/conf.py#L27) - For documentation version
- [feathr_config.yaml](https://github.com/feathr-ai/feathr/blob/main/feathr_project/test/test_user_workspace/feathr_config.yaml#L84) - To set the spark runtime location for Azure Synapse and Azure Databricks used by test suite.
- [constants.py](https://github.com/feathr-ai/feathr/blob/73656fe4a57219e99ff6fede10d51a000ae90fa1/feathr_project/feathr/constants.py#L31) - To set the default maven artifact version
- [feathr_config.yaml](https://github.com/feathr-ai/feathr/blob/main/feathr_project/test/test_user_workspace/feathr_config.yaml#L84) - To set the spark runtime location for Azure Synapse and Azure Databricks used by test suite. Please update all .yaml files under this path.
- [azure_resource_provision.json](https://github.com/feathr-ai/feathr/blob/main/docs/how-to-guides/azure_resource_provision.json#L114) - To set the deployment template to pull the latest release image.
- [constants.py](https://github.com/feathr-ai/feathr/blob/main/feathr_project/feathr/constants.py#L31) - To set the default maven artifact version (Only needed when maven version is **NOT** the same as python sdk version)

## Triggering automated release pipelines
Our goal is to automate the release process as much as possible. So far, we have automated the following steps
Expand Down
7 changes: 2 additions & 5 deletions feathr_project/feathr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pkg_resources

from .client import FeathrClient
from .spark_provider.feathr_configurations import SparkExecutionConfiguration
from .definition.feature_derivations import *
Expand All @@ -19,6 +17,7 @@
from .definition.settings import *
from .utils.job_utils import *
from .utils.feature_printer import *
from .version import __version__

# skipped class as they are internal methods:
# RepoDefinitions, HoconConvertible,
Expand Down Expand Up @@ -75,7 +74,5 @@
'ObservationSettings',
'FeaturePrinter',
'SparkExecutionConfiguration',
__version__,
]


__version__ = pkg_resources.require("feathr")[0].version
6 changes: 5 additions & 1 deletion feathr_project/feathr/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
TYPEDEF_ARRAY_DERIVED_FEATURE=f"array<feathr_derived_feature_{REGISTRY_TYPEDEF_VERSION}>"
TYPEDEF_ARRAY_ANCHOR_FEATURE=f"array<feathr_anchor_feature_{REGISTRY_TYPEDEF_VERSION}>"

FEATHR_MAVEN_ARTIFACT="com.linkedin.feathr:feathr_2.12:0.8.2"
# Decouple Feathr MAVEN Version from Feathr Python SDK Version
import os
from feathr.version import __version__
FEATHR_MAVEN_VERSION = os.environ.get("FEATHR_MAVEN_VERSION", __version__)
FEATHR_MAVEN_ARTIFACT=f"com.linkedin.feathr:feathr_2.12:{FEATHR_MAVEN_VERSION}"

JOIN_CLASS_NAME="com.linkedin.feathr.offline.job.FeatureJoinJob"
GEN_CLASS_NAME="com.linkedin.feathr.offline.job.FeatureGenJob"
1 change: 1 addition & 0 deletions feathr_project/feathr/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.8.0"
14 changes: 13 additions & 1 deletion feathr_project/setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
import sys
import os
from setuptools import setup, find_packages
from pathlib import Path

# Use the README.md from /docs
root_path = Path(__file__).resolve().parent.parent
long_description = (root_path / "docs/README.md").read_text(encoding="utf8")

try:
exec(open("feathr/version.py").read())
except IOError:
print("Failed to load Feathr version file for packaging.",
file=sys.stderr)
sys.exit(-1)

VERSION = __version__ # noqa
os.environ["FEATHR_VERSION"] = VERSION

setup(
name='feathr',
version='0.8.2',
version=VERSION,
long_description=long_description,
long_description_content_type="text/markdown",
author_email="[email protected]",
Expand Down

0 comments on commit fa10e72

Please sign in to comment.