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 js sdk folder to fish-tank #75

Merged
merged 26 commits into from
Nov 6, 2024
Merged

Conversation

frankfeng98
Copy link
Contributor

This PR added JS SDK folder to fish-tank repo and updated necessary VSCode settings as well as CI check for JS code.

Copy link
Contributor

@colriot colriot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming and folder structure

@@ -5,7 +5,7 @@ on:
types: [opened, synchronize, reopened]

jobs:
pre-commit:
python-pre-commit:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we call this pre-commit if it's already a PR-time check?

node-version: "20"

- name: Install dependencies
working-directory: ./javascript-sdk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should just call the folder js. it's not SDK, and JS a pretty widespread short name

await page.keyboard.press('Enter');

// Extract data using AgentQL API's queryData() method
const data = await page.queryData(PRODUCT_DATA_QUERY);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: inline data

Copy link
Contributor

@colriot colriot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unblock the dogfooding

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please have 2 separate precommit flows and add filtering for the path. Otherwise both python and JS flows will run regardless of where the change was made. I.e. we don't want to run JS precommit if python code was changed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood! I will update it in the upcoming PRs. For now, I will leave as it is so people could merge into this branch.

KateZhang98 and others added 7 commits October 29, 2024 13:17
* collect pricing data example

* update lint

* Update javascript-sdk/examples/collect-pricing-data/README.md

Co-authored-by: R L Nabors <rachelnabors@users.noreply.github.com>

---------

Co-authored-by: R L Nabors <rachelnabors@users.noreply.github.com>
* Add js example for list query usage

* lint

* Address security concerns

* lint

* Add review comments

* Lint

* Lint
* Add close-popup files

* Format

* Update example

* format

* Update javascript-sdk/examples/close-popup/README.md

* Update

---------

Co-authored-by: R L Nabors <rachelnabors@users.noreply.github.com>
* js example cookie

* readme

* link

* .

* agentql env key

* Update javascript-sdk/examples/close-cookie-dialog/README.md

* remove api key setup

---------

Co-authored-by: R L Nabors <rachelnabors@users.noreply.github.com>
* Add examples

* Format

* Update javascript-sdk/examples/log-into-sites/README.md

* Update

---------

Co-authored-by: R L Nabors <rachelnabors@users.noreply.github.com>
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

---------

Co-authored-by: R L Nabors <rachelnabors@users.noreply.github.com>
@frankfeng98
Copy link
Contributor Author

frankfeng98 commented Oct 31, 2024

TODO:

  1. Update all files to be main.py or main.js
  2. Update wrap() to be async
  3. Add back configure() since it does not have clear downside but may provide benefits if users skip README and directly copy-paste code? cc: @rachelnabors @colriot
  4. Add 'env.local file to JS and Python folders

Zechereh and others added 8 commits October 31, 2024 10:38
* Add js headless browser script
* Add example script

* Add readme

* Fix await

* Fix format

* Fix lint error

* Fix nits
* Add xpath application example

* Add extra comment

* linting

* `python` -> `Javascript`
* Add wait for entire page to load example script

* Add `await`

* `.py` -> `.js`
* submit form js example

* changes

* ran lint

* changes
@frankfeng98 frankfeng98 merged commit 4dcbde9 into main Nov 6, 2024
3 checks passed
@frankfeng98 frankfeng98 deleted the add_js_sdk_examples_folder branch November 6, 2024 01:33
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.