Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nailend opened this issue Feb 26, 2024 · 1 comment
Open

Comments

@nailend
Copy link
Collaborator

nailend commented Feb 26, 2024

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
Copy link
Member

fwitte commented Mar 12, 2024

The daterange warning has connections to this PR as well oemof/oemof-solph#1049

@nailend nailend changed the title Update depricated imports Replace the specification of frequency for hours in pandas data_range Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants