Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-20.04]
os: [ ubuntu-22.04, ubuntu-24.04]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix tags
Expand Down Expand Up @@ -52,7 +52,8 @@ jobs:
bin/tap package create ./package.xml
popd
- name: Upload binaries
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-24.04'
uses: actions/upload-artifact@v4
with:
name: TapPackage
retention-days: 14
Expand All @@ -62,7 +63,7 @@ jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -79,9 +80,9 @@ jobs:
./bin/Debug/tap run bin/Debug/test.TapPlan --non-interactive

test-macos:
runs-on: macos-11
runs-on: macos-26
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -110,7 +111,7 @@ jobs:
- build-ubuntu
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: TapPackage
path: ./
Expand All @@ -131,9 +132,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Pages Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -149,14 +150,14 @@ jobs:
NODE_OPTIONS: --openssl-legacy-provider
working-directory: Documentation/TAP_Python_Help
- name: Upload Docs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Pages
retention-days: 14
path: |
public
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/dev' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v')
with:
publish_dir: public
Expand Down
4 changes: 3 additions & 1 deletion OpenTap.Python.Examples/BasicDut.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ def init_high_power_mode(self):
def Open(self):
"""Called by TAP when the test plan starts."""
self.log.Info(self.Name + " Opened")
super().Open()

def Close(self):
"""Called by TAP when the test plan ends."""
self.log.Info(self.Name + " Closed")
self.HighPowerOn = False
self.HighPowerOn = False
super().Close()
4 changes: 3 additions & 1 deletion OpenTap.Python.Examples/BasicInstrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def do_measurement(self):
def Open(self):
"""Called by TAP when the test plan starts."""
self.log.Info("Python Instrument Opened")
super().Open()

def Close(self):
"""Called by TAP when the test plan ends."""
self.log.Info("Python Instrument Closed")
self.log.Info("Python Instrument Closed")
super().Close()
4 changes: 2 additions & 2 deletions OpenTap.Python/opentap.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def __init__(self):
def Open(self):
super().Open()
def Close(self):
super().Open()
super().Close()


class PyInstrument(OpenTap.Instrument):
Expand All @@ -236,7 +236,7 @@ def __init__(self):
def Open(self):
super().Open()
def Close(self):
super().Open()
super().Close()

class PyResultListener(OpenTap.ResultListener):
__clr_abstract__ = True
Expand Down
Binary file modified Python.Dependencies/Python.Runtime.dll
Binary file not shown.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ __More Information__
- Documentation can be found at https://doc.opentap.io/OpenTap.Python
- Example code is located in ```%TAP_PATH%\Packages\Python\MyExamplePlugin\```

This work is based on a fork of [PythonNet](https://github.com/pythonnet/pythonnet/): https://github.com/rmadsen-ks/pythonnet
__Pythonnet__

Pythonnet is used for integrating Python and C#. The original source can be found here: https://github.com/pythonnet/pythonnet/

This plugin depends on a fork of PythonNet: [PythonNet Fork](https://github.com/pythonnet/pythonnet/): https://github.com/rmadsen-ks/pythonnet

- git commit: 338b01fac14e1f8a5882949970125fe817c2d8d3

__Developers__
- Lim Jing Huey
Expand Down
Loading