merge new wetterdienst and main #3967
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: code_quality | |
on: | |
push: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install prospector[with_everything] | |
pip install prospector[with-everything] | |
pip install prospector[with_bandit] | |
pip install prospector[with_mypy] | |
pip install prospector[with_pyroma] | |
pip install prospector[with_vulture] | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
pip install -e . | |
- name: Lint with prospector | |
working-directory: ./ | |
run: | | |
prospector setup.py | |
prospector system_setups/ | |
prospector tests/ | |
prospector hisim/ | |
prospector docs/ | |
# # pylint hisim/simulator.py --rcfile=hisim_pylint_config.rc | |
# # flake8 hisim/simulator.py --max-line-length 150 | |
# # pycodestyle hisim/simulator.py --max-line-length 150 | |
## This workflow will install Python dependencies, run tests and lint with a single version of Python | |
## For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
# | |
#name: eradicate_flake8 | |
# | |
#on: | |
# push: | |
# branches: [ main ] | |
# pull_request: | |
# branches: [ main ] | |
# | |
#jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Set up Python 3.10 | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: "3.10" | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# pip install flake8-eradicate | |
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# pip install -e . | |
# - name: Lint with flake8 | |
# working-directory: ./ | |
# run: | | |
# flake8 . --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# - name: Lint with flake8 | |
# working-directory: ./ | |
# run: | | |
# flake8 system_setups/basic_household.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 system_setups/basic_household_only_heating.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 system_setups/default_connections.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 system_setups/dynamic_components.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 system_setups/simple_examples.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/component.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/component_wrapper.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/dynamic_component.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/hisim_main.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/hisim_with_profiler.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/json_executor.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/json_generator.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/loadtypes.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/log.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/postprocessingoptions.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/project_code_overview_generator.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/simulationparameters.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/simulator.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/sim_repository.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/utils.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/building.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/controller_l1_building_heating.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/controller_l1_generic_runtime.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/controller_l1_heatpump.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/controller_l2_generic_heat_simple.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/example_component.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/example_storage.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/example_template.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/example_transformer.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/components/generic_hot_water_storage_modular.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/modular_household/interface_configs/system_config.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/postprocessing/chartbase.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/postprocessing/charts.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/postprocessing/chart_singleday.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/postprocessing/postprocessing_datatransfer.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/postprocessing/postprocessing_main.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/postprocessing/reportgenerator.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 hisim/postprocessing/system_chart.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 tests/functions_for_testing.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 tests/test_advanced_battery_bslib.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 tests/test_basic_household_with_all_resultfiles.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 tests/test_building.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 tests/test_examples.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 tests/test_example_component.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 tests/test_example_storage.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 tests/test_example_template.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# flake8 tests/test_example_transformer.py --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# | |
# | |
# | |
# | |
## reenable once all source files are fixed and no more commented out code is spread all over | |
## flake8 . --count --select=E9,F63,F7,F82,E800 --show-source --statistics | |
# # # stop the build if there are Python syntax errors or undefined names | |
# | |
# # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
# # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |