From 0e977d3e5702983f827eddda8441a597e70c38ce Mon Sep 17 00:00:00 2001 From: "Soroosh.Mani" Date: Fri, 1 Dec 2023 15:00:38 -0500 Subject: [PATCH 1/2] Fix doc build error --- docs/source/conf.py | 11 ++++++----- pyproject.toml | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 485d5c9f..1ff4e49d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -9,6 +9,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. +from datetime import datetime import os from os import PathLike from pathlib import Path @@ -16,7 +17,7 @@ import sys from dunamai import Version -from setuptools import config +from importlib.metadata import metadata def repository_root(path: PathLike = None) -> Path: @@ -42,11 +43,11 @@ def repository_root(path: PathLike = None) -> Path: ) # -- Project information ----------------------------------------------------- -metadata = config.read_configuration('../../setup.cfg')['metadata'] +md = metadata('coupledmodeldriver') -project = metadata['name'] -author = metadata['author'] -copyright = f'2021, Office of Coast Survey (OCS), National Oceanic and Atmospheric Administration (NOAA)' +project = md['name'] +author = md['author'] +copyright = f'{datetime.now().year}, Office of Coast Survey (OCS), National Oceanic and Atmospheric Administration (NOAA)' # The full version, including alpha/beta/rc tags try: diff --git a/pyproject.toml b/pyproject.toml index 0dd85221..33d42df9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ enable = true [tool.poetry.dependencies] python = '<3.11' # due to numba adcircpy = '>=1.2.5' +dunamai = { version = '*', optional = true } file-read-backwards = '*' nemspy = '>=1.0.4' numpy = '*' From 34c41ed1c180004f50a57c54024f97aeb00e9ace Mon Sep 17 00:00:00 2001 From: "Soroosh.Mani" Date: Fri, 1 Dec 2023 21:34:10 -0500 Subject: [PATCH 2/2] Add missing packages --- .readthedocs.yaml | 4 ++++ coupledmodeldriver/client/unqueued_runs.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c59320d5..b2b0ae7d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,6 +8,10 @@ build: os: ubuntu-20.04 tools: python: "3.10" + apt_packages: + - libgeos-dev + - libproj-dev + - libudunits2-dev sphinx: configuration: docs/source/conf.py diff --git a/coupledmodeldriver/client/unqueued_runs.py b/coupledmodeldriver/client/unqueued_runs.py index 4d39bd56..b85cfd61 100644 --- a/coupledmodeldriver/client/unqueued_runs.py +++ b/coupledmodeldriver/client/unqueued_runs.py @@ -1,5 +1,5 @@ from argparse import ArgumentParser -from collections import Collection +from collections.abc import Collection import os from pathlib import Path from typing import Any, Dict, List