Skip to content

Commit

Permalink
Verify datasources in launch, use Python 3.11, add python_variable_na…
Browse files Browse the repository at this point in the history
…me when datasource is found
  • Loading branch information
fabioz authored Dec 6, 2024
1 parent 393e349 commit 961e119
Show file tree
Hide file tree
Showing 57 changed files with 2,819 additions and 879 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Install pip deps
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
- name: Yarn install
run: yarn install

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install deps
run: pip install --upgrade pip fire poetry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
node-version: 20.x
- name: Yarn install
run: yarn install
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Install deps
run: pip install --upgrade pip fire poetry
- name: Vendor sema4ai_ls_core
Expand Down
63 changes: 0 additions & 63 deletions .github/workflows/tests-robocorp-python-ls-core.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/tests-sema4ai-python-ls-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Tests - Python Language Server Core (sema4ai-python-ls-core)

on:
push:
paths:
- sema4ai-python-ls-core/**
- .github/**

pull_request:
paths:
- sema4ai-python-ls-core/**
- .github/**

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
name: ["windows-py311", "ubuntu-py311", "macos-py311"]

include:
- name: "windows-py311"
python: "3.11"
os: windows-latest
- name: "ubuntu-py311"
python: "3.11"
os: ubuntu-latest
- name: "macos-py311"
python: "3.11"
os: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Upgrade pip, install fire, poetry
run: |
python -m pip install --upgrade pip
pip install fire poetry
- name: poetry install
working-directory: ./sema4ai-python-ls-core
run: |
poetry install
- name: Test
working-directory: ./sema4ai-python-ls-core/tests
env:
PYTHONPATH: .
run: poetry run python -u ./run_tests.py -rfE -otests_output -vv .
- uses: actions/upload-artifact@v4
with:
name: tests_output.${{ matrix.name }}.txt
path: sema4ai-python-ls-core/tests/tests_output
84 changes: 84 additions & 0 deletions .github/workflows/tests-sema4ai-sdk-data-server-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Tests - Sema4.ai Data Server Integration (sema4ai)

on:
push:
paths:
- sema4ai/**
- sema4ai-python-ls-core/**
- .github/**

pull_request:
paths:
- sema4ai/**
- sema4ai-python-ls-core/**
- .github/**

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
name: [
"ubuntu-py311",
"windows-py311",
# "mac-py311", mac disabled because it takes too long for runners to pick the mac job up.
]

include:
- name: "ubuntu-py311"
python: "3.11"
os: ubuntu-latest
- name: "windows-py311"
python: "3.11"
os: windows-latest
# - name: "mac-py311"
# python: "3.11"
# os: mac-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Vendor sema4ai_ls_core
working-directory: ./sema4ai
run: |
pip install fire poetry
python -m dev vendor-robocorp-ls-core
- name: poetry install
working-directory: ./sema4ai
run: poetry install
- name: Run codegen
run: python -m dev codegen
working-directory: ./sema4ai
env:
PYTHONPATH: src
- name: Test
working-directory: ./sema4ai/tests
env:
PYTHONPATH: .
CI_CREDENTIALS: ${{ secrets.CI_CREDENTIALS }}
CI_ENDPOINT: ${{ secrets.CI_ENDPOINT }}
# Big timeout to create environment in windows.
RUN_TESTS_TIMEOUT: 3000
ACTION_SERVER_TEST_ACCESS_CREDENTIALS: ${{ secrets.ACTION_SERVER_TEST_ACCESS_CREDENTIALS }}

run: poetry run python -u ../../sema4ai-python-ls-core/tests/run_tests.py -rfE -otests_output_data_server -vv -m data_server .

- uses: actions/upload-artifact@v4
if: always()
with:
name: tests_output_data_server.${{ matrix.name }}.txt
path: sema4ai/tests/tests_output_data_server
- uses: actions/upload-artifact@v4
if: always()
with:
name: log_data_server.${{ matrix.name }}.html
path: sema4ai/tests/output/log.html

Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ jobs:
fail-fast: false
matrix:
name: [
"ubuntu-py310",
"windows-py310",
# "mac-py310", mac disabled because it takes too long for runners to pick the mac job up.
"ubuntu-py311",
"windows-py311",
# "mac-py311", mac disabled because it takes too long for runners to pick the mac job up.
]

include:
- name: "ubuntu-py310"
python: "3.10"
- name: "ubuntu-py311"
python: "3.11"
os: ubuntu-latest
- name: "windows-py310"
python: "3.10"
- name: "windows-py311"
python: "3.11"
os: windows-latest
# - name: "mac-py310"
# python: "3.10"
# - name: "mac-py311"
# python: "3.11"
# os: mac-latest

steps:
Expand Down Expand Up @@ -69,7 +69,8 @@ jobs:
RUN_TESTS_TIMEOUT: 3000
ACTION_SERVER_TEST_ACCESS_CREDENTIALS: ${{ secrets.ACTION_SERVER_TEST_ACCESS_CREDENTIALS }}

run: poetry run python -u ../../sema4ai-python-ls-core/tests/run_tests.py -rfE -otests_output -vv .
run: poetry run python -u ../../sema4ai-python-ls-core/tests/run_tests.py -rfE -otests_output -vv -m "not data_server" .

- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
4 changes: 3 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
- New icons for the extension.
- Aligned the release details for the extension
- Update Agent CLI to `0.2.2`
- Add `Start Data Server` and `Stop Data Server` commands
- Search for actions/queries/predictions considering all glob patterns supported by `sema4ai.actions`.
- Use `package.yaml` directory as the `cwd` when searching for actions/queries/predictions if available (otherwise imports could fail).
- Show progress when creating the input file for an action/query/prediction.
- Integrate with the VSCode Sema4.ai Data Extension to get the data server info to run data actions.
- No longer use `robocorp-trustore` (it's no longer needed).
- Use `sema4ai-http-helper` to make http requests (to data server).
- Use `Python 3.11` as the base interpreter.

## New in 2.8.1 (2024-11-21)

Expand Down
Loading

0 comments on commit 961e119

Please sign in to comment.