Skip to content

Commit

Permalink
corrected auto test run and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
deronsmith committed Aug 15, 2024
1 parent f87cfcd commit db2d75a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Binary file modified .coverage
Binary file not shown.
6 changes: 2 additions & 4 deletions .github/workflows/code-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
- name: Run tests
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run tests
run:
coverage run -m pytest tests/ > pytest-coverage.txt
coverage run -m pytest tests > pytest-coverage.txt
- name: pytest-coverage-commentator
uses: coroo/pytest-coverage-commentator@v1.0.2
with:
Expand Down
5 changes: 4 additions & 1 deletion esat/cli/esat_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
from esat.error.bs_disp import BSDISP
from esat.rotational.constrained import ConstrainedModel
from esat.configs import run_config, sim_config, error_config, constrained_config
from esat_eval.simulator import Simulator
from esat.estimator import FactorEstimator
try:
from esat_eval.simulator import Simulator
except ModuleNotFoundError as e:
from eval.simulator import Simulator


logging.basicConfig(format='%(asctime)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S', level=logging.INFO)
Expand Down
5 changes: 4 additions & 1 deletion eval/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
from esat.model.sa import SA
from esat.metrics import q_loss, qr_loss
from esat.model.batch_sa import BatchSA
from esat_eval.factor_comparison import FactorCompare
try:
from esat_eval.factor_comparison import FactorCompare
except ModuleNotFoundError as e:
from eval.factor_comparison import FactorCompare

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit db2d75a

Please sign in to comment.