Skip to content

Commit

Permalink
Feature/evagram input testing (#26)
Browse files Browse the repository at this point in the history
* added schema testing with django models

* added back env variables in actions

* fixed actions

* migrated input tool tests

* created django input app

* fixed input tool testing

* added actions for evagram input

* Set test local parameter to true for test runs

* Removed optional test local argument

* Added pgpass file for test database authentication
  • Loading branch information
brandonzhu09 authored Jun 20, 2024
1 parent 9a202e3 commit e8c3e16
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 45 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/test_django_api.yaml

This file was deleted.

8 changes: 7 additions & 1 deletion .github/workflows/test_evagram_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ jobs:
- name: Install Evagram Input Module
run: |
python -m pip install --upgrade pip
pip install evagram_input@git+https://github.com/GEOS-ESM/evagram_input@feature/input_tool --upgrade
pip install evagram_input@git+https://github.com/GEOS-ESM/evagram_input --upgrade
- name: Install Dependencies
run: pip install . -r requirements.txt

- name: Create PGPASS File
run: |
echo 127.0.0.1:5432:test_evagram:postgres:${{secrets.DB_PASSWORD}} >> ~/.pgpass
chmod 600 ~/.pgpass
export PGPASSFILE='/home/runner/.pgpass'
- name: Run Evagram Input Tests
run: python src/evagram/website/backend/manage.py test input_app.test_input_tool
env:
Expand Down
2 changes: 1 addition & 1 deletion pycodestyle.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ max-line-length = 100
indent-size = 4
statistics = True
ignore = W503, W504
exclude = __pycache__, src/evagram/website/backend/api/migrations
exclude = __pycache__, src/evagram/website/backend/api/migrations, src/evagram/website/frontend/node_modules
3 changes: 1 addition & 2 deletions src/evagram/website/backend/input_app/test_input_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def test_ExperimentPathNotFound(self):

def test_RollbackOnException(self):
with self.assertRaises(Exception):
input_data(
owner="postgres", experiment="bad_experiment", eva_directory="tests/dummy")
input_data(owner="postgres", experiment="bad_experiment", eva_directory="tests/dummy")

owner = Owners.objects.get(username="postgres")
experiments = Experiments.objects.filter(experiment_name="bad_experiment", owner=owner)
Expand Down

0 comments on commit e8c3e16

Please sign in to comment.