File tree Expand file tree Collapse file tree 5 files changed +59
-5
lines changed Expand file tree Collapse file tree 5 files changed +59
-5
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,15 @@ jobs:
4444 run : poetry run sphinx-build doc doc/_build
4545
4646 - name : Run pytest
47- run : poetry run pytest -s --cov=open_source_template --cov-fail-under=80
47+ # run: poetry run pytest -s --cov=obsweatherscale --cov-fail-under=80
48+ run : poetry run pytest -s --cov=obsweatherscale
4849
4950 - name : Run linter
50- run : poetry run pylint -rn --output-format=parseable open_source_template
51+ run : poetry run pylint -rn --output-format=parseable obsweatherscale
5152
5253 - name : Run static checker
5354 run : |
54- OUTPUT=$(poetry run mypy open_source_template 2>&1 || true)
55+ OUTPUT=$(poetry run mypy obsweatherscale 2>&1 || true)
5556 echo "$OUTPUT"
5657
5758 # Extract the error count from lines
Original file line number Diff line number Diff line change 1+ # This workflow will build and publish the documentation to the `gh-pages` branch of the
2+ # repository when a new tag is added.
3+ # It uses the `peaceiris/actions-gh-pages` action to handle the publishing.
4+ #
5+ # Copyright (c) 2025 MeteoSwiss, based on the workflow created by Michele Cattaneo; michele.cattaneo@meteoswiss.ch
6+
7+ name : docs_publish
8+
9+ on :
10+ push :
11+ branches : ['main']
12+
13+ jobs :
14+
15+ docs :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout current repository
20+ uses : actions/checkout@v4
21+
22+ - name : Set up Python 3.12
23+ uses : actions/setup-python@v5
24+ with :
25+ python-version : 3.12
26+
27+ - name : Install poetry and python package
28+ run : |
29+ python -m pip install --upgrade pip
30+ python -m pip install poetry
31+ poetry install
32+
33+ - name : Build documentation
34+ run : poetry run sphinx-build doc doc/_build
35+
36+ - name : Publish documentation
37+ uses : peaceiris/actions-gh-pages@v3
38+
39+ with :
40+ publish_branch : gh-pages
41+ github_token : ${{ secrets.GITHUB_TOKEN }}
42+ publish_dir : doc/_build/
43+ force_orphan : true
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def _shaped_noise_covar(
100100 def expected_log_prob (
101101 self ,
102102 target : torch .Tensor ,
103- input : MultivariateNormal ,
103+ input : MultivariateNormal , # pylint: disable=redefined-builtin
104104 * params : Any ,
105105 ** kwargs : Any ,
106106 ) -> torch .Tensor :
@@ -138,6 +138,7 @@ def expected_log_prob(
138138 # Handle NaN values if enabled
139139 nan_policy = settings .observation_nan_policy .value ()
140140 if nan_policy == "mask" :
141+ # pylint: disable=protected-access
141142 observed = settings .observation_nan_policy ._get_observed (
142143 target , input .event_shape
143144 )
@@ -338,6 +339,7 @@ def forward(
338339
339340 # Remove NaN values if enabled
340341 if settings .observation_nan_policy .value () == "mask" :
342+ # pylint: disable=protected-access
341343 observed = settings .observation_nan_policy ._get_observed (
342344 target , output .event_shape
343345 )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def __init__(
1818 likelihood : _GaussianLikelihoodBase ,
1919 mean_module : Mean ,
2020 covar_module : Kernel ,
21- ) -> None :
21+ ) -> None : # pylint: disable=arguments-differ
2222 """Initialize the GPModel.
2323
2424 Parameters
@@ -38,6 +38,7 @@ def __init__(
3838 self .mean_module = mean_module
3939 self .covar_module = covar_module
4040
41+ # pylint: disable=arguments-differ
4142 def forward (self , x : torch .Tensor , ** kwargs : Any ) -> MultivariateNormal :
4243 mean_x = self .mean_module (x )
4344 covar_x = self .covar_module (x )
Original file line number Diff line number Diff line change @@ -54,6 +54,13 @@ max-line-length = 120
5454# Minimum number of public methods for a class (see R0903).
5555min-public-methods = 0
5656
57+ [tool .pylint .messages_control ]
58+ disable = [
59+ " too-many-arguments" ,
60+ " too-many-positional-arguments" ,
61+ " too-many-locals" ,
62+ ]
63+
5764[tool .mypy ]
5865ignore_missing_imports = true
5966disallow_untyped_defs = true
You can’t perform that action at this time.
0 commit comments