Skip to content

Commit

Permalink
Merge pull request #42 from oresat/yamllint
Browse files Browse the repository at this point in the history
Add yamllint
  • Loading branch information
ThirteenFish authored Nov 5, 2024
2 parents 553de4e + eae4577 commit 1c40042
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 54 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

5 changes: 4 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
- name: Test with Python's unittest
run: python -m unittest

- name: Lint Yaml with yamllint
run: yamllint oresat_configs

- name: Test building pypi package
run: python -m build

Expand All @@ -65,6 +68,6 @@ jobs:
oresat-configs cards > /dev/null
oresat-configs pdo c3 --list > /dev/null
pip uninstall -y oresat-configs
- name: Compile Kaitai
run: ksc -t python oresat0_5.ksy
6 changes: 6 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends: default

rules:
document-start: disable
line-length:
max: 100
26 changes: 13 additions & 13 deletions oresat_configs/base/c3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ objects:
data_type: uint32
description: the reset system timeout
access_type: const
default: 86400 # 24 hours
default: 86400 # 24 hours
unit: s

- index: 0x4002
Expand Down Expand Up @@ -52,7 +52,7 @@ objects:
data_type: uint32
description: tx enable timeout
access_type: const
default: 2592000 # 30 days
default: 2592000 # 30 days
unit: s

- subindex: 0x3
Expand Down Expand Up @@ -84,7 +84,7 @@ objects:
data_type: uint16
description: timeout before trying to deploy the antennas
access_type: const
default: 300 # 5 minutes
default: 300 # 5 minutes
unit: s

- subindex: 0x4
Expand Down Expand Up @@ -178,7 +178,7 @@ objects:
- subindex: 0x3
name: rssi
data_type: int8
description: lband rssi of last packet received after lna, filters, and digital channel filter
description: lband rssi of last packet received as reported by AX5043
access_type: ro
unit: dB

Expand All @@ -197,7 +197,7 @@ objects:
- index: 0x4007
name: uhf
object_type: record
subindexes :
subindexes:
- subindex: 0x1
name: rx_bytes
data_type: uint32
Expand Down Expand Up @@ -641,23 +641,23 @@ objects:
default: "{}"

tpdos:
- num: 1 # time sync TPDO
- num: 1 # time sync TPDO
fields:
- [scet]

- num: 2
fields:
- [status]
- [tx_control, enable]
- [mode]
- [adcs_manager, mode]
- [adcs_manager, status]
- [status]
- [tx_control, enable]
- [mode]
- [adcs_manager, mode]
- [adcs_manager, status]
event_timer_ms: 5000

- num: 3
fields:
- [edl, sequence_count]
- [edl, rejected_count]
- [edl, sequence_count]
- [edl, rejected_count]
event_timer_ms: 5000

- num: 4
Expand Down
6 changes: 4 additions & 2 deletions oresat_configs/base/cfc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ objects:
- subindex: 0x8
name: moving_avg_samples
data_type: uint8
description: the number of reading used to calcuate the moving average to determine if saturated
description: the number of samples used in the moving average to determine if saturated
access_type: rw
default: 4

Expand All @@ -139,7 +139,9 @@ objects:
- subindex: 0xa
name: cooldown_temperature
data_type: int8
description: once saturated the TEC controller cannot be enable until the camera temperature is greater this value
description: >
once saturated the TEC controller cannot be enabled until the camera temperature is
greater than this value
access_type: rw
default: 40
unit: C
Expand Down
16 changes: 7 additions & 9 deletions oresat_configs/base/diode_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ objects:
description: status bits
access_type: rw
bit_definitions:
DAC_EN: 0
GPT_EN: 1
ADC_EN: 2
MUX_EN: 3
MUX_A0: 4
MUX_A1: 5
MUX_A2: 6
DAC_EN: 0
GPT_EN: 1
ADC_EN: 2
MUX_EN: 3
MUX_A0: 4
MUX_A1: 5
MUX_A2: 6

- subindex: 0x5
name: error
Expand Down Expand Up @@ -109,5 +109,3 @@ tpdos:
- [adcsample, led_swir_pd_current]
- [adcsample, uv_pd_current]
event_timer_ms: 10000


6 changes: 3 additions & 3 deletions oresat_configs/base/dxwifi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ objects:
name: static_image
data_type: bool
description: transmission will send a static image rather than captured images
default: True
default: true

- subindex: 0x2
name: bit_rate
Expand All @@ -99,7 +99,7 @@ objects:
name: as_tar
data_type: bool
description: transmit image as a gzipped tar file (does not apply to static image)
default: True
default: true

- subindex: 0x4
name: images_transmitted
Expand All @@ -111,7 +111,7 @@ objects:
name: enable_pa
data_type: bool
description: enables the power amplifier
default: False
default: false


tpdos:
Expand Down
2 changes: 1 addition & 1 deletion oresat_configs/base/fw_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ objects:
scale_factor: 0.001
unit: V

# subindex 0x9 reserved for boot_select
# subindex 0x9 reserved for boot_select

