oemof / oemof-tabular

Load oemof energy systems from tabular data sources.
https://oemof-tabular.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
7 stars 5 forks source link

Replace the specification of frequency for hours in pandas data_range #162

Open nailend opened 6 months ago

nailend commented 6 months ago
tests/test_constraints.py::TestConstraints::test_storage_investment_green_field
  /home/nailend/Projekte/pypi-releases/test-oemof-tabular/tests/test_constraints.py:90: FutureWarning: 'H' is deprecated and will be removed in a future version, please use 'h' instead.
    cls.date_time_index = pd.date_range("1/1/2012", periods=3, freq="H")

tests/test_constraints.py: 17 warnings
tests/test_examples.py: 1 warning
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/solph/_energy_system.py:107: FutureWarning: The default behaviour will change in future versions.
  At the moment the last interval of an equidistant time index is added implicitly by default. Set 'infer_last_interval' explicitly 'True' or 'False' to avoid this warning. In future versions 'False' will be the defaultbehaviour
    warnings.warn(msg, FutureWarning)

tests/test_constraints.py: 9 warnings
tests/test_examples.py: 1 warning
tests/test_multi_period_constraints.py: 10 warnings
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/solph/flows/_flow.py:165: FutureWarning: For backward compatibility, the option investment overwrites the option nominal_value. Both options cannot be set at the same time.
    warn(msg, FutureWarning)

tests/test_examples.py::test_example_datapackage_readability
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/tabular/datapackage/reading.py:538: UserWarning: 
  The parameter 'marginal_cost' of a 'volatile' facade is converted into a periodic timeseries. This might not be possible for every parameter and lead to ambiguous error messages.
  Please be aware, when using this feature!
    warnings.warn(msg, UserWarning)

tests/test_examples.py::test_example_datapackage_readability
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/tabular/datapackage/reading.py:458: FutureWarning: The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
    results = pd.concat([results, period_results])

tests/test_examples.py::test_example_datapackage_readability
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/tabular/datapackage/reading.py:523: UserWarning: 
  The parameter 'fixed_costs' of a 'volatile' facade is converted into a yearly list. This might not be possible for every parameter and lead to ambiguous error messages.
  Please be aware, when using this feature!
    warnings.warn(msg, UserWarning)

tests/test_examples.py::test_example_datapackage_readability
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/tabular/datapackage/reading.py:538: UserWarning: 
  The parameter 'year' of a 'volatile' facade is converted into a periodic timeseries. This might not be possible for every parameter and lead to ambiguous error messages.
  Please be aware, when using this feature!
    warnings.warn(msg, UserWarning)

tests/test_examples.py::test_scripting_examples
  <string>:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

tests/test_examples.py::test_custom_foreign_keys
  /home/nailend/Projekte/pypi-releases/test-oemof-tabular/tests/test_examples.py:126: PytestWarning: Value of environment variable OEMOF_TABULAR_FOREIGN_KEY_DESCRIPTORS_FILE type should be str, but got PosixPath('/home/nailend/Projekte/pypi-releases/test-oemof-tabular/tests/custom_foreign_key_descriptors.json') (type: PosixPath); converted to str implicitly
    monkeypatch.setenv(

tests/test_examples.py::test_custom_foreign_keys
  /home/nailend/Projekte/pypi-releases/test-oemof-tabular/tests/test_examples.py:130: PytestWarning: Value of environment variable OEMOF_TABULAR_FOREIGN_KEYS_FILE type should be str, but got PosixPath('/home/nailend/Projekte/pypi-releases/test-oemof-tabular/tests/custom_foreign_keys.json') (type: PosixPath); converted to str implicitly
    monkeypatch.setenv(

tests/test_multi_period_constraints.py::TestMultiPeriodConstraints::test_load
  /home/nailend/Projekte/pypi-releases/test-oemof-tabular/tests/test_multi_period_constraints.py:93: FutureWarning: 'H' is deprecated and will be removed in a future version, please use 'h' instead.
    t_idx_1 = pd.date_range("1/1/2020", periods=3, freq="H")

tests/test_multi_period_constraints.py::TestMultiPeriodConstraints::test_load
  /home/nailend/Projekte/pypi-releases/test-oemof-tabular/tests/test_multi_period_constraints.py:94: FutureWarning: 'H' is deprecated and will be removed in a future version, please use 'h' instead.
    t_idx_2 = pd.date_range("1/1/2030", periods=3, freq="H")

tests/test_multi_period_constraints.py::TestMultiPeriodConstraints::test_load
  /home/nailend/Projekte/pypi-releases/test-oemof-tabular/tests/test_multi_period_constraints.py:95: FutureWarning: 'H' is deprecated and will be removed in a future version, please use 'h' instead.
    t_idx_3 = pd.date_range("1/1/2040", periods=3, freq="H")

tests/test_multi_period_constraints.py: 17 warnings
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/solph/_energy_system.py:143: ExperimentalFeatureWarning: Ensure that your timeindex and timeincrement are consistent.
    warnings.warn(msg, debugging.ExperimentalFeatureWarning)

tests/test_multi_period_constraints.py: 17 warnings
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/solph/_energy_system.py:178: ExperimentalFeatureWarning: CAUTION! You specified the 'periods' attribute for your energy system.
   This will lead to creating a multi-period optimization modeling which can be used e.g. for long-term investment modeling.
  Please be aware that the feature is experimental as of now. If you find anything suspicious or any bugs, please report them.
    warnings.warn(msg, debugging.ExperimentalFeatureWarning)

tests/test_oemof_tabular.py::test_adding_subnodes
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/network/network/nodes.py:80: FutureWarning: Usage of <class 'oemof.network.network.nodes.Bus'> is deprecated. Use oemof.network.Node instead.
    warnings.warn(

tests/test_postprocessing.py::test_aggregated_flows_calculation
  /home/nailend/miniconda3/envs/tabular-test3.10/lib/python3.10/site-packages/oemof/tabular/postprocessing/helper.py:185: FutureWarning: 'M' is deprecated and will be removed in a future version, please use 'ME' instead.
    return df.resample(resample_mode).sum()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
tests/test_examples.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   AttributeError: module 'oemof.tabular.tools.postprocessing' has no attribute 'bus_results'
fwitte commented 5 months ago

The daterange warning has connections to this PR as well https://github.com/oemof/oemof-solph/pull/1049