Skip to content

Commit

Permalink
format fixes and rtd config
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpdx committed Oct 29, 2023
1 parent f652cd8 commit 9b6c777
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 15 deletions.
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

sphinx:
configuration: docs/conf.py

formats:
- pdf

python:
install:
- requirements: requirements.txt
2 changes: 1 addition & 1 deletion docs/scripts/gen_beacon_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import canopen

from oresat_configs import OreSatId, OreSatConfig, ORESAT_NICE_NAMES
from oresat_configs import ORESAT_NICE_NAMES, OreSatConfig, OreSatId

OD_DATA_TYPES = {
canopen.objectdictionary.BOOLEAN: "bool",
Expand Down
13 changes: 6 additions & 7 deletions oresat_configs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""OreSat OD database"""

import yaml
import canopen
import yaml

from ._yaml_to_od import _gen_c3_beacon_defs, _gen_c3_fram_defs, _gen_fw_base_od, _gen_od_db
from .base import C3_CONFIG, FW_COMMON_CONFIG
from .constants import NODE_NICE_NAMES, ORESAT_NICE_NAMES, NodeId, OreSatId, __version__
from .oresat0 import ORESAT0_CARD_CONFIGS, ORESAT0_BEACON_CONFIG
from .oresat0_5 import ORESAT0_5_CARD_CONFIGS, ORESAT0_5_BEACON_CONFIG
from .oresat1 import ORESAT1_CARD_CONFIGS, ORESAT1_BEACON_CONFIG
from ._yaml_to_od import _gen_od_db, _gen_c3_fram_defs, _gen_c3_beacon_defs, _gen_fw_base_od
from .base import FW_COMMON_CONFIG, C3_CONFIG
from .oresat0 import ORESAT0_BEACON_CONFIG, ORESAT0_CARD_CONFIGS
from .oresat0_5 import ORESAT0_5_BEACON_CONFIG, ORESAT0_5_CARD_CONFIGS
from .oresat1 import ORESAT1_BEACON_CONFIG, ORESAT1_CARD_CONFIGS


class OreSatConfig:
Expand All @@ -27,7 +27,6 @@ class OreSatConfig:
}

def __init__(self, oresat_id: OreSatId):

self.oresat_id = oresat_id
beacon_config = self.BEACON_CONFIGS[oresat_id]
self.od_db = _gen_od_db(oresat_id, beacon_config, self.CARD_CONFIGS[oresat_id])
Expand Down
2 changes: 1 addition & 1 deletion oresat_configs/scripts/gen_dcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import canopen

from .. import NodeId, OreSatId, OreSatConfig
from .. import NodeId, OreSatConfig, OreSatId

GEN_DCF = "generate DCF file for OreSat node(s)"
GEN_DCF_PROG = "oresat-gen-dcf"
Expand Down
2 changes: 1 addition & 1 deletion oresat_configs/scripts/gen_fw_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import canopen

from .. import NodeId, OreSatId, OreSatConfig
from .. import NodeId, OreSatConfig, OreSatId
from .._yaml_to_od import RPDO_COMM_START, RPDO_PARA_START, TPDO_COMM_START, TPDO_PARA_START

GEN_FW_FILES = "generate CANopenNode OD.[c/h] files for a OreSat firmware card"
Expand Down
2 changes: 1 addition & 1 deletion oresat_configs/scripts/print_od.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import canopen

from .. import NodeId, OreSatId, OreSatConfig
from .. import NodeId, OreSatConfig, OreSatId
from .._yaml_to_od import OD_DATA_TYPES

PRINT_OD = "print the object dictionary out to stdout"
Expand Down
2 changes: 1 addition & 1 deletion oresat_configs/scripts/sdo_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import canopen

from .. import NodeId, OreSatId, OreSatConfig
from .. import NodeId, OreSatConfig, OreSatId

SDO_TRANSFER = "read or write value to a node's object dictionary via SDO transfers"
SDO_TRANSFER_PROG = "oresat-sdo-transfer"
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import canopen

from oresat_configs import NodeId, OreSatId, OreSatConfig
from oresat_configs import NodeId, OreSatConfig, OreSatId
from oresat_configs._yaml_to_od import OD_DATA_TYPE_SIZE, TPDO_COMM_START, TPDO_PARA_START


Expand Down
2 changes: 1 addition & 1 deletion tests/test_oresat0.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Unit tests for OreSat0 OD database."""

from oresat_configs import OreSatId, OreSatConfig
from oresat_configs import OreSatConfig, OreSatId

from . import TestConfig

Expand Down
2 changes: 1 addition & 1 deletion tests/test_oresat0_5.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Unit tests for OreSat0.5 OD database."""

from oresat_configs import OreSatId, OreSatConfig
from oresat_configs import OreSatConfig, OreSatId

from . import TestConfig

Expand Down

0 comments on commit 9b6c777

Please sign in to comment.