diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2a9449..b95b04a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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: @@ -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: @@ -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: ./ @@ -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') }} @@ -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 diff --git a/OpenTap.Python.Examples/BasicDut.py b/OpenTap.Python.Examples/BasicDut.py index 52f3fa6..6a08545 100644 --- a/OpenTap.Python.Examples/BasicDut.py +++ b/OpenTap.Python.Examples/BasicDut.py @@ -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 \ No newline at end of file + self.HighPowerOn = False + super().Close() \ No newline at end of file diff --git a/OpenTap.Python.Examples/BasicInstrument.py b/OpenTap.Python.Examples/BasicInstrument.py index 7e49aa8..3d9a93c 100644 --- a/OpenTap.Python.Examples/BasicInstrument.py +++ b/OpenTap.Python.Examples/BasicInstrument.py @@ -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") \ No newline at end of file + self.log.Info("Python Instrument Closed") + super().Close() \ No newline at end of file diff --git a/OpenTap.Python/opentap.py b/OpenTap.Python/opentap.py index 60b8991..e6c4bb5 100644 --- a/OpenTap.Python/opentap.py +++ b/OpenTap.Python/opentap.py @@ -223,7 +223,7 @@ def __init__(self): def Open(self): super().Open() def Close(self): - super().Open() + super().Close() class PyInstrument(OpenTap.Instrument): @@ -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 diff --git a/Python.Dependencies/Python.Runtime.dll b/Python.Dependencies/Python.Runtime.dll index 46f6cb7..b761488 100644 Binary files a/Python.Dependencies/Python.Runtime.dll and b/Python.Dependencies/Python.Runtime.dll differ diff --git a/README.md b/README.md index 97aeffc..9e20b68 100644 --- a/README.md +++ b/README.md @@ -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