Skip to content

Commit

Permalink
another testing conda environment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-g committed Jan 15, 2023
1 parent eddb341 commit 7c9e698
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
cd $GITHUB_WORKSPACE
git submodule update --init
conda create --name vatic --file vatic/tests/spec-file_linux.txt
conda activate vatic
conda create --name vatic-env --file vatic/tests/spec-file_linux.txt
conda activate vatic-env
pip install .
sh vatic/tests/check_rts.sh
Expand All @@ -54,11 +54,11 @@ jobs:
cd $GITHUB_WORKSPACE
git submodule update --init
conda create --name vatic -c conda-forge \
conda create --name vatic-env -c conda-forge \
python=${{ matrix.python-version }} \
numpy pandas scipy dill matplotlib pyomo
numpy pandas scipy dill matplotlib pyomo coincbc
conda activate vatic
conda activate vatic-env
pip install .
vatic-det RTS-GMLC 2020-07-20 2 \
Expand Down
4 changes: 2 additions & 2 deletions vatic/model_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def get_forecastables(self) -> Iterator[tuple[tuple[str, str],

def time_series(self,
element_types: Iterable[str] | None = None,
include_reserves=True,
include_reserves: bool = True,
**element_args: str) -> Iterator[tuple]:
"""Retrieves timeseries for grid elements that match a set of criteria.
Expand Down Expand Up @@ -310,7 +310,7 @@ def model_runtime(self):
return self._data['system']['solver_runtime']

@property
def duration_minutes(self):
def duration_minutes(self) -> int:
return self._data['system']['time_period_length_minutes']

@staticmethod
Expand Down
5 changes: 3 additions & 2 deletions vatic/simulation_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ def get_generator_states_at_sced_offset(
# number of hours, float if fractional

minutes_per_period = sced.get_system_attr('time_period_length_minutes')
hours_per_period = minutes_per_period // 60 if minutes_per_period % 60 == 0 \
else minutes_per_period / 60
hours_per_period = (minutes_per_period // 60
if minutes_per_period % 60 == 0
else minutes_per_period / 60)

for g, g_dict in sced.elements('generator', generator_type='thermal'):
### Get generator state (whether on or off, and for how long) ###
Expand Down

0 comments on commit 7c9e698

Please sign in to comment.