Skip to content

Commit

Permalink
Merge branch 'dev' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
josiah-tesfu committed Sep 27, 2023
2 parents 9e3e832 + c6cb33e commit 7479d7f
Show file tree
Hide file tree
Showing 32 changed files with 82 additions and 56 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build-publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build and publish the package to PyPI upon push or merge to main branch
# and then create a GitHub release based on latest release tag

name: Build and Release

on:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/create-release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Create Release Tag

on:
push:
branches:
- 'main'

jobs:
build-and-publish:
name: Create Release Tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
- name: Get Current Version
run: echo -n "current_version=$(grep "version" setup.cfg | cut -d '=' -f2 | tr -d ' \t\n\r')" >> $GITHUB_ENV
- name: Create Release Tag
env:
commit_name: bot-edgepi
commit_email: [email protected]
username: bot-edgepi
run: |
git config user.name ${{ env.commit_name }}
git config user.email ${{ env.commit_email }}
git tag -a release/v${{ env.current_version }} -m "tag release version ${{ env.current_version }}"
git push origin release/v${{ env.current_version }}
67 changes: 34 additions & 33 deletions .github/workflows/python-integration-test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# name: Python Integration Test
name: Python Integration Test

# on:
# push:
# branches:
on:
push:
branches:
- todo # enable this workflow once the issue with installing the server is resolved
# - dev
# - staging
# - main
Expand All @@ -16,33 +17,33 @@
# paths-ignore:
# - version

# jobs:
# test:
# name: Integration Tests
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# python-version: ["3.9"]
jobs:
test:
name: Integration Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]

