diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 000000000..fcadf089e --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,29 @@ +name: Pylint Workflow + +on: + push: + branches: + - main + +jobs: + pylint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 # Specify the desired Python version (e.g., 3.8, 3.9) + + - name: Install dependencies + run: pip install pylint==2.4.4 + + - name: Run pylint + run: | + pip freeze + pylint --rcfile=tools/pylintrc --ignore=version.py,tflite --disable=cyclic-import tf2onnx tests/*.py tools -j 0 + displayName: 'Pylint' + +# Add other jobs or steps as needed diff --git a/ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml b/ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml index 2c4a54e7c..3206fbe19 100644 --- a/ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml +++ b/ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml @@ -19,8 +19,8 @@ steps: conda config --set always_yes yes --set changeps1 no pip install onnxconverter-common pip install $(ONNX_PATH) - pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" pip install h5py==3.7.0 pip install parameterized pip install timeout-decorator @@ -84,8 +84,8 @@ steps: echo Test numpy installation... && python -c "import numpy" pip install onnxconverter-common pip install %ONNX_PATH% - pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" pip install h5py==3.7.0 pip install parameterized pip install timeout-decorator diff --git a/ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml b/ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml index adb436f0a..e8475b15f 100644 --- a/ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml +++ b/ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml @@ -19,8 +19,8 @@ steps: conda config --set always_yes yes --set changeps1 no pip install onnxconverter-common pip install $(ONNX_PATH) - pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" pip install h5py==3.7.0 pip install parameterized pip install timeout-decorator @@ -67,8 +67,8 @@ steps: echo Test numpy installation... && python -c "import numpy" pip install onnxconverter-common pip install %ONNX_PATH% - pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" pip install h5py==3.7.0 pip install parameterized pip install timeout-decorator diff --git a/ci_build/azure_pipelines/templates/setup.yml b/ci_build/azure_pipelines/templates/setup.yml index 2e2e86c98..0045ef46c 100644 --- a/ci_build/azure_pipelines/templates/setup.yml +++ b/ci_build/azure_pipelines/templates/setup.yml @@ -30,7 +30,8 @@ steps: pip uninstall -y tensorflow pip install $(CI_PIP_TF_NAME) pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip install "protobuf~=3.20" + pip install protobuf python setup.py install diff --git a/setup.py b/setup.py index 85fece3a2..777651491 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ def run(self): author='ONNX', author_email='onnx-technical-discuss@lists.lfaidata.foundation', url='https://github.com/onnx/tensorflow-onnx', - install_requires=['numpy>=1.14.1', 'onnx>=1.4.1', 'requests', 'six', 'flatbuffers>=1.12', 'protobuf~=3.20'], + install_requires=['numpy>=1.14.1', 'onnx>=1.4.1', 'requests', 'six', 'flatbuffers>=1.12', 'protobuf'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers',