Skip to content

Commit

Permalink
Testing paths on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcurbelo committed Sep 2, 2024
1 parent 6b3e6c2 commit a8abb29
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/go-rxr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
- name: Run tests
run: |
python -m unittest discover -s TESTS -p "test_data_fitting.py"
python -m unittest discover -s TESTS -p "test_data_structure.py"
python -m unittest discover -s TESTS -p "test_density.py"
python -m unittest discover -s TESTS -p "test_material_model.py"
python -m unittest discover -s TESTS -p "test_material_structure.py"
python -m unittest discover -s TESTS -p "test_reflectivity.py
# python -m unittest discover -s TESTS -p "test_data_structure.py"
# python -m unittest discover -s TESTS -p "test_density.py"
# python -m unittest discover -s TESTS -p "test_material_model.py"
# python -m unittest discover -s TESTS -p "test_material_structure.py"
# python -m unittest discover -s TESTS -p "test_reflectivity.py
13 changes: 13 additions & 0 deletions TESTS/test_data_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ class TestDataFitting(unittest.TestCase):
def __init__(self, methodName: str = "runTest") -> None:
super().__init__(methodName)


print('self.TESTS_PATH', TESTS_PATH)
print('self.TESTS_PATH/..' , os.path.abspath(os.path.join(TESTS_PATH, '..')))
print('self.TESTS_PATH/../..' , os.path.abspath(os.path.join(TESTS_PATH, '..', '..')))
# Get the parent directory of the current script's directory
parent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
print('parent_dir', parent_dir)
print('listdir', os.listdir(parent_dir))
print('listdir/TESTS', os.listdir(os.path.join(parent_dir, 'TESTS')))
print('listdir/DATA', os.listdir(os.path.join(parent_dir, 'DATA')))

# aux = input('Enter to continue')

self.TESTS_PATH = TESTS_PATH

self.filename = 'Pim4uc_test.h5'
Expand Down
6 changes: 3 additions & 3 deletions UTILS/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
CURRENT_PATH = os.getcwd()
ROOT_PATH = os.path.abspath(CURRENT_PATH)

# Check if ROOT_PATH ends with '/GO-RXR/GO-RXR' and remove the extra 'GO-RXR' if it does
if ROOT_PATH.endswith('/GO-RXR/GO-RXR'):
ROOT_PATH = os.path.dirname(ROOT_PATH)
# # Check if ROOT_PATH ends with '/GO-RXR/GO-RXR' and remove the extra 'GO-RXR' if it does
# if ROOT_PATH.endswith('/GO-RXR/GO-RXR'):
# ROOT_PATH = os.path.dirname(ROOT_PATH)

while os.path.basename(ROOT_PATH) != 'GO-RXR':
ROOT_PATH = os.path.dirname(ROOT_PATH)
Expand Down

0 comments on commit a8abb29

Please sign in to comment.