# index 0x3004 reserved
# index 0x3005 reserved
Expand Down
24 changes: 12 additions & 12 deletions oresat_configs/base/gps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ objects:
data_type: int32
description: latitude
access_type: ro
scale_factor: 0.0000001 # 1e-7
scale_factor: 1.0e-7
unit: deg
low_limit: -900000000
high_limit: 900000000
Expand All @@ -67,7 +67,7 @@ objects:
data_type: int32
description: longitude
access_type: ro
scale_factor: 0.0000001 # 1e-7
scale_factor: 1.0e-7
unit: deg
low_limit: -1800000000
high_limit: 1800000000
Expand All @@ -78,15 +78,15 @@ objects:
description: height above ellipsoid
access_type: ro
unit: km
scale_factor: 0.00001 # cm to km
scale_factor: 0.00001 # cm to km

- subindex: 0x8
name: mean_sea_lvl_alt
data_type: uint32
description: mean sea level
access_type: ro
unit: km
scale_factor: 0.00001 # cm to km
scale_factor: 0.00001 # cm to km

- subindex: 0x9
name: gdop
Expand Down Expand Up @@ -129,47 +129,47 @@ objects:
description: ecef x coordinate
access_type: ro
unit: km
scale_factor: 0.00001 # cm to km
scale_factor: 0.00001 # cm to km

- subindex: 0xf
name: ecef_y
data_type: int32
description: ecef y coordinate
access_type: ro
unit: km
scale_factor: 0.00001 # cm to km
scale_factor: 0.00001 # cm to km

- subindex: 0x10
name: ecef_z
data_type: int32
description: ecef z coordinate
access_type: ro
unit: km
scale_factor: 0.00001 # cm to km
scale_factor: 0.00001 # cm to km

- subindex: 0x11
name: ecef_vx
data_type: int32
description: ecef x velocity
access_type: ro
unit: km/s
scale_factor: 0.00001 # cm/s to km/s
scale_factor: 0.00001 # cm/s to km/s

- subindex: 0x12
name: ecef_vy
data_type: int32
description: ecef y velocity
access_type: ro
unit: km/s
scale_factor: 0.00001 # cm/s to km/s
scale_factor: 0.00001 # cm/s to km/s

- subindex: 0x13
name: ecef_vz
data_type: int32
description: ecef z velocity
access_type: ro
unit: km/s
scale_factor: 0.00001 # cm/s to km/s
scale_factor: 0.00001 # cm/s to km/s

- subindex: 0x14
name: time_since_midnight
Expand All @@ -193,7 +193,7 @@ objects:
tpdos:
- num: 3
fields:
- [skytraq, time_since_midnight]
- [skytraq, time_since_midnight]

- num: 4
fields:
Expand All @@ -218,7 +218,7 @@ tpdos:
- [time_syncd]
event_timer_ms: 1000

- num: 16 # the time sync TPDO
- num: 16 # the time sync TPDO
fields:
- [scet]
sync: 1
2 changes: 1 addition & 1 deletion oresat_configs/base/reaction_wheel.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
objects:
- index: 0x4000
name: ctrl_stat
name: ctrl_stat
description: reaction wheel controller status
object_type: record
subindexes:
Expand Down
2 changes: 1 addition & 1 deletion oresat_configs/base/sw_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,4 @@ tpdos:
rpdos:
- num: 1
card: c3
tpdo_num: 1 # the time sync TPDO
tpdo_num: 1 # the time sync TPDO
4 changes: 2 additions & 2 deletions oresat_configs/oresat0/beacon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ax25:
dest_ssid: 0
src_callsign: KJ7SAT
src_ssid: 0
control: 0x3 # ui-frame
pid: 0xf0 # no L3 protocol
control: 0x3 # ui-frame
pid: 0xf0 # no L3 protocol
command: false
response: false
fields:
Expand Down
8 changes: 4 additions & 4 deletions oresat_configs/oresat0_5/beacon.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
revision: 0
ax25:
dest_callsign: SPACE
dest_ssid: 0 # primary station
dest_ssid: 0 # primary station
src_callsign: KJ7SAT
src_ssid: 11 # balloons, aircraft, spacecraft, etc
control: 0x3 # ui-frame
pid: 0xf0 # no L3 protocol
src_ssid: 11 # balloons, aircraft, spacecraft, etc
control: 0x3 # ui-frame
pid: 0xf0 # no L3 protocol
command: false
response: true
fields:
Expand Down
8 changes: 4 additions & 4 deletions oresat_configs/oresat1/beacon.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
revision: 0
ax25:
dest_callsign: SPACE
dest_ssid: 0 # primary station
dest_ssid: 0 # primary station
src_callsign: KJ7SAT
src_ssid: 11 # balloons, aircraft, spacecraft, etc
control: 0x3 # ui-frame
pid: 0xf0 # no L3 protocol
src_ssid: 11 # balloons, aircraft, spacecraft, etc
control: 0x3 # ui-frame
pid: 0xf0 # no L3 protocol
command: false
response: true
fields:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ sphinx-rtd-theme
tabulate
types-tabulate
wheel
yamllint

0 comments on commit 1c40042

Please sign in to comment.