# steps:
# - name: Checkout
# if: ${{ github.event_name == 'pull_request'}}
# uses: actions/checkout@v3
# with:
# ref: ${{ github.head_ref }}
# - name: Checkout
# if: ${{ github.event_name == 'push'}}
# uses: actions/checkout@v3
# with:
# ref: ${{ github.ref_name }}
# - name: Install Dependencies
# run: |
# python -m pip install --upgrade pip
# python -m venv venv_test
# source venv_test/bin/activate
# python -m pip install -r requirements_test.txt
# - name: Test with pytest
# run: |
# source venv_test/bin/activate
# pytest ./tests/integration -vvs
steps:
- name: Checkout
if: ${{ github.event_name == 'pull_request'}}
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Checkout
if: ${{ github.event_name == 'push'}}
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m venv venv_test
source venv_test/bin/activate
python -m pip install -r requirements_test.txt
- name: Test with pytest
run: |
source venv_test/bin/activate
pytest ./tests/integration -vvs
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from util.helpers import (
filter_arg_values, create_config_request_from_args, get_server_response
)
from client_services.adc.adc_pb_enums import (
from edgepi_rpc_client.adc.adc_pb_enums import (
AnalogIn, ConvMode, ADC1DataRate, ADC2DataRate, FilterMode, ADCNum, DiffMode
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
from edgepirpc.protos import dac_pb2 as dac_pb
from client_rpc_channel.client_rpc_channel import ClientRpcChannel
from client_services.dac.dac_pb_enums import DACChannel
from edgepi_rpc_client.dac.dac_pb_enums import DACChannel
from util.helpers import get_server_response

# pylint: disable=no-member
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
from edgepirpc.protos import din_pb2 as din_pb
from client_rpc_channel.client_rpc_channel import ClientRpcChannel
from client_services.din.din_pb_enums import DinPins
from edgepi_rpc_client.din.din_pb_enums import DinPins
from util.helpers import get_server_response

# pylint: disable=no-member
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
from edgepirpc.protos import dout_pb2 as dout_pb
from client_rpc_channel.client_rpc_channel import ClientRpcChannel
from client_services.dout.dout_pb_enums import DoutPins, DoutTriState
from edgepi_rpc_client.dout.dout_pb_enums import DoutPins, DoutTriState
from util.helpers import get_server_response

# pylint: disable=no-member, too-few-public-methods
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
from edgepirpc.protos import led_pb2 as led_pb
from client_rpc_channel.client_rpc_channel import ClientRpcChannel
from client_services.led.led_pb_enums import LEDPins
from edgepi_rpc_client.led.led_pb_enums import LEDPins
from util.helpers import get_server_response

# pylint: disable=no-member
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
create_config_request_from_args, filter_arg_values, get_server_response
)
from client_rpc_channel.client_rpc_channel import ClientRpcChannel
from client_services.tc.tc_pb_enums import (
from edgepi_rpc_client.tc.tc_pb_enums import (
AvgMode,
CJHighMask,
CJLowMask,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ classifiers =
Operating System :: OS Independent

[options]
packages = find:
packages = edgepi_rpc_client
install_requires =
protobuf>=3.20.3
edgepi-rpc-protobuf>=1.0.15
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_adc_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import logging
import pytest
from edgepi.adc.edgepi_adc import EdgePiADC
from client_services.adc.client_adc_service import ClientAdcService
from client_services.adc.adc_pb_enums import (
from edgepi_rpc_client.adc.client_adc_service import ClientAdcService
from edgepi_rpc_client.adc.adc_pb_enums import (
AnalogIn, ConvMode, ADC1DataRate, FilterMode, ADC2DataRate, ADCNum, DiffMode)

_logger = logging.getLogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_dac_service.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Integration tests DAC service"""
import pytest
from edgepi.dac.edgepi_dac import EdgePiDAC
from client_services.dac.client_dac_service import ClientDacService
from client_services.dac.dac_pb_enums import DACChannel
from edgepi_rpc_client.dac.client_dac_service import ClientDacService
from edgepi_rpc_client.dac.dac_pb_enums import DACChannel

@pytest.fixture(name="dac_service")
def fixture_test_dac_service():
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_din_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import pytest
from edgepi.digital_input.edgepi_digital_input import EdgePiDigitalInput
from edgepi.digital_input.digital_input_constants import DinPins as sdkDinPins
from client_services.din.client_din_service import ClientDinService
from client_services.din.din_pb_enums import DinPins
from edgepi_rpc_client.din.client_din_service import ClientDinService
from edgepi_rpc_client.din.din_pb_enums import DinPins

@pytest.fixture(name='din_service')
def fixture_test_din_service():
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_dout_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from edgepi.digital_output.edgepi_digital_output import EdgePiDigitalOutput
from edgepi.digital_output.digital_output_constants import (
DoutPins as sdkDoutPins, DoutTriState as sdkDoutTriState)
from client_services.dout.client_dout_service import ClientDoutService
from client_services.dout.dout_pb_enums import DoutPins,DoutTriState
from edgepi_rpc_client.dout.client_dout_service import ClientDoutService
from edgepi_rpc_client.dout.dout_pb_enums import DoutPins,DoutTriState

@pytest.fixture(name='dout_service')
def fixture_test_dout_service():
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_led_service.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""LEDService integration tests"""
import pytest
from client_services.led.client_led_service import ClientLEDService
from client_services.led.led_pb_enums import LEDPins
from edgepi_rpc_client.led.client_led_service import ClientLEDService
from edgepi_rpc_client.led.led_pb_enums import LEDPins

@pytest.fixture(name='led_service')
def fixture_test_led_service():
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_relay_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Relay service integration tests
"""
import pytest
from client_services.relay.client_relay_service import ClientRelayService
from edgepi_rpc_client.relay.client_relay_service import ClientRelayService

@pytest.fixture(name='relay_service')
def fixture_test_relay_service():
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_tc_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import pytest
from edgepi.tc.edgepi_tc import EdgePiTC
from edgepi.tc.tc_constants import TCAddresses, CJMode as sdkCJMode, ConvMode as sdkConvMode
from client_services.tc.client_tc_service import ClientTcService
from client_services.tc.tc_pb_enums import (
from edgepi_rpc_client.tc.client_tc_service import ClientTcService
from edgepi_rpc_client.tc.tc_pb_enums import (
AvgMode,
CJHighMask,
CJLowMask,
Expand Down

0 comments on commit 7479d7f

Please sign in to comment.