Skip to content

Commit

Permalink
Reorganise python code
Browse files Browse the repository at this point in the history
I don't know whether this is the correct way to structure a python
project, but it was getting a bit messy in that dir so I have moved
things around. Also the Welder package can probably be refactored one day.
  • Loading branch information
Callisto13 committed Nov 15, 2021
1 parent 0413a15 commit 7fa2c10
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 6 deletions.
Empty file added test/tools/config/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions test/tools/config.py → test/tools/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class Config:
def __init__(self):
self.dir = dirname(abspath(__file__))
self.base = dirname(dirname(dirname(abspath(__file__))))
self.base = dirname(dirname(dirname(dirname(abspath(__file__)))))
self.schema = self.dir + '/schema.yaml'
self.params = {}
self.set_default_config()
Expand Down Expand Up @@ -108,7 +108,7 @@ def default_device_config(self):
}

def default_user_data(self):
files = ["hack/scripts/bootstrap.sh", "test/tools/userdata.sh"]
files = ["hack/scripts/bootstrap.sh", "test/tools/config/userdata.sh"]
userdata = ""
for file in files:
with open(self.base + "/" + file) as f:
Expand Down
File renamed without changes.
File renamed without changes.
Empty file added test/tools/metal/__init__.py
Empty file.
File renamed without changes.
6 changes: 3 additions & 3 deletions test/tools/run.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python3

from test import Test
from metal import Welder
from config import Config
from test.runner import Test
from metal.welder import Welder
from config.config import Config
import click
import os
import sys
Expand Down
Empty file added test/tools/test/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion test/tools/test.py → test/tools/test/runner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from metal import Welder
from metal.welder import Welder


class Test:
Expand Down

0 comments on commit 7fa2c10

Please sign in to comment.