-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ddasilva/unit-tests
Fix Unit Tests and Add Github Actions
- Loading branch information
Showing
11 changed files
with
80 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Test Suncet Data Processing Pipeline | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# python-version: ["pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12"] | ||
python-version: ["3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# Install dependencies | ||
- name: Install requiremetns | ||
run: pip install -r requirements.txt | ||
# Run unit tests | ||
- name: Run Unit Tests | ||
run: pytest -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
|
||
from .. import config_parser | ||
|
||
|
||
def test_read_default_config(): | ||
default_config = os.path.join( | ||
os.path.dirname(__file__), '..', 'config_files', | ||
'config_default.ini' | ||
) | ||
config = config_parser.Config(default_config) | ||
|
||
assert hasattr(config, 'make_level0_5') | ||
assert hasattr(config, 'make_level1') | ||
assert hasattr(config, 'make_level2') | ||
assert hasattr(config, 'make_level3') | ||
assert hasattr(config, 'make_level4') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os | ||
from .. import config_parser, make_level1 | ||
|
||
|
||
def test_Level1_object_instantiates(): | ||
default_config = os.path.join( | ||
os.path.dirname(__file__), '..', 'config_files', | ||
'config_default.ini' | ||
) | ||
config = config_parser.Config(default_config) | ||
make_level1.Level1(config) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import os | ||
from .. import config_parser, make_level2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os | ||
from .. import config_parser, make_level3 | ||
|
||
|
||
def test_Level3_object_instantiates(): | ||
default_config = os.path.join( | ||
os.path.dirname(__file__), '..', 'config_files', | ||
'config_default.ini' | ||
) | ||
config = config_parser.Config(default_config) | ||
make_level3.Level3(config) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import os | ||
from .. import config_parser, make_level1 | ||
|
This file was deleted.
Oops, something went wrong.