GeezerVison is showing github.com — chore: lint mb samples (#316) · aditdn/python-aiplatform@be0d7d4
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/conftest.py +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 12 | 12 | # See the License for the specific language governing permissions and | 13 | 13 | # limitations under the License. | 14 | 14 |
| 15 | | -import pytest | 16 | | -from unittest import mock | 17 | 15 | from unittest.mock import MagicMock, patch | 18 | 16 |
| 19 | 17 | from google.cloud import aiplatform | | 18 | +import pytest | 20 | 19 |
| 21 | 20 |
| 22 | 21 | @pytest.fixture | |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/create_and_import_dataset_image_sample.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 |
| 17 | 17 | from google.cloud import aiplatform | 18 | 18 |
| | 19 | + | 19 | 20 | # [START aiplatform_sdk_create_and_import_dataset_image_sample] | 20 | 21 | def create_and_import_dataset_image_sample( | 21 | 22 | project: str, | |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/create_and_import_dataset_image_sample_test.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | # limitations under the License. | 14 | 14 |
| 15 | 15 |
| 16 | | -import test_constants as constants | 17 | | -import create_and_import_dataset_image_sample | 18 | | - | 19 | 16 | from google.cloud.aiplatform import schema | 20 | 17 |
| | 18 | +import create_and_import_dataset_image_sample | | 19 | +import test_constants as constants | | 20 | + | 21 | 21 |
| 22 | 22 | def test_create_and_import_dataset_image_sample( | 23 | 23 | mock_sdk_init, mock_create_image_dataset | |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/create_and_import_dataset_text_sample.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 |
| 17 | 17 | from google.cloud import aiplatform | 18 | 18 |
| | 19 | + | 19 | 20 | # [START aiplatform_sdk_create_and_import_dataset_text_sample] | 20 | 21 | def create_and_import_dataset_text_sample( | 21 | 22 | project: str, | |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/create_and_import_dataset_text_sample_test.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | # limitations under the License. | 14 | 14 |
| 15 | 15 |
| 16 | | -import test_constants as constants | 17 | | -import create_and_import_dataset_text_sample | 18 | | - | 19 | 16 | from google.cloud.aiplatform import schema | 20 | 17 |
| | 18 | +import create_and_import_dataset_text_sample | | 19 | +import test_constants as constants | | 20 | + | 21 | 21 |
| 22 | 22 | def test_create_and_import_dataset_text_sample(mock_sdk_init, mock_create_text_dataset): | 23 | 23 |
| |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/create_batch_prediction_job_sample.py +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 12 | 12 | # See the License for the specific language governing permissions and | 13 | 13 | # limitations under the License. | 14 | 14 |
| 15 | | -from typing import Optional, Sequence, Union | | 15 | +from typing import Sequence, Union | 16 | 16 |
| 17 | 17 | from google.cloud import aiplatform | 18 | 18 |
| | 19 | + | 19 | 20 | # [START aiplatform_sdk_create_batch_prediction_job_sample] | 20 | 21 | def create_batch_prediction_job_sample( | 21 | 22 | project: str, | |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/create_batch_prediction_job_sample_test.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | # limitations under the License. | 14 | 14 |
| 15 | 15 |
| 16 | | -import test_constants as constants | 17 | 16 | import create_batch_prediction_job_sample | | 17 | +import test_constants as constants | 18 | 18 |
| 19 | 19 |
| 20 | 20 | def test_create_batch_prediction_job_sample( | |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/create_training_pipeline_image_classification_sample.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 14 | 14 |
| 15 | 15 | from google.cloud import aiplatform | 16 | 16 |
| | 17 | + | 17 | 18 | # [START aiplatform_sdk_create_training_pipeline_image_classification_sample] | 18 | 19 | def create_training_pipeline_image_classification_sample( | 19 | 20 | project: str, | |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/create_training_pipeline_image_classification_sample_test.py +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | # limitations under the License. | 14 | 14 |
| 15 | 15 |
| 16 | | -import pytest | 17 | | -import test_constants as constants | 18 | 16 | import create_training_pipeline_image_classification_sample | | 17 | +import test_constants as constants | 19 | 18 |
| 20 | 19 |
| 21 | 20 | def test_create_training_pipeline_image_classification_sample( | |
Collapse file Copy file name to clipboardExpand all lines: samples/model-builder/import_data_text_classification_single_label_sample.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 |
| 17 | 17 | from google.cloud import aiplatform | 18 | 18 |
| | 19 | + | 19 | 20 | # [START aiplatform_sdk_import_data_text_classification_single_label_sample] | 20 | 21 | def import_data_text_classification_single_label( | 21 | 22 | project: str, | |
|