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

Add precommit #98

Merged
merged 5 commits into from
Feb 2, 2025
Merged

Add precommit #98

merged 5 commits into from
Feb 2, 2025

Conversation

douglasdcm
Copy link
Owner

@douglasdcm douglasdcm commented Feb 2, 2025

This Pull Request formats the code in black style and adds pre-commits to enforce it. Further PRs not following the style will fail automatically. @theijhay and @DONALDBZR there are PRs of you that may be impacted by this benevolent new rule. Before push new code, configure your pre-commit hook like this

pip install black pre-commit
pre-commit  install

After that all files will be formatted by black when you run git commit

Reach out to me in case of issues, please 🤟

@douglasdcm douglasdcm self-assigned this Feb 2, 2025
@douglasdcm douglasdcm marked this pull request as draft February 2, 2025 05:00
@douglasdcm douglasdcm marked this pull request as ready for review February 2, 2025 05:01
@douglasdcm douglasdcm changed the title Draft: Add precommit Add precommit Feb 2, 2025
@douglasdcm douglasdcm merged commit 7481df6 into main Feb 2, 2025
3 checks passed
@douglasdcm douglasdcm deleted the add-precommit branch February 2, 2025 05:11
theijhay pushed a commit to theijhay/guara that referenced this pull request Feb 2, 2025
* Add pre-commit configuration

* test

* Add black workflow

* Formatting the entire code

* Set line length
douglasdcm added a commit that referenced this pull request Feb 12, 2025
* Add Windows Calculator example using Guará + WinAppDriver

* Refactor CalculatorTransactions to add logging and error handling

* Refactor CalculatorTransactions to add logging and error handling

* Refactor CalculatorTransactions to improve code readability and maintainability

* Refactor setup.py to remove unnecessary whitespace

* Refactor setup.py to remove unnecessary whitespace and improve code readability

Refactor CalculatorTransactions to add logging and error handling

Update test_calculator.py to pass driver object to OpenAppTransaction and CloseAppTransaction

* Refactor setup.py to remove unnecessary whitespace and improve code readability

* Refactor setup.py to remove unnecessary whitespace in CloseAppTransaction class

* Refactor code to improve readability and maintainability

* Add precommit (#98)

* Add pre-commit configuration

* test

* Add black workflow

* Formatting the entire code

* Set line length

* Refactor test_calculator.py to remove unnecessary import

* Refactor test_calculator.py to remove unnecessary import

* Refactor test_calculator.py to use SumNumbers instead of CalculatorTransactions

* Implement AENA flight data scraper using Selenium and BeautifulSoup (#92)

* `Implement AENA flight data scraper using Selenium and BeautifulSoup`

**Description:**
- Added web scraping functionality to collect flight arrival data from AENA's website.
- Utilized Selenium WebDriver with headless Chrome for automation.
- Implemented BeautifulSoup for parsing flight details.
- Introduced transaction-based execution using `guara.transaction`.
- Stored flight data in JSON format while filtering outdated entries.
- Handled potential exceptions like `TimeoutException` and `NoSuchElementException`.
- Updated script status tracking for better monitoring.

* Fix linter issues

* Running pre-commit

* Refactor setup.py to use WindowsOptions for driver capabilities

* Refactor setup.py to use localhost instead of IP address for driver command executor

* Refactor test_calculator.py to remove unnecessary imports and add platform check for Windows

* Update black language version to python3.11 in .pre-commit-config.yaml

* Update black language version to python3.11 in .pre-commit-config.yaml

* Refactor get_aena_data() function in main.py

* Refactor validate_result() method in calculator.py

* Refactor validate_result() method in calculator.py and remove unused code

Refactor get_aena_data() function in main.py

Update black language version to python3.11 in .pre-commit-config.yaml

Remove complex setup in CI environment for Windows Calculator tests

Update test_calculator.py to use it.IAssertion for checking if value is shown in the calculator

Update test_calculator.py to use lazy import to avoid breaking the pipeline

Update test_calculator.py to use parametrize decorator for addition test cases

* Refactor calculator.py: Remove unused import

* add readme file

* Refactor main.py: Remove unused code in get_aena_data() function
Refactor setup.py: Remove unused import in winappdriver
Refactor test_calculator.py: Remove unused import and skip complex setup

* Refactor main.py: Remove unused code in get_aena_data() function

---------

Co-authored-by: Douglas Cardoso <29078346+douglasdcm@users.noreply.github.com>
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.

1 participant