Skip to content

Commit

Permalink
Merge pull request #51 from aidotse/PR46
Browse files Browse the repository at this point in the history
OS X crash on import paseos when pip installed
  • Loading branch information
johanos1 committed Nov 28, 2022
2 parents f7d667e + 7e91bcc commit 39228af
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include paseos/resources/default_cfg.toml
include README.md
File renamed without changes.
1 change: 1 addition & 0 deletions paseos/tests/activity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ async def wait_for_activity(sim):
await asyncio.sleep(0.1)


# tell pytest to create an event loop and execute the tests using the event loop
@pytest.mark.asyncio
async def test_activity():
"""Test if performing activity consumes power as expected"""
Expand Down
5 changes: 3 additions & 2 deletions paseos/utils/load_default_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

def load_default_cfg():
"""Loads the default toml config file from the cfg folder."""
logger.debug("Loading default cfg...")

path = os.path.join(
os.path.dirname(__file__) + "/../../resources/", "default_cfg.toml"
os.path.dirname(__file__) + "/../resources/", "default_cfg.toml"
)
logger.debug(f"loading default cfg from path: {path}")

with open(path) as cfg:
# dynamic=False inhibits automatic generation of non-existing keys
return DotMap(toml.load(cfg), _dynamic=False)

0 comments on commit 39228af

Please sign in to comment.