-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
470 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: 'Setup Python and Poetry.' | ||
description: 'Set up Python, install Poetry, cache dependencies, and install them with Poetry.' | ||
|
||
inputs: | ||
python-version: | ||
description: 'Version of Python to use.' | ||
required: true | ||
default: '3.11' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Checkout LFS objects | ||
shell: bash | ||
run: git lfs checkout | ||
|
||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
|
||
- name: Cache python dependencies | ||
uses: actions/cache@v3 | ||
id: poetry-cache | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Get installed Playwright version | ||
id: playwright-version | ||
shell: bash | ||
run: | | ||
echo "::set-output name=version::$(poetry show playwright | grep "version" | awk '{print $3}')" | ||
- name: Cache playwright dependencies | ||
uses: actions/cache@v3 | ||
id: playwright-cache | ||
with: | ||
path: ~/.cache/ms-playwright/ | ||
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} | ||
|
||
- name: Ensure python poetry installed | ||
shell: bash | ||
run: | | ||
echo "playwright version: ${{ steps.playwright-version.outputs.version }}" | ||
python --version | ||
poetry --version | ||
- name: Install dependencies with Poetry | ||
shell: bash | ||
if: steps.poetry-cache.outputs.cache-hit != 'true' | ||
run: | | ||
mkdir ./dist && touch ./dist/README.md | ||
poetry install --no-interaction | ||
- name: Install playwright dependencies with Poetry | ||
shell: bash | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
run: poetry run playwright install chromium --with-deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
|
||
version: 2 | ||
updates: | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem | ||
- package-ecosystem: pip # poetry package manager wil be used | ||
directory: "/" | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
versioning-strategy: increase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Python CI | ||
|
||
on: | ||
push: | ||
branches: [ "develop", "master" ] | ||
pull_request: | ||
branches: [ "develop", "master" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images#available-images | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
|
||
- name: Setup Python and Poetry | ||
uses: ./.github/actions/linux | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Lint with mypy and flake8 | ||
env: | ||
FINGERPRINT_KEY: ${{ secrets.FINGERPRINT_KEY }} | ||
run: | | ||
mkdir ./dist && touch ./dist/README.md | ||
poetry run mypy pybas_automation/ tests/ | ||
poetry run flake8 pybas_automation/ tests/ | ||
test: | ||
needs: [ lint ] | ||
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images#available-images | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
|
||
- name: Setup Python and Poetry | ||
uses: ./.github/actions/linux | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Run tests with pytest | ||
env: | ||
FINGERPRINT_KEY: ${{ secrets.FINGERPRINT_KEY }} | ||
run: | | ||
mkdir ./dist && touch ./dist/README.md | ||
poetry run pytest -vv --cov=pybas_automation --cov-report=html tests/ | ||
poetry_build: | ||
needs: [ lint, test ] | ||
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images#available-images | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
|
||
- name: Setup Python and Poetry | ||
uses: ./.github/actions/linux | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Lint with mypy and flake8 | ||
run: | | ||
mkdir ./dist && touch ./dist/README.md | ||
poetry check | ||
poetry run python scripts/update_readme_links.py | ||
poetry build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## (2023-10-10) | ||
|
||
* chore: add LICENSE ([5a11117](https://github.com/sergerdn/py-bas-automation/commit/5a11117)) | ||
* chore(dev-ops): add github actions (#5) ([8d9a813](https://github.com/sergerdn/py-bas-automation/commit/8d9a813)), closes [#5](https://github.com/sergerdn/py-bas-automation/issues/5) | ||
* chore(docs): add CHANGELOG.md ([a808a6b](https://github.com/sergerdn/py-bas-automation/commit/a808a6b)) | ||
* chore(docs): add PROMO.md ([fafdfae](https://github.com/sergerdn/py-bas-automation/commit/fafdfae)) | ||
* chore(docs): update README.md ([fe9c50c](https://github.com/sergerdn/py-bas-automation/commit/fe9c50c)) | ||
* chore(github-actions): improve GitHub actions (#6) ([d2ce67a](https://github.com/sergerdn/py-bas-automation/commit/d2ce67a)), closes [#6](https://github.com/sergerdn/py-bas-automation/issues/6) | ||
* feat: initial public release ([e7e479d](https://github.com/sergerdn/py-bas-automation/commit/e7e479d)) | ||
* feat(release): 0.1.0 ([0416a5c](https://github.com/sergerdn/py-bas-automation/commit/0416a5c)) | ||
* feat(release): 0.1.1 ([0096d26](https://github.com/sergerdn/py-bas-automation/commit/0096d26)) | ||
* first commit ([12ae24b](https://github.com/sergerdn/py-bas-automation/commit/12ae24b)) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 sergerdn | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
🚀 **py-bas-automation: Supercharge BAS with Python!** 🚀 | ||
|
||
Born from a desire to harness the power of *BrowserAutomationStudio's browser capabilities* while leveraging the | ||
familiarity of *Python*, **py-bas-automation** stands out. It's more than just a tool — it's the fusion of the best of | ||
both worlds, culminating in a robust solution for web automation aficionados. | ||
|
||
💡 **Why I Created It**: | ||
|
||
- I needed only the browser component from *BAS*. | ||
- I am more adept in *Python* than other languages. | ||
- I believe the underlying idea can be transposed to any language thanks to the *Chrome DevTools Protocol*. | ||
|
||
🚧 **Note**: | ||
|
||
While I'm passionate about this project, you should understand that this isn't a very serious project. The | ||
main purpose is to deliver a message and share a concept. | ||
|
||
🔍 **Key Features**: | ||
|
||
- Seamless [BrowserAutomationStudio](https://bablosoft.com/shop/BrowserAutomationStudio) Integration. | ||
- Unique fingerprinting via [FingerprintSwitcher](https://fingerprints.bablosoft.com/) (Paid). | ||
- Efficient management with [Playwright](https://playwright.dev/python/). | ||
|
||
📸 Screenshots: | ||
|
||
![](https://sergerdn.github.io/py-bas-automation/images/bas_gui_window_3.png) | ||
|
||
🛠 **Requirements**: | ||
|
||
- Windows 10/11, Windows Server 2022 (21H2 tested). | ||
- Python 3.11+ | ||
- Git, Poetry & more. | ||
- 📝 **Experience**: | ||
- Familiarity with Python programming. | ||
- Knowledge of Git version control. | ||
- Understanding of dependency management, preferably with Poetry. | ||
|
||
🔧 **Get Started**: | ||
|
||
1. Clone the [repo](https://github.com/sergerdn/py-bas-automation). | ||
2. Install dependencies with Poetry. | ||
3. Dive into the [initial](https://github.com/sergerdn/py-bas-automation/blob/develop/cmd_initial.py) | ||
and [worker](https://github.com/sergerdn/py-bas-automation/blob/develop/cmd_worker.py) scripts to grasp the flow. | ||
|
||
🙌 **Contribute**: | ||
|
||
Got ideas or improvements? Open an [issue](https://github.com/sergerdn/py-bas-automation/issues/new) on GitHub. | ||
|
||
Step into the future of web automation with **py-bas-automation**😎! | ||
|
||
P.S. | ||
🚫 **No Private Support**: | ||
|
||
I do not provide free support via private messaging on forums, Telegram, or other platforms. For questions, | ||
clarifications, or any issues you encounter, kindly post your message here or create a new GitHub issue. | ||
|
||
This helps maintain transparency and also benefits others who might have similar queries. | ||
|
Oops, something went wrong.