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

Big Refactor #25

Merged
merged 11 commits into from
Dec 15, 2022
Merged

Big Refactor #25

merged 11 commits into from
Dec 15, 2022

Conversation

jdholtz
Copy link
Owner

@jdholtz jdholtz commented Dec 10, 2022

This PR adds many new functionalities to the script.

First, a big refactor was done on the code base to make execution flow much more practical (Thanks to @sdstolworthy for the proposed refactors)

Next, a new feature was added (first proposed in #10) that will continuously monitor the account (if login credentials are provided) for new flights, scheduling check-ins automatically.

Last, a Changelog was added along with versioning so users can get a better understanding of the changes that are happening. For now on, changes will be done on the develop branch and will only be pushed during to master during on a new release.

I have tested this on a few flights and it has worked, but it would be great if others could also test their check-ins on this branch (git pull && git checkout refactor) and report their results in the comments.

This will be used to determine how often the script should check for new
flights (when login credentials are used).
The parent Flight Retriever class is responsible for holding all needed
objects, such as the configuration, notification handler, and checkin
scheduler. It also allows reservations to be scheduled directly or by
JSON retrieved from an account.

The Account Flight Retriever monitors an account every 24 hours
(default, but can be adjusted). If new flights are found, it will
schedule them using the Checkin Scheduler. This class is only
instantiated when a username and password are provided.
This change relates to the recent additions of a Flight Retriever.
Improves the readability of the class and adds documentation to further
understand the functionality.
The CheckIn Scheduler will schedule flight check-ins from confirmation
numbers. To schedule each flight's check in, it will use the CheckIn
Handler.
This class handles a check in for a single flight. This logic was taken
out of the Flight class, which is now just a class used to set the
correct flight departure time.
This class makes it very easy to send any notification that would be
helpful to the user.
Also delete Account now that it is unused
This script will now be versioned. I will also add a Changelog to
document all the changes within the script.
A Changelog will make it easier to track new changes and give users a
better idea of what is being done from version to version.
@davidkassa
Copy link
Contributor

I love the changelog idea. Can I recommend using Releases along with it? It'll allow people to watch for release notifications.

@jdholtz
Copy link
Owner Author

jdholtz commented Dec 11, 2022

Yes, I am planning to use releases as well (with tags).

@jdholtz jdholtz merged commit 7f33bc2 into master Dec 15, 2022
@jdholtz jdholtz deleted the refactor branch December 15, 2022 15:09
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