0.4 Final Week

My goal for the third week of 0.4 was to put the finishing touches on the function I’ve been writing, then write some tests.

Writing tests

The testing suite of the project takes advantage of a photo viewer called feh, which is only availabl…


This content originally appeared on DEV Community and was authored by Ahmad

My goal for the third week of 0.4 was to put the finishing touches on the function I've been writing, then write some tests.

Writing tests

The testing suite of the project takes advantage of a photo viewer called feh, which is only available on Linux systems. I created a Ubuntu VM and attempted to run my tests. I ran into a host of issues, detailed here. Apparently Ubuntu couldn't display the images fast enough for the tester. Taking the project owner's advice, I installed Lubuntu which finally ended up working.

Pull request

After all of that troubleshooting with the testing suite, I was finally able to create my PR. The project owner requested some minor changes, which I quickly addressed and pushed the fixes for. At the time of writing this though (December 10, 2021), he hasn't gotten back to approve those changes.

Run down

The passed world's position is calculated using the row and column values from worlds.json. Using the position, the scroll bar is clicked to attempt to get as close to the world as possible. If the world is not visible, the list will repeatedly scroll down a "tick" and the world will be searched for again. Once the world is found, it is clicked and we wait until the "Current world" text at the top of the world switcher changes. If it doesn't change before reaching the timeout time, false is returned.

Example

behavior.switch_worlds_logged_in("382")

Example

Outcomes

Working on this issue was a rollercoaster for me. I had a bunch of issues implementing my original idea. The scroll bar just did not want to cooperate, which I could not foresee. I ended up adding CV to click on the world and the scroll function from pyautogui to find it, if it was off the screen from the scroll bar's inconsistent behaviour.

The main takeaway I have from release 0.4, is that there will always be unforeseen issues. I never would have thought the scroll bar would be so inconsistent. Luckily, I was able to solve the problem with the help of the project owner and some friends.


This content originally appeared on DEV Community and was authored by Ahmad


Print Share Comment Cite Upload Translate Updates
APA

Ahmad | Sciencx (2021-12-10T14:43:05+00:00) 0.4 Final Week. Retrieved from https://www.scien.cx/2021/12/10/0-4-final-week/

MLA
" » 0.4 Final Week." Ahmad | Sciencx - Friday December 10, 2021, https://www.scien.cx/2021/12/10/0-4-final-week/
HARVARD
Ahmad | Sciencx Friday December 10, 2021 » 0.4 Final Week., viewed ,<https://www.scien.cx/2021/12/10/0-4-final-week/>
VANCOUVER
Ahmad | Sciencx - » 0.4 Final Week. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/10/0-4-final-week/
CHICAGO
" » 0.4 Final Week." Ahmad | Sciencx - Accessed . https://www.scien.cx/2021/12/10/0-4-final-week/
IEEE
" » 0.4 Final Week." Ahmad | Sciencx [Online]. Available: https://www.scien.cx/2021/12/10/0-4-final-week/. [Accessed: ]
rf:citation
» 0.4 Final Week | Ahmad | Sciencx | https://www.scien.cx/2021/12/10/0-4-final-week/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.