Skip to content

Conversation

mizaki
Copy link
Contributor

@mizaki mizaki commented Feb 11, 2023

Mostly based on the previous work. Changed passing in the current talker to the whole list for the settings window.

Copy link
Member

@lordwelch lordwelch left a comment

Choose a reason for hiding this comment

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

I think I also want to do some extra processing for the API key but I'm not sure what.

@mizaki
Copy link
Contributor Author

mizaki commented Feb 14, 2023

Possibly a lot of issues:

  • File location. Seemed to make sense as it was UI related but...?
  • File name?
  • Should the menu generator be a class?
  • I feel like there should be an easier way with the test api/url functions (making the whole thing a class?).
  • Adding separate functions for checking API and URL made sense to me.
  • Not sure on the benefit of moving the specific widget generator function out on their own? (Probably missing something.)

Rename test_api_key and test_api_url to api_key_btn_connect and api_url_btn_connect
Make separate function to set form values, called in settings_to_form
Change isinstance to is
Call findChildren only once
@mizaki
Copy link
Contributor Author

mizaki commented Feb 18, 2023

That should have addressed everything. General for talkers is looking a little bare now it only have the dropdown for the talker selection.

Copy link
Member

@lordwelch lordwelch left a comment

Choose a reason for hiding this comment

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

The last thing is I really don't like how the api key and URL are setup, it doesn't make sense to test the url separate from the API key, I know it makes generating the UI easier but I still don't like it. I'm planning on pushing a commit today to make it consistent across all talkers.

@mizaki
Copy link
Contributor Author

mizaki commented Feb 21, 2023

The last thing is I really don't like how the api key and URL are setup, it doesn't make sense to test the url separate from the API key, I know it makes generating the UI easier but I still don't like it. I'm planning on pushing a commit today to make it consistent across all talkers.

It's not so much about making it easier to generate, more that most APIs don't require a key so there will only be a URL to test. On that note, it looks like you've made every talker have an API key entry?

Generate API text field in their own function
API tests return string message of result
Add help to text field lables
Copy link
Member

@lordwelch lordwelch left a comment

Choose a reason for hiding this comment

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

When these last few comments are addressed I'll merge this.

Change metadata select label
Use named tuple for talker tabs
Retrun a string and bool for api check
@mizaki
Copy link
Contributor Author

mizaki commented Feb 24, 2023

The final "Make it return a tuple[str, bool]" didn't make sense to me for line 201?

@lordwelch
Copy link
Member

The final "Make it return a tuple[str, bool]" didn't make sense to me for line 201?

Right now it is only used to give a message in the GUI, but if it is ever to be used elsewhere I need to be able to determine if it is successful or not. With only a string I cannot determine if the test was successful or not.

@lordwelch
Copy link
Member

Now this extra commit needs to be removed aba59bd and I can merge

@mizaki
Copy link
Contributor Author

mizaki commented Feb 24, 2023

The final "Make it return a tuple[str, bool]" didn't make sense to me for line 201?

Right now it is only used to give a message in the GUI, but if it is ever to be used elsewhere I need to be able to determine if it is successful or not. With only a string I cannot determine if the test was successful or not.

The one for the API test I understood. It was the same comment for

for option in config[1][f"talker_{talker_id}"][1].values():
            current_widget = None

that had me confused. I wondered if it was a c/p mistake from the API one?

@mizaki
Copy link
Contributor Author

mizaki commented Feb 24, 2023

Now this extra commit needs to be removed aba59bd and I can merge

Not sure how that got in there. Must have been from the merge somehow. Reverted it.

@lordwelch lordwelch merged commit fca5818 into comictagger:develop Feb 28, 2023
@lordwelch
Copy link
Member

I wondered if it was a c/p mistake from the API one?

No idea how it got there???

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.

2 participants