Skip to content
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

Code migration from gemini #10

Merged
merged 8 commits into from
Sep 17, 2024
Merged

Code migration from gemini #10

merged 8 commits into from
Sep 17, 2024

Conversation

kaanHapptiq
Copy link
Contributor

No description provided.

Copy link
Collaborator

@mab-happtiq mab-happtiq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this pull request contains changes and commits that should not be here. I mean adding doc and gitattributes

in general when you create a PR. please review it first on your own before sending it to me. you should have noticed those extra files.

I think this happened because you created this branch from the docu branch not from main or maybe you need to rebase on main. I don't know what you did exactly so can you explain?

Comment on lines 78 to 94
def test_list_files_with_prefix(gcs_api_service, monkeypatch):
mock_client = MagicMock()
mock_bucket = MagicMock()
mock_blobs = [MagicMock(name="file1.txt"), MagicMock(name="file2.txt")]

mock_client.bucket.return_value = mock_bucket
mock_bucket.list_blobs.return_value = mock_blobs
monkeypatch.setattr(gcs_api_service, "client", mock_client)

bucket_name = "test-bucket"
prefix = "test-prefix/"

result = gcs_api_service.list_files_with_prefix(bucket_name, prefix)

assert result == ["file1.txt", "file2.txt"]
mock_client.bucket.assert_called_once_with(bucket_name)
mock_bucket.list_blobs.assert_called_once_with(prefix=prefix)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks correct. please attach screenshot of the result of test run

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-08-27 at 12 44 03 as discussed, I am getting missing attribute error..

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix the test now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
I ran the pytest locally after your correction, but I am getting this error for test_list_files_with_prefix

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting I dont have this error

@kaanHapptiq kaanHapptiq force-pushed the code-migration-from-gemini branch from 4dae4bf to 41ed9ee Compare August 27, 2024 11:27
@kaanHapptiq
Copy link
Contributor Author

image
I tried two times as I did not get any feedback.
tried to publish branch on test pipy with the following code, after yaml file updated for testing as well:

  • git tag -a v0.0.8.dev1 -m "Release version 0.0.8.dev1 for TestPyPI" then with test version 2 as ".dev2"
  • git push origin v0.0.8.dev1
    Error (see the ss): * invalid-publisher: valid token, but no corresponding publisher

Copy link
Contributor Author

@kaanHapptiq kaanHapptiq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this missing in the main code? and testing is also not added for def test_list_files_with_prefix... I think you already check them, after I delete the testing function in yaml we can merge this branch as well

@kaanHapptiq
Copy link
Contributor Author

Screenshot 2024-09-02 at 22 03 18 I dont know why but I have still this error by testing with 'testpy'

@kaanHapptiq kaanHapptiq self-assigned this Sep 11, 2024
@kaanHapptiq kaanHapptiq force-pushed the code-migration-from-gemini branch from f4ca890 to 00b11ef Compare September 12, 2024 19:18
@mab-happtiq mab-happtiq merged commit 619d79b into main Sep 17, 2024
78 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants