Skip to content

Commit

Permalink
Merge pull request #118 from oemof/Fix_ci_warnings
Browse files Browse the repository at this point in the history
Fix pands future warnings
  • Loading branch information
joroeder committed Apr 18, 2023
2 parents 671b952 + 23f72d0 commit 2865840
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/tox_pytests.yml
Expand Up @@ -34,12 +34,3 @@ jobs:
pip install tox tox-gh-actions coverage coveralls
- name: Test with tox
run: tox

- name: Check test coverage
run: coverage report -m --fail-under=${{ matrix.vcs == 'bzr' && 24 || 25 }}

- name: Report to coveralls
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
9 changes: 5 additions & 4 deletions dhnx/simulation.py
Expand Up @@ -190,7 +190,7 @@ def _concat_scalars(self, name):
]

if select_scalars:
select_scalars = pd.concat(select_scalars, 0)
select_scalars = pd.concat(select_scalars, axis=0)

else:
select_scalars = None
Expand All @@ -217,7 +217,7 @@ def _concat_sequences(self, name):
if name in d
]

concat_sequences = pd.concat(select_sequences, 1)
concat_sequences = pd.concat(select_sequences, axis=1)

return concat_sequences

Expand Down Expand Up @@ -652,8 +652,9 @@ def _calculate_pump_power(self, global_pressure_losses):
if data['component_type'] == 'Producer'
]

mass_flow_producers = \
self.results['pipes-mass_flow'].loc[:, idx[producers, :]].sum(axis=1)
mass_flow_producers = self.results['pipes-mass_flow'].iloc[
:, self.results['pipes-mass_flow'].columns.isin(
producers, level=0)].sum(axis=1)

pump_power = mass_flow_producers * global_pressure_losses / (self.eta_pump * self.rho)

Expand Down
3 changes: 2 additions & 1 deletion docs/whatsnew/v0-0-3.rst
Expand Up @@ -36,7 +36,8 @@ Bug fixes
Known issues
^^^^^^^^^^^^^^^^^^^^

* something
* Simulation tests do not test, as check_if_csv_files_equal
from helpers module is incomplete.


Testing
Expand Down
2 changes: 2 additions & 0 deletions tests/helpers.py
Expand Up @@ -51,6 +51,8 @@ def check_if_csv_files_equal(csv_file_a, csv_file_b, check_arrays=False, **kwarg
r"""
Compares two csv files.
TODO: Check not working. Nothing happens, if check fails!
Parameters
----------
csv_file_a : str
Expand Down
4 changes: 4 additions & 0 deletions tests/test_results.py
Expand Up @@ -12,6 +12,8 @@

def test_tree_simulation():

# TODO: Test not working! Nothing happens, if check fails!

input_data = os.path.join(
tests_path,
'_files',
Expand Down Expand Up @@ -46,6 +48,8 @@ def test_tree_simulation():

def test_tree_simulation_reverse_pipe_dir():

# TODO: Test not working! Nothing happens, if check fails!

input_data = os.path.join(
tests_path,
'_files',
Expand Down

0 comments on commit 2865840

Please sign in to comment.