Skip to content

Commit

Permalink
Merge pull request #51 from IBM/v0.11
Browse files Browse the repository at this point in the history
Remove scm version
  • Loading branch information
dhruv5995 authored Nov 17, 2023
2 parents ebb6c33 + 94c648d commit 1e95570
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 35 deletions.
59 changes: 29 additions & 30 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,43 @@ name: Python package

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
env:
USERNAME: ${{ secrets.USERNAME }}
APIKEY: ${{ secrets.APIKEY }}
URL: ${{ secrets.URL }}
INSTANCE_ID: ${{ secrets.INSTANCE_ID }}
VERSION: ${{ secrets.VERSION }}
DEPLOYMENT_SPACE_NAME: ${{ secrets.DEPLOYMENT_SPACE_NAME }}
run: |
pytest
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --ignore=F821 --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
env:
USERNAME: ${{ secrets.USERNAME }}
APIKEY: ${{ secrets.APIKEY }}
URL: ${{ secrets.URL }}
INSTANCE_ID: ${{ secrets.INSTANCE_ID }}
VERSION: ${{ secrets.VERSION }}
DEPLOYMENT_SPACE_NAME: ${{ secrets.DEPLOYMENT_SPACE_NAME }}
run: |
pytest
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,4 @@ mlruns/

# playground file
playground.py
_version.py
.DS_Store
1 change: 1 addition & 0 deletions mlflow_watsonml/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.11.1"
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ibm_watson_machine_learning~=1.0.327
mlflow~=2.8.0
ibm_watson_machine_learning==1.0.327
mlflow>=2.6.0
python-dotenv~=1.0.0
boto3>=1.24.59
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
with open("requirements.txt", "r") as fh:
install_requires = fh.readlines()

exec(open("mlflow_watsonml/_version.py").read())

setup(
name="mlflow-watsonml",
version=__version__, # type: ignore
description="WatsonML MLflow deployment plugin",
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -24,6 +27,6 @@
},
entry_points={"mlflow.deployments": "watsonml=mlflow_watsonml.deploy"},
python_requires=">=3.9",
use_scm_version=True,
setup_requires=["setuptools_scm"],
# use_scm_version=True,
# setup_requires=["setuptools_scm"],
)

0 comments on commit 1e95570

Please sign in to comment.