Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Reference:
# - https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
target-branch: "dependencies"
labels: ["dependencies"]

- package-ecosystem: "pip"
directory: "/requirements"
schedule:
interval: "daily"
target-branch: "dependencies"
labels: ["dependencies"]
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ sphinx:

python:
install:
- requirements: requirements-docs.txt
- requirements: requirements-docs.in
- method: pip
path: .
15 changes: 7 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
@nox.session
def test(session: nox.Session) -> None:
"""Run the tests."""
session.install(".[units,testing]")
session.install("-r", "requirements/required.txt", ".[units,testing]")

args = ["--cov", PROJECT, "-vvv"] + session.posargs

if "CI" in os.environ:
args.append(f"--cov-report=xml:{ROOT.absolute()!s}/coverage.xml")

session.run("pip", "list")
session.run("pytest", *args)

if "CI" not in os.environ:
Expand All @@ -29,9 +31,10 @@ def test(session: nox.Session) -> None:
@nox.session(name="test-cli", python=PYTHON_VERSION, venv_backend="conda")
def test_cli(session: nox.Session) -> None:
"""Run the tests."""
session.install(".[units]")
session.install("-r", "requirements/required.txt", ".[units,testing]")
session.conda_install("pymt_topography", channel=["nodefaults", "conda-forge"])

session.run("pip", "list")
session.run("bmi-test", "pymt_topography:Topography")


Expand All @@ -57,11 +60,7 @@ def build_docs(session: nox.Session) -> None:

build_generated_docs(session)

session.install(
*("-r", "requirements-docs.txt"),
*("-r", "requirements.txt"),
)
session.install(".")
session.install("-r", "requirements-docs.in", ".[units]")

pathlib.Path("build").mkdir(exist_ok=True)

Expand All @@ -83,7 +82,7 @@ def build_generated_docs(session: nox.Session) -> None:
# FOLDER["docs_generated"].mkdir(exist_ok=True)

session.install("sphinx")
session.install("-e", ".")
session.install("-e", ".[units]")

with session.chdir(ROOT):
os.makedirs("src/docs/_generated/api", exist_ok=True)
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ text = "MIT"

[project.optional-dependencies]
units = [
"gimli.units>=0.3.2"
"gimli.units>=0.3.2",
]
dev = [
"black",
Expand All @@ -61,6 +61,9 @@ testing = [
"pytest>=3.6",
]
docs = [
"myst-parser",
"sphinx-copybutton",
"sphinx-inline-tabs",
"sphinx>=1.5.1",
]
build = [
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
gimli.units>=0.3.2
importlib-resources; python_version < '3.12'
model-metadata>=0.8.1
numpy
pytest
pytest-dependency
standard-names>=0.2.8
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

3 changes: 3 additions & 0 deletions requirements/required.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gimli.units==0.3.2
model-metadata==0.8.1
standard-names==0.2.8