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

script to setup test env #520

Closed
jcbirdwell opened this issue Jan 14, 2024 · 6 comments
Closed

script to setup test env #520

jcbirdwell opened this issue Jan 14, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@jcbirdwell
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Austin mentioned it in their PR #517 and I wholeheartedly agree. I've probably spent about as much time setting up/fixing my test environment as I have actually contributing code and the setup almost dissuaded me from requesting the pull... It's a solution that I considered implementing during the tail end of my oauth overhaul when a bunch of errors seemed to stem from discrepancies in test.cfg setup, but didn't as it was already too long.

Describe the solution you'd like
CLI python script similar to setup that walks you through adding oauth and browser auth (copy paste etc but writes the values both to files in the test dir by default and adds inputs to tests.cfg), creating the brand accounts (under their correct auth accounts), followed by a simple script for building out a suitable and standardized brand account library to run the tests against ie saving tracks, albums, creating playlists etc.

Describe alternatives you've considered
DevOps is by no means my specialty so I'm open to suggestions in terms of fancy pipeline/pdm etc solutions, but I think even a partial implementation of the above spec would be well worth it.
Further documentation of the test setup could alleviate some of the pain, but I'd consider it alone to be inadequate.

@sigma67 sigma67 added the documentation Improvements or additions to documentation label Jan 14, 2024
@sigma67
Copy link
Owner

sigma67 commented Jan 14, 2024

I agree and I'm aware of the issue. Not sure if creating the brand account is worth automating, I think it's not super trivial to do.

But filling the test.cfg could probably be done in an automated manner. Before automating should probably attempt to simplify that file though (fewer entries where not needed), to avoid too much effort.

@jcbirdwell
Copy link
Contributor Author

Not sure if creating the brand account is worth automating, I think it's not super trivial to do.

Maybe not fully automated, but jumping the user to the correct links via webbrowser with some instruction might streamline the process.

But filling the test.cfg could probably be done in an automated manner. Before automating should probably attempt to simplify that file though

Automation of the brand account library contents would drastically simplify the test.cfg by removing the need for any of the limits, uploads, albums, playlists, and queries sections. Items to be added/kept in the brand account could be externalized to a json file.

(fewer entries where not needed), to avoid too much effort.

I would say lowering some of the current limit values would aid the creation process, like 300 library artists may be a bit excessive for an account only used for testing.

@sigma67
Copy link
Owner

sigma67 commented Jan 14, 2024

I see what you're getting at now with automatically populating a new brand account 👍 Great idea.

I think we could also narrow down the different accounts that are currently used to just three:

  • main account for uploads - brand accounts can't do uploads (using browser auth)
  • brand account for content manipulation (using oauth)
  • empty account for empty content tests

sigma67 added a commit that referenced this issue Feb 4, 2024
sigma67 added a commit that referenced this issue Feb 4, 2024
@sigma67
Copy link
Owner

sigma67 commented Feb 4, 2024

@jcbirdwell I added a script, feel free to review

@sigma67
Copy link
Owner

sigma67 commented Feb 27, 2024

To be fair I don't think the whole brand account for testing thing is realistic anymore. At least not without a change to YouTube's policy.

They have already banned my testing account due to their "spam" policy

@sigma67
Copy link
Owner

sigma67 commented Mar 1, 2024

After appealing they unblocked it again - so it seems they're not actively opposed, it's just automatically caught.

@sigma67 sigma67 closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants