ampycloud 2.1.0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {ampycloud-2.1.0 → ampycloud-2.2.0}/AUTHORS +1 -1
  2. {ampycloud-2.1.0 → ampycloud-2.2.0}/CHANGELOG +12 -2
  3. {ampycloud-2.1.0 → ampycloud-2.2.0}/LICENSE +1 -1
  4. {ampycloud-2.1.0/src/ampycloud.egg-info → ampycloud-2.2.0}/PKG-INFO +23 -20
  5. {ampycloud-2.1.0 → ampycloud-2.2.0}/README.md +1 -1
  6. ampycloud-2.2.0/pyproject.toml +99 -0
  7. ampycloud-2.2.0/src/ampycloud/__main__.py +90 -0
  8. ampycloud-2.2.0/src/ampycloud/ceilo_data.py +642 -0
  9. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/cluster.py +15 -10
  10. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/core.py +45 -39
  11. ampycloud-2.2.0/src/ampycloud/data.py +136 -0
  12. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/dynamic.py +4 -4
  13. ampycloud-2.2.0/src/ampycloud/errors.py +17 -0
  14. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/fluffer.py +11 -8
  15. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/hardcoded.py +2 -2
  16. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/icao.py +2 -2
  17. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/layer.py +134 -102
  18. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/logger.py +10 -8
  19. ampycloud-2.2.0/src/ampycloud/metarize.py +431 -0
  20. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/plots/__init__.py +1 -2
  21. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/plots/core.py +19 -16
  22. ampycloud-2.2.0/src/ampycloud/plots/diagnostics.py +664 -0
  23. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/plots/hardcoded.py +2 -2
  24. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/plots/secondary.py +33 -20
  25. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/plots/tools.py +29 -31
  26. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/prms/ampycloud_default_prms.yml +1 -1
  27. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/scaler.py +88 -98
  28. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/utils/__init__.py +1 -1
  29. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/utils/mocker.py +85 -75
  30. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/utils/performance.py +6 -7
  31. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/utils/utils.py +89 -68
  32. ampycloud-2.2.0/src/ampycloud/version.py +17 -0
  33. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/wmo.py +35 -40
  34. ampycloud-2.1.0/CODE_OF_CONDUCT.md +0 -75
  35. ampycloud-2.1.0/CONTRIBUTING.md +0 -345
  36. ampycloud-2.1.0/MANIFEST.in +0 -8
  37. ampycloud-2.1.0/PKG-INFO +0 -49
  38. ampycloud-2.1.0/setup.cfg +0 -4
  39. ampycloud-2.1.0/setup.py +0 -82
  40. ampycloud-2.1.0/src/ampycloud/__main__.py +0 -78
  41. ampycloud-2.1.0/src/ampycloud/data.py +0 -1092
  42. ampycloud-2.1.0/src/ampycloud/errors.py +0 -19
  43. ampycloud-2.1.0/src/ampycloud/plots/diagnostics.py +0 -537
  44. ampycloud-2.1.0/src/ampycloud/version.py +0 -12
  45. ampycloud-2.1.0/src/ampycloud.egg-info/SOURCES.txt +0 -43
  46. ampycloud-2.1.0/src/ampycloud.egg-info/dependency_links.txt +0 -1
  47. ampycloud-2.1.0/src/ampycloud.egg-info/entry_points.txt +0 -3
  48. ampycloud-2.1.0/src/ampycloud.egg-info/requires.txt +0 -16
  49. ampycloud-2.1.0/src/ampycloud.egg-info/top_level.txt +0 -1
  50. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/__init__.py +0 -0
  51. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/plots/mpl_styles/base.mplstyle +0 -0
  52. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/plots/mpl_styles/latex.mplstyle +0 -0
  53. {ampycloud-2.1.0 → ampycloud-2.2.0}/src/ampycloud/plots/mpl_styles/metsymb.mplstyle +0 -0
@@ -1,3 +1,3 @@
1
- Scientific Developers:
2
1
  - @fpavogt (Frédéric P.A. Vogt), frederic.vogt@meteoswiss.ch
3
2
  - @regDaniel (Daniel Regenass), daniel.regenass@meteoswiss.ch
3
+ - @srethore (Sophie Réthoré), sophie.rethore@meteoswiss.ch
@@ -3,11 +3,21 @@ All notable changes to ampycloud will be documented in this file.
3
3
  The format is inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [v2.2.0]
7
+ ### Added:
8
+ - [srethore, 2026-09-01] Refactor pypi action using trusted publishing
9
+ and apply Open Source MCH template to the whole project.
10
+
6
11
  ## [v2.1.1]
12
+ ### Fixed:
13
+ - [regDaniel, 2024-09-19] Require statsmodels >= v0.14.3, where incompatibility with scipy is fixed
14
+ - [regDaniel, 2024-09-04] Inconsitencies in contribution guidelines, authorship declaration and citation file.
15
+
16
+ ## [v2.1.0]
7
17
  ### Added:
8
- - [regDaniel, 2024-10-28] Feature to calculate cloud base height with a subset of instruments only
18
+ - [regDaniel, 2024-08-28] Feature to calculate cloud base height with a subset of instruments only
9
19
  ### Fixed:
10
- - [regDaniel, 2024-10-28] Incompatibility of scipy and statsmodels
20
+ - [regDaniel, 2024-08-28] Incompatibility of scipy and statsmodels
11
21
 
12
22
  ## [v2.0.0]
13
23
  ### Added:
@@ -1,4 +1,4 @@
1
- Copyright 2021-2023 MeteoSwiss, contributors listed under AUTHORS
1
+ Copyright 2021-2026 MeteoSwiss, contributors listed under AUTHORS
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted
4
4
  provided that the following conditions are met:
@@ -1,27 +1,29 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: ampycloud
3
- Version: 2.1.0
4
- Summary: Determining the sky coverage fraction and base height of cloud layers usingceilometer data
5
- Home-page: https://meteoswiss.github.io/ampycloud
6
- Author: Frédéric P.A. Vogt, Daniel Regenass
3
+ Version: 2.2.0
4
+ Summary: Determining the sky coverage fraction and base height of cloud layers using ceilometer data
5
+ License-Expression: BSD-3-Clause
6
+ License-File: AUTHORS
7
+ License-File: LICENSE
8
+ Author: Frédéric P.A. Vogt
7
9
  Author-email: frederic.vogt@meteoswiss.ch
8
- License: BSD-3-Clause
9
- Project-URL: Source, https://github.com/MeteoSwiss/ampycloud/
10
- Project-URL: Changelog, https://meteoswiss.github.io/ampycloud/changelog.html
11
- Project-URL: Issues, https://github.com/MeteoSwiss/ampycloud/issues
12
- Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Intended Audience :: Science/Research
14
- Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
15
- Classifier: License :: OSI Approved :: BSD License
16
- Classifier: Programming Language :: Python
17
- Classifier: Programming Language :: Python :: 3.9
10
+ Requires-Python: >=3.10,<3.13
11
+ Classifier: Programming Language :: Python :: 3
18
12
  Classifier: Programming Language :: Python :: 3.10
19
13
  Classifier: Programming Language :: Python :: 3.11
20
- Requires-Python: >=3.9.0
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Requires-Dist: matplotlib (>=3.7.2)
16
+ Requires-Dist: numpy (>=1.20.3)
17
+ Requires-Dist: pandas (>=1.5)
18
+ Requires-Dist: pyyaml
19
+ Requires-Dist: ruamel.yaml
20
+ Requires-Dist: scikit-learn (>=1.2.0)
21
+ Requires-Dist: scipy (>=1.7.3)
22
+ Requires-Dist: statsmodels (>=0.14.3)
23
+ Project-URL: Changelog, https://meteoswiss.github.io/ampycloud/changelog.html
24
+ Project-URL: Issues, https://github.com/MeteoSwiss/ampycloud/issues
25
+ Project-URL: Source, https://github.com/MeteoSwiss/ampycloud/
21
26
  Description-Content-Type: text/markdown
22
- Provides-Extra: dev
23
- License-File: LICENSE
24
- License-File: AUTHORS
25
27
 
26
28
  # ampycloud
27
29
 
@@ -42,8 +44,9 @@ For the full documentation, installation instructions, etc ..., go to: https://m
42
44
 
43
45
  ### License & Copyright
44
46
 
45
- ampycloud is released under the terms of **the 3-Clause BSD license**. The copyright (2021-2024) belongs to MeteoSwiss.
47
+ ampycloud is released under the terms of **the 3-Clause BSD license**. The copyright (2021-2026) belongs to MeteoSwiss.
46
48
 
47
49
  ### Contributing to ampycloud
48
50
 
49
51
  Please see the [contributing guidelines](CONTRIBUTING.md) for details.
52
+
@@ -17,7 +17,7 @@ For the full documentation, installation instructions, etc ..., go to: https://m
17
17
 
18
18
  ### License & Copyright
19
19
 
20
- ampycloud is released under the terms of **the 3-Clause BSD license**. The copyright (2021-2024) belongs to MeteoSwiss.
20
+ ampycloud is released under the terms of **the 3-Clause BSD license**. The copyright (2021-2026) belongs to MeteoSwiss.
21
21
 
22
22
  ### Contributing to ampycloud
23
23
 
@@ -0,0 +1,99 @@
1
+ [project]
2
+ dynamic = ["version"]
3
+ name = "ampycloud"
4
+ description = "Determining the sky coverage fraction and base height of cloud layers using ceilometer data"
5
+ license = "BSD-3-Clause"
6
+ readme = "README.md"
7
+ authors = [
8
+ { name = "Frédéric P.A. Vogt", email = "frederic.vogt@meteoswiss.ch" },
9
+ { name = "Daniel Regenass" },
10
+ ]
11
+ requires-python = ">=3.10,<3.13"
12
+ dependencies = [
13
+ "matplotlib>=3.7.2",
14
+ "numpy>=1.20.3",
15
+ "scikit-learn>=1.2.0",
16
+ "scipy>=1.7.3",
17
+ "statsmodels>=0.14.3",
18
+ "pandas>=1.5",
19
+ "pyyaml",
20
+ "ruamel.yaml",
21
+ ]
22
+
23
+ [project.urls]
24
+ Source = "https://github.com/MeteoSwiss/ampycloud/"
25
+ Changelog = "https://meteoswiss.github.io/ampycloud/changelog.html"
26
+ Issues = "https://github.com/MeteoSwiss/ampycloud/issues"
27
+
28
+ [project.scripts]
29
+ ampycloud_speed_test = "ampycloud.__main__:ampycloud_speed_test"
30
+ ampycloud_copy_prm_file = "ampycloud.__main__:ampycloud_copy_prm_file"
31
+
32
+ [dependency-groups]
33
+ test = [
34
+ "pytest (>=8.4.2,<9.0.0)",
35
+ "pytest-cov (>=7.0.0,<8.0.0)"
36
+ ]
37
+ lint = [
38
+ "mypy (>=1.18.1,<2.0.0)",
39
+ "pylint (>=3.3.8,<4.0.0)",
40
+ "ruff (>=0.15.15,<0.16.0)",
41
+ ]
42
+ doc = [
43
+ "pydata-sphinx-theme (>=0.16.1,<0.17.0)",
44
+ "sphinx (>=8.1.0,<8.2.0)", # sphinx 8.2 raised the floor to Python 3.11, dropping 3.10 support
45
+ "sphinx-autoapi (>=3.6.0,<4.0.0)"
46
+ ]
47
+ dev = [
48
+ { include-group = "test" },
49
+ { include-group = "lint" },
50
+ { include-group = "doc" }
51
+ ]
52
+
53
+ [tool.poetry]
54
+ requires-poetry = ">=2.0,<3.0"
55
+ version = "2.2.0" # DO NOT SET. The version of the package is always set by the CI/CD pipeline.
56
+ packages = [{ include = "ampycloud", from = "src" }]
57
+ include = [
58
+ "CHANGELOG",
59
+ "src/ampycloud/prms/*.yml",
60
+ "src/ampycloud/plots/mpl_styles/*.mplstyle",
61
+ ]
62
+
63
+ [tool.pylint.master]
64
+ disable = [
65
+ 'C0114', # missing-module-docstring
66
+ 'C0115', # missing-class-docstring
67
+ 'C0116', # missing-function-docstring
68
+ 'R0801', # duplications are already covered by SonarQube
69
+ 'W0511', # fix me or to-do comments are already covered by SonarQube
70
+ ]
71
+
72
+ [tool.pylint.basic]
73
+ argument-naming-style = 'any'
74
+ attr-naming-style = 'any'
75
+ max-args = 8
76
+ max-positional-arguments = 8
77
+ good-names = ['_', 'a', 'ax', 'b', 'c', 'dt', 'f', 'fn', 'i', 'j', 'k', 'w', 'x', 'y', 'z']
78
+
79
+ [tool.pylint.format]
80
+ # Maximum number of lines in a module.
81
+ max-line-length = 120
82
+
83
+ [tool.pylint.design]
84
+ # Minimum number of public methods for a class (see R0903).
85
+ min-public-methods = 0
86
+
87
+ [tool.mypy]
88
+ ignore_missing_imports = true
89
+ disallow_untyped_defs = true
90
+
91
+ [tool.coverage.run]
92
+ omit = ["test/**", "doc/**"]
93
+
94
+ [tool.ruff]
95
+ line-length = 120
96
+
97
+ [build-system]
98
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
99
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,90 @@
1
+ """
2
+ Copyright (c) 2021-2026 MeteoSwiss, contributors listed in AUTHORS.
3
+
4
+ Distributed under the terms of the 3-Clause BSD License.
5
+
6
+ SPDX-License-Identifier: BSD-3-Clause
7
+
8
+ Module contains: high-level entry point routines
9
+ """
10
+
11
+ # Import from Python
12
+ import argparse
13
+ import platform
14
+ import multiprocessing as mp
15
+ from datetime import datetime
16
+
17
+ # Import from ampycloud
18
+ from .version import VERSION
19
+ from .utils import performance
20
+ from .core import copy_prm_file
21
+
22
+
23
+ def ampycloud_speed_test() -> None:
24
+ """The ampycloud_speed_test entry point, meant to by launched from the command line."""
25
+
26
+ # Use argparse to make ampycloud user friendly
27
+ parser = argparse.ArgumentParser(
28
+ description=f"ampycloud {VERSION}"
29
+ + " - Python package to characterize cloud layers"
30
+ + " using ceilometer measurements.\n"
31
+ + "This entry point lets you measure the performance of ampycloud on your machine.",
32
+ epilog="For details: https://MeteoSwiss.github.io/ampycloud\n ",
33
+ formatter_class=argparse.RawTextHelpFormatter,
34
+ )
35
+
36
+ parser.add_argument(
37
+ "-niter",
38
+ action="store",
39
+ default=10,
40
+ type=int,
41
+ metavar="int",
42
+ help="Number of ampycloud.demo() executions to trigger. Defaults to 10.",
43
+ )
44
+
45
+ # Done getting ready. Now start doing stuff.
46
+ # What did the user type in ?
47
+ args = parser.parse_args()
48
+
49
+ # Launch the initialization of a new processing arena
50
+ niter, mean, std, median, mmin, mmax = performance.get_speed_benchmark(niter=args.niter)
51
+
52
+ print(f"\nTest datetime: {datetime.now()}")
53
+ print(f"Platform: {platform.platform()}")
54
+ print(f"CPU count: {mp.cpu_count()}\n")
55
+
56
+ print(f"ampycloud.demo() execution time from {niter} runs:")
57
+ print(f" * mean [std]: {mean:.2f}s [{std:.2f}s]")
58
+ print(f" * median [min; max]: {median:.2f}s [{mmin:.2f}s; {mmax:.2f}s]\n")
59
+
60
+
61
+ def ampycloud_copy_prm_file() -> None:
62
+ """The ampycloud_copy_prm_file entry point, meant to be launched from the command line."""
63
+
64
+ # Use argparse to make ampycloud user friendly
65
+ parser = argparse.ArgumentParser(
66
+ description=f"ampycloud {VERSION}"
67
+ + " - Python package to characterize cloud layers"
68
+ + " using ceilometer measurements.\n"
69
+ + "This entry point lets you get a local copy the ampycloud parameter files.",
70
+ epilog="For details: https://MeteoSwiss.github.io/ampycloud\n ",
71
+ formatter_class=argparse.RawTextHelpFormatter,
72
+ )
73
+
74
+ parser.add_argument(
75
+ "-which",
76
+ action="store",
77
+ default="default",
78
+ type=str,
79
+ metavar="name",
80
+ help='Name of the parameter file to copy. Defaults to "default".',
81
+ )
82
+
83
+ # Done getting ready. Now start doing stuff.
84
+ # What did the user type in ?
85
+ args = parser.parse_args()
86
+
87
+ # Get the local copy
88
+ copy_prm_file(which=args.which)
89
+
90
+ print("\nSuccess.")