ufs2arco 0.0.2__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 (38) hide show
  1. ufs2arco-0.0.2/.github/workflows/ci.yaml +95 -0
  2. ufs2arco-0.0.2/.github/workflows/publish.yaml +29 -0
  3. ufs2arco-0.0.2/.gitignore +164 -0
  4. ufs2arco-0.0.2/.readthedocs.yaml +31 -0
  5. ufs2arco-0.0.2/LICENSE +174 -0
  6. ufs2arco-0.0.2/PKG-INFO +52 -0
  7. ufs2arco-0.0.2/README.md +23 -0
  8. ufs2arco-0.0.2/coverage.toml +5 -0
  9. ufs2arco-0.0.2/docs/.gitignore +1 -0
  10. ufs2arco-0.0.2/docs/Makefile +23 -0
  11. ufs2arco-0.0.2/docs/_templates/autosummary/class.rst +26 -0
  12. ufs2arco-0.0.2/docs/api.rst +10 -0
  13. ufs2arco-0.0.2/docs/conf.py +50 -0
  14. ufs2arco-0.0.2/docs/config-replay.yaml +152 -0
  15. ufs2arco-0.0.2/docs/contributing.rst +74 -0
  16. ufs2arco-0.0.2/docs/example_replay_cice6.ipynb +20899 -0
  17. ufs2arco-0.0.2/docs/example_replay_fv3.ipynb +21596 -0
  18. ufs2arco-0.0.2/docs/example_replay_mom6.ipynb +5567 -0
  19. ufs2arco-0.0.2/docs/index.rst +36 -0
  20. ufs2arco-0.0.2/docs/installation.rst +49 -0
  21. ufs2arco-0.0.2/docs/make.bat +35 -0
  22. ufs2arco-0.0.2/docs/support.rst +7 -0
  23. ufs2arco-0.0.2/environment.yaml +30 -0
  24. ufs2arco-0.0.2/pyproject.toml +44 -0
  25. ufs2arco-0.0.2/setup.cfg +4 -0
  26. ufs2arco-0.0.2/tests/config-replay.yaml +84 -0
  27. ufs2arco-0.0.2/tests/test_ufsdataset.py +21 -0
  28. ufs2arco-0.0.2/ufs2arco/__init__.py +5 -0
  29. ufs2arco-0.0.2/ufs2arco/cice6dataset.py +103 -0
  30. ufs2arco-0.0.2/ufs2arco/fv3dataset.py +49 -0
  31. ufs2arco-0.0.2/ufs2arco/mom6dataset.py +41 -0
  32. ufs2arco-0.0.2/ufs2arco/ufs2arco.egg-info/PKG-INFO +52 -0
  33. ufs2arco-0.0.2/ufs2arco/ufs2arco.egg-info/SOURCES.txt +36 -0
  34. ufs2arco-0.0.2/ufs2arco/ufs2arco.egg-info/dependency_links.txt +1 -0
  35. ufs2arco-0.0.2/ufs2arco/ufs2arco.egg-info/requires.txt +19 -0
  36. ufs2arco-0.0.2/ufs2arco/ufs2arco.egg-info/top_level.txt +1 -0
  37. ufs2arco-0.0.2/ufs2arco/ufsdataset.py +388 -0
  38. ufs2arco-0.0.2/ufs2arco/utils.py +20 -0
@@ -0,0 +1,95 @@
1
+ # This uses actios:
2
+ # checkout: https://github.com/actions/checkout
3
+ # cache: https://github.com/actions/cache
4
+ # codecov-action: https://github.com/codecov/codecov-action
5
+
6
+ name: CI
7
+ on:
8
+ push:
9
+ branches:
10
+ - "*"
11
+ pull_request:
12
+ branches:
13
+ - "*"
14
+ workflow_dispatch:
15
+ logLevel:
16
+ options:
17
+ - info
18
+ - warning
19
+ - debug
20
+
21
+
22
+ concurrency:
23
+ group: ${{ github.workflow }}-${{ github.ref }}
24
+ cancel-in-progress: true
25
+
26
+ jobs:
27
+ build:
28
+ name: Build (${{ matrix.python-version }} | ${{ matrix.os }})
29
+ runs-on: ${{ matrix.os }}
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ os: ["ubuntu-latest", "macos-latest"]
34
+ python-version: ["3.11"]
35
+ steps:
36
+ - uses: actions/checkout@v3
37
+ - name: Create conda environment
38
+ uses: mamba-org/setup-micromamba@v1
39
+ with:
40
+ cache-downloads: true
41
+ cache-environment: true
42
+ micromamba-version: "latest"
43
+ environment-file: environment.yaml
44
+ create-args: python=${{ matrix.python-version }}
45
+ init-shell: bash
46
+ - name: Install ufs2arco
47
+ shell: bash -l {0}
48
+ run: |
49
+ python -V
50
+ python -c "import setuptools; print(setuptools.__version__)"
51
+ python -m pip install -e . --no-deps
52
+ - name: Run Unit Tests
53
+ shell: bash -l {0}
54
+ run: |
55
+ python -V
56
+ coverage run --rcfile=coverage.toml -m pytest --verbose
57
+ - name: Get coverage report
58
+ shell: bash -l {0}
59
+ run: |
60
+ coverage report -m ; coverage xml
61
+
62
+ windows-build:
63
+ name: Build (${{ matrix.python-version }} | ${{ matrix.os }})
64
+ runs-on: ${{ matrix.os }}
65
+ strategy:
66
+ fail-fast: false
67
+ matrix:
68
+ os: ["windows-latest"]
69
+ python-version: ["3.11"]
70
+ steps:
71
+ - uses: actions/checkout@v3
72
+ - name: Create conda environment
73
+ uses: mamba-org/setup-micromamba@v1
74
+ with:
75
+ cache-downloads: true
76
+ cache-environment: true
77
+ micromamba-version: "latest"
78
+ environment-file: environment.yaml
79
+ create-args: python=${{ matrix.python-version }}
80
+ init-shell: powershell
81
+ - name: Install ufs2arco
82
+ shell: pwsh
83
+ run: |
84
+ python -V
85
+ python -c "import setuptools; print(setuptools.__version__)"
86
+ python -m pip install -e . --no-deps
87
+ - name: Run Unit Tests
88
+ shell: pwsh
89
+ run: |
90
+ python -V
91
+ coverage run --rcfile=coverage.toml -m pytest --verbose
92
+ - name: Get coverage report
93
+ shell: pwsh
94
+ run: |
95
+ coverage report -m ; coverage xml
@@ -0,0 +1,29 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ pypi-publish:
9
+ name: Upload release to PyPI
10
+ runs-on: ubuntu-latest
11
+ environment:
12
+ name: pypi
13
+ url: https://pypi.org/p/ufs2arco
14
+ permissions:
15
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v3
20
+ with:
21
+ python-version: '3.x'
22
+ - name: Install dependencies
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install build
26
+ - name: Build package
27
+ run: python -m build
28
+ - name: Publish package distributions to PyPI
29
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,164 @@
1
+ # Additions
2
+ .DS_Store
3
+
4
+
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[cod]
8
+ *$py.class
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ cover/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+ db.sqlite3-journal
67
+
68
+ # Flask stuff:
69
+ instance/
70
+ .webassets-cache
71
+
72
+ # Scrapy stuff:
73
+ .scrapy
74
+
75
+ # Sphinx documentation
76
+ docs/_build/
77
+
78
+ # PyBuilder
79
+ .pybuilder/
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ # For a library or package, you might want to ignore these files since the code is
91
+ # intended to run in multiple environments; otherwise, check them in:
92
+ # .python-version
93
+
94
+ # pipenv
95
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
97
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
98
+ # install all needed dependencies.
99
+ #Pipfile.lock
100
+
101
+ # poetry
102
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
104
+ # commonly ignored for libraries.
105
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106
+ #poetry.lock
107
+
108
+ # pdm
109
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110
+ #pdm.lock
111
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112
+ # in version control.
113
+ # https://pdm.fming.dev/#use-with-ide
114
+ .pdm.toml
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # Pyre type checker
151
+ .pyre/
152
+
153
+ # pytype static type analyzer
154
+ .pytype/
155
+
156
+ # Cython debug symbols
157
+ cython_debug/
158
+
159
+ # PyCharm
160
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
161
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
162
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
163
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
164
+ #.idea/
@@ -0,0 +1,31 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the OS, Python version and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "mambaforge-22.9"
13
+
14
+ # Build documentation in the "docs/" directory with Sphinx
15
+ sphinx:
16
+ configuration: docs/conf.py
17
+
18
+ conda:
19
+ environment: environment.yaml
20
+
21
+ # Optionally build your docs in additional formats such as PDF and ePub
22
+ # formats:
23
+ # - pdf
24
+ # - epub
25
+
26
+ # Optional but recommended, declare the Python requirements required
27
+ # to build your documentation
28
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
29
+ # python:
30
+ # install:
31
+ # - requirements: docs/requirements.txt
ufs2arco-0.0.2/LICENSE ADDED
@@ -0,0 +1,174 @@
1
+ Copyright (c) 2023 ufs2arco Contributors
2
+
3
+ This file is part of ufs2arco, which is made available under version 3
4
+ of the Gnu Lesser General Public License, which is provided below.
5
+
6
+ The intent of this license is to ensure free and unrestricted access to
7
+ the ufs2arco software, and to pass on those rights to modified versions
8
+ of this software.
9
+
10
+ GNU LESSER GENERAL PUBLIC LICENSE
11
+ Version 3, 29 June 2007
12
+
13
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
14
+ Everyone is permitted to copy and distribute verbatim copies
15
+ of this license document, but changing it is not allowed.
16
+
17
+
18
+ This version of the GNU Lesser General Public License incorporates
19
+ the terms and conditions of version 3 of the GNU General Public
20
+ License, supplemented by the additional permissions listed below.
21
+
22
+ 0. Additional Definitions.
23
+
24
+ As used herein, "this License" refers to version 3 of the GNU Lesser
25
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
26
+ General Public License.
27
+
28
+ "The Library" refers to a covered work governed by this License,
29
+ other than an Application or a Combined Work as defined below.
30
+
31
+ An "Application" is any work that makes use of an interface provided
32
+ by the Library, but which is not otherwise based on the Library.
33
+ Defining a subclass of a class defined by the Library is deemed a mode
34
+ of using an interface provided by the Library.
35
+
36
+ A "Combined Work" is a work produced by combining or linking an
37
+ Application with the Library. The particular version of the Library
38
+ with which the Combined Work was made is also called the "Linked
39
+ Version".
40
+
41
+ The "Minimal Corresponding Source" for a Combined Work means the
42
+ Corresponding Source for the Combined Work, excluding any source code
43
+ for portions of the Combined Work that, considered in isolation, are
44
+ based on the Application, and not on the Linked Version.
45
+
46
+ The "Corresponding Application Code" for a Combined Work means the
47
+ object code and/or source code for the Application, including any data
48
+ and utility programs needed for reproducing the Combined Work from the
49
+ Application, but excluding the System Libraries of the Combined Work.
50
+
51
+ 1. Exception to Section 3 of the GNU GPL.
52
+
53
+ You may convey a covered work under sections 3 and 4 of this License
54
+ without being bound by section 3 of the GNU GPL.
55
+
56
+ 2. Conveying Modified Versions.
57
+
58
+ If you modify a copy of the Library, and, in your modifications, a
59
+ facility refers to a function or data to be supplied by an Application
60
+ that uses the facility (other than as an argument passed when the
61
+ facility is invoked), then you may convey a copy of the modified
62
+ version:
63
+
64
+ a) under this License, provided that you make a good faith effort to
65
+ ensure that, in the event an Application does not supply the
66
+ function or data, the facility still operates, and performs
67
+ whatever part of its purpose remains meaningful, or
68
+
69
+ b) under the GNU GPL, with none of the additional permissions of
70
+ this License applicable to that copy.
71
+
72
+ 3. Object Code Incorporating Material from Library Header Files.
73
+
74
+ The object code form of an Application may incorporate material from
75
+ a header file that is part of the Library. You may convey such object
76
+ code under terms of your choice, provided that, if the incorporated
77
+ material is not limited to numerical parameters, data structure
78
+ layouts and accessors, or small macros, inline functions and templates
79
+ (ten or fewer lines in length), you do both of the following:
80
+
81
+ a) Give prominent notice with each copy of the object code that the
82
+ Library is used in it and that the Library and its use are
83
+ covered by this License.
84
+
85
+ b) Accompany the object code with a copy of the GNU GPL and this license
86
+ document.
87
+
88
+ 4. Combined Works.
89
+
90
+ You may convey a Combined Work under terms of your choice that,
91
+ taken together, effectively do not restrict modification of the
92
+ portions of the Library contained in the Combined Work and reverse
93
+ engineering for debugging such modifications, if you also do each of
94
+ the following:
95
+
96
+ a) Give prominent notice with each copy of the Combined Work that
97
+ the Library is used in it and that the Library and its use are
98
+ covered by this License.
99
+
100
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
101
+ document.
102
+
103
+ c) For a Combined Work that displays copyright notices during
104
+ execution, include the copyright notice for the Library among
105
+ these notices, as well as a reference directing the user to the
106
+ copies of the GNU GPL and this license document.
107
+
108
+ d) Do one of the following:
109
+
110
+ 0) Convey the Minimal Corresponding Source under the terms of this
111
+ License, and the Corresponding Application Code in a form
112
+ suitable for, and under terms that permit, the user to
113
+ recombine or relink the Application with a modified version of
114
+ the Linked Version to produce a modified Combined Work, in the
115
+ manner specified by section 6 of the GNU GPL for conveying
116
+ Corresponding Source.
117
+
118
+ 1) Use a suitable shared library mechanism for linking with the
119
+ Library. A suitable mechanism is one that (a) uses at run time
120
+ a copy of the Library already present on the user's computer
121
+ system, and (b) will operate properly with a modified version
122
+ of the Library that is interface-compatible with the Linked
123
+ Version.
124
+
125
+ e) Provide Installation Information, but only if you would otherwise
126
+ be required to provide such information under section 6 of the
127
+ GNU GPL, and only to the extent that such information is
128
+ necessary to install and execute a modified version of the
129
+ Combined Work produced by recombining or relinking the
130
+ Application with a modified version of the Linked Version. (If
131
+ you use option 4d0, the Installation Information must accompany
132
+ the Minimal Corresponding Source and Corresponding Application
133
+ Code. If you use option 4d1, you must provide the Installation
134
+ Information in the manner specified by section 6 of the GNU GPL
135
+ for conveying Corresponding Source.)
136
+
137
+ 5. Combined Libraries.
138
+
139
+ You may place library facilities that are a work based on the
140
+ Library side by side in a single library together with other library
141
+ facilities that are not Applications and are not covered by this
142
+ License, and convey such a combined library under terms of your
143
+ choice, if you do both of the following:
144
+
145
+ a) Accompany the combined library with a copy of the same work based
146
+ on the Library, uncombined with any other library facilities,
147
+ conveyed under the terms of this License.
148
+
149
+ b) Give prominent notice with the combined library that part of it
150
+ is a work based on the Library, and explaining where to find the
151
+ accompanying uncombined form of the same work.
152
+
153
+ 6. Revised Versions of the GNU Lesser General Public License.
154
+
155
+ The Free Software Foundation may publish revised and/or new versions
156
+ of the GNU Lesser General Public License from time to time. Such new
157
+ versions will be similar in spirit to the present version, but may
158
+ differ in detail to address new problems or concerns.
159
+
160
+ Each version is given a distinguishing version number. If the
161
+ Library as you received it specifies that a certain numbered version
162
+ of the GNU Lesser General Public License "or any later version"
163
+ applies to it, you have the option of following the terms and
164
+ conditions either of that published version or of any later version
165
+ published by the Free Software Foundation. If the Library as you
166
+ received it does not specify a version number of the GNU Lesser
167
+ General Public License, you may choose any version of the GNU Lesser
168
+ General Public License ever published by the Free Software Foundation.
169
+
170
+ If the Library as you received it specifies that a proxy can decide
171
+ whether future versions of the GNU Lesser General Public License shall
172
+ apply, that proxy's public statement of acceptance of any version is
173
+ permanent authorization for you to choose that version for the
174
+ Library.
@@ -0,0 +1,52 @@
1
+ Metadata-Version: 2.1
2
+ Name: ufs2arco
3
+ Version: 0.0.2
4
+ Summary: Tools for converting Unified Forecast System (UFS) output to Analysis Ready, Cloud Optimized (ARCO) format
5
+ Author-email: Timothy Smith <tim.smith@noaa.gov>, Lauryn Eldridge <leldridge@wvhtf.org>, Ken Witt <kwitt@wvhtf.org>
6
+ Project-URL: source, https://github.com/NOAA-PSL/ufs2arco
7
+ Project-URL: documentation, https://ufs2arco.readthedocs.io/en/latest/
8
+ Requires-Python: >=3.9
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Requires-Dist: numpy
12
+ Requires-Dist: matplotlib
13
+ Requires-Dist: xarray
14
+ Requires-Dist: netCDF4
15
+ Requires-Dist: h5netcdf
16
+ Requires-Dist: bottleneck
17
+ Requires-Dist: dask[complete]
18
+ Requires-Dist: zarr
19
+ Requires-Dist: cftime
20
+ Requires-Dist: fsspec
21
+ Requires-Dist: s3fs
22
+ Requires-Dist: gcsfs
23
+ Requires-Dist: pytest
24
+ Requires-Dist: coverage
25
+ Provides-Extra: documentation
26
+ Requires-Dist: jupyter; extra == "documentation"
27
+ Requires-Dist: nbsphinx; extra == "documentation"
28
+ Requires-Dist: sphinx-book-theme; extra == "documentation"
29
+
30
+ # ufs2arco
31
+ Tools for converting Unified Forecast System (UFS) output to Analysis Ready, Cloud Optimized (ARCO) format
32
+
33
+ ## Installation
34
+
35
+
36
+ ### Installation from pip
37
+
38
+ ```bash
39
+ pip install ufs2arco
40
+ ```
41
+
42
+ ### Installation from GitHub
43
+
44
+ To obtain the latest development version, clone
45
+ [the repository](https://github.com/NOAA-PSL/ufs2arco>)
46
+ and install it as follows
47
+
48
+ ```bash
49
+ git clone https://github.com/NOAA-PSL/ufs2arco.git
50
+ cd ufs2arco
51
+ pip install -e .
52
+ ```
@@ -0,0 +1,23 @@
1
+ # ufs2arco
2
+ Tools for converting Unified Forecast System (UFS) output to Analysis Ready, Cloud Optimized (ARCO) format
3
+
4
+ ## Installation
5
+
6
+
7
+ ### Installation from pip
8
+
9
+ ```bash
10
+ pip install ufs2arco
11
+ ```
12
+
13
+ ### Installation from GitHub
14
+
15
+ To obtain the latest development version, clone
16
+ [the repository](https://github.com/NOAA-PSL/ufs2arco>)
17
+ and install it as follows
18
+
19
+ ```bash
20
+ git clone https://github.com/NOAA-PSL/ufs2arco.git
21
+ cd ufs2arco
22
+ pip install -e .
23
+ ```
@@ -0,0 +1,5 @@
1
+ [tool.coverage.run]
2
+ omit = [
3
+ "tests/*.py",
4
+ "**/__init__.py",
5
+ ]
@@ -0,0 +1 @@
1
+ generated/
@@ -0,0 +1,23 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ fresh: clean
12
+ rm -f generated/*.rst
13
+
14
+ # Put it first so that "make" without argument is like "make help".
15
+ help:
16
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
17
+
18
+ .PHONY: help Makefile
19
+
20
+ # Catch-all target: route all unknown targets to Sphinx using the new
21
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
22
+ %: Makefile
23
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,26 @@
1
+ {{ objname | escape | underline}}
2
+
3
+ .. currentmodule:: {{ module }}
4
+
5
+ .. autoclass:: {{ objname }}
6
+
7
+ {% block methods %}
8
+ {% if methods %}
9
+ .. rubric:: Methods
10
+ .. autosummary::
11
+ :toctree:
12
+ {% for item in methods %}
13
+ {{ name }}.{{ item }}
14
+ {% endfor %}
15
+ {% endif %}
16
+ {% endblock %}
17
+
18
+ {% block attributes %}
19
+ {% if attributes %}
20
+ .. rubric:: Attributes
21
+ .. autosummary::
22
+ {% for item in attributes %}
23
+ {{ name }}.{{ item }}
24
+ {% endfor %}
25
+ {% endif %}
26
+ {% endblock %}
@@ -0,0 +1,10 @@
1
+ API Reference
2
+ #############
3
+
4
+
5
+ .. autosummary::
6
+ :toctree: generated/
7
+
8
+ ufs2arco.FV3Dataset
9
+ ufs2arco.MOM6Dataset
10
+ ufs2arco.CICE6Dataset
@@ -0,0 +1,50 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+
9
+ import os
10
+ import sys
11
+ import datetime
12
+ sys.path.insert(0, os.path.abspath("../"))
13
+
14
+ project = 'ufs2arco'
15
+ copyright = f"2023-{datetime.datetime.now().year}, ufs2arco developers"
16
+ author = 'ufs2arco developers'
17
+
18
+ # -- General configuration ---------------------------------------------------
19
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
20
+
21
+ extensions = [
22
+ "sphinx.ext.autodoc",
23
+ "sphinx.ext.autosummary",
24
+ "sphinx.ext.napoleon",
25
+ "nbsphinx",
26
+ ]
27
+
28
+ numpydoc_show_class_members = False
29
+ napolean_google_docstring = True
30
+ napolean_numpy_docstring = False
31
+
32
+ templates_path = ['_templates']
33
+ exclude_patterns = []
34
+
35
+ napoleon_custom_sections = [("Returns", "params_style"),
36
+ ("Sets Attributes", "params_style"),
37
+ ("Assumptions", "notes_style"),
38
+ ]
39
+
40
+
41
+ # -- Options for HTML output -------------------------------------------------
42
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
43
+
44
+ html_theme = 'sphinx_book_theme'
45
+ html_static_path = ['_static']
46
+
47
+ html_theme_options = {
48
+ "repository_url": "https://github.com/NOAA-PSL/ufs2arco",
49
+ "use_repository_button": True,
50
+ }