diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index f9998b34c..ffb0fecaf 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -1,16 +1,21 @@ -name: Pull Request +name: Continuous on: push: branches: - - [main] + - 'main' jobs: QC: runs-on: ubuntu-latest steps: - name: Checkout Repository and Submodules uses: actions/checkout@v4 - - name: Build & Deploy Documentation - uses: "./.github/workflows/docs" - name: Quality Control uses: "./.github/workflows/qc" + Documentation: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository and Submodules + uses: actions/checkout@v4 + - name: Build & Deploy Documentation + uses: "./.github/workflows/docs" diff --git a/.github/workflows/docs/action.yml b/.github/workflows/docs/action.yml index a93ef26a9..ff32cfcbb 100644 --- a/.github/workflows/docs/action.yml +++ b/.github/workflows/docs/action.yml @@ -5,6 +5,7 @@ runs: steps: - name: Install ROS Noetic + shell: bash run: | sudo add-apt-repository universe sudo add-apt-repository restricted @@ -21,6 +22,7 @@ runs: sudo apt install ros-noetic-ros-base python3-catkin-tools - name: Build documentation package + shell: bash run: | source /opt/ros/noetic/setup.bash catkin build documentation @@ -31,6 +33,7 @@ runs: node-version: 20 - name: Build documentation + shell: bash run: | source /opt/ros/noetic/setup.bash source devel/setup.bash diff --git a/.github/workflows/qc/action.yml b/.github/workflows/qc/action.yml index 6cb6aef83..24a4be88c 100644 --- a/.github/workflows/qc/action.yml +++ b/.github/workflows/qc/action.yml @@ -5,6 +5,8 @@ runs: steps: - name: Python Formatting - uses: rickstaa/action-black@v1 + uses: psf/black@stable with: - black_args: ". --check --diff" \ No newline at end of file + options: "--check --verbose" + jupyter: true + version: "24.3.0" \ No newline at end of file diff --git a/documentation/src/document_lasr/document.py b/documentation/src/document_lasr/document.py index 174ddace9..c78ac9783 100644 --- a/documentation/src/document_lasr/document.py +++ b/documentation/src/document_lasr/document.py @@ -161,18 +161,18 @@ def split_depend(input: str) -> (str, str): data["dependencies"] = DEPENDENCIES # Load additional markdown files - data[ - "prerequisites" - ] = "Ask the package maintainer to write or create a blank `doc/PREREQUISITES.md` for their package!" - data[ - "usage" - ] = "Ask the package maintainer to write a `doc/USAGE.md` for their package!" - data[ - "example" - ] = "Ask the package maintainer to write a `doc/EXAMPLE.md` for their package!" - data[ - "technical" - ] = "Ask the package maintainer to write a `doc/TECHNICAL.md` for their package!" + data["prerequisites"] = ( + "Ask the package maintainer to write or create a blank `doc/PREREQUISITES.md` for their package!" + ) + data["usage"] = ( + "Ask the package maintainer to write a `doc/USAGE.md` for their package!" + ) + data["example"] = ( + "Ask the package maintainer to write a `doc/EXAMPLE.md` for their package!" + ) + data["technical"] = ( + "Ask the package maintainer to write a `doc/TECHNICAL.md` for their package!" + ) for key, file in [ ("prerequisites", "PREREQUISITES"), diff --git a/legacy/read_pcl_info/src/read_pcl_info/pcl_helpers.py b/legacy/read_pcl_info/src/read_pcl_info/pcl_helpers.py index 6579c2e9b..24fb77ffe 100755 --- a/legacy/read_pcl_info/src/read_pcl_info/pcl_helpers.py +++ b/legacy/read_pcl_info/src/read_pcl_info/pcl_helpers.py @@ -76,9 +76,9 @@ def filter_laser_scan(laser_scan): len(laser_scan.ranges) // 3 : 2 * len(laser_scan.ranges) // 3 ] filtered_ranges = [np.nan] * len(laser_scan.ranges) - filtered_ranges[ - len(laser_scan.ranges) // 3 : 2 * len(laser_scan.ranges) // 3 - ] = middle_part + filtered_ranges[len(laser_scan.ranges) // 3 : 2 * len(laser_scan.ranges) // 3] = ( + middle_part + ) mean_distance = np.nanmean(filtered_ranges) return mean_distance, filtered_ranges diff --git a/tasks/gpsr/src/gpsr/states/talk.py b/tasks/gpsr/src/gpsr/states/talk.py index ceb452c7f..5be20ef83 100644 --- a/tasks/gpsr/src/gpsr/states/talk.py +++ b/tasks/gpsr/src/gpsr/states/talk.py @@ -18,9 +18,9 @@ def __init__(self, talk_phrase: str): def _create_responses(self) -> Dict[str, str]: response = {} - response[ - "something about yourself" - ] = "I am a Tiago -- a helpful assistive robot developed by PAL Robotics." + response["something about yourself"] = ( + "I am a Tiago -- a helpful assistive robot developed by PAL Robotics." + ) current_time = time.strftime("%H:%M") response["the time"] = f"The current time is {current_time}." current_day = time.strftime("%A") @@ -29,16 +29,16 @@ def _create_responses(self) -> Dict[str, str]: response["what day is tomorrow"] = f"Tomorrow is {tomorrow}." response["your teams name"] = "Our team is called LASR." response["your teams country"] = "Our team is from the United Kingdom." - response[ - "your teams affiliation" - ] = "Our team is affiliated with King's College London." + response["your teams affiliation"] = ( + "Our team is affiliated with King's College London." + ) day_of_the_week = current_day day_of_the_month = time.strftime("%d") response["the day of the week"] = f"Today is {day_of_the_week}." - response[ - "the day of the month" - ] = f"The day of the month is {day_of_the_month}." + response["the day of the month"] = ( + f"The day of the month is {day_of_the_month}." + ) return response def execute(self, userdata):