Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
micromamba-version: latest
environment-name: testing
create-args: >-
python=3.12
python=3.11
mamba
pandoc
nox
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: "3.12"
python-version: "3.11"
channels: conda-forge
channel-priority: true

Expand Down
27 changes: 9 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ repos:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: isort
files: \.py$
- id: reorder-python-imports
args: [--py310-plus, --add-import, "from __future__ import annotations"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand All @@ -79,15 +79,12 @@ repos:
)
- id: name-tests-test

- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.8
hooks:
- id: pydocstyle
- id: ruff
files: sequence/.*\.py$
args:
- --convention=numpy
- --add-select=D417
additional_dependencies: [".[toml]"]
args: [--fix]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
Expand All @@ -105,10 +102,4 @@ repos:
rev: "4.2"
hooks:
- id: pyroma
args: ["-d", "--min=9", "."]

- repo: https://github.com/mgedmin/check-manifest
rev: "0.49"
hooks:
- id: check-manifest
args: ["--ignore=.nox,build", "--no-build-isolation"]
args: ["-d", "--min=10", "."]
11 changes: 0 additions & 11 deletions MANIFEST.in

This file was deleted.

3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# 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 __future__ import annotations

import os
import pathlib

Expand Down
4 changes: 3 additions & 1 deletion docs/tutorials/notebooks/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"source": [
"import tqdm\n",
"\n",
"from sequence import Sequence, SequenceModelGrid, processes"
"from sequence import processes\n",
"from sequence.grid import SequenceModelGrid\n",
"from sequence.sequence import Sequence"
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions news/82.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Updated *Sequence* annotations to python 3.10+.
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import os
import pathlib
import shutil
Expand Down Expand Up @@ -74,7 +76,7 @@ def test_cli(session: nox.Session) -> None:
def lint(session: nox.Session) -> None:
"""Look for lint."""
session.install("pre-commit")
session.run("pre-commit", "run", "--all-files", "--verbose")
session.run("pre-commit", "run", "--all-files")


@nox.session
Expand Down
199 changes: 113 additions & 86 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,84 +1,80 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "sequence-model"
name = "sequence_model"
requires-python = ">=3.10"
description = "Python version of the Steckler Sequence model built with landlab"
keywords = [
"landlab",
"sequence",
"stratigraphy",
]
authors = [
{email = "mcflugen@gmail.com"},
{name = "Eric Hutton"}
{ email = "mcflugen@gmail.com" },
{ name = "Eric Hutton" },
]
maintainers = [
{email = "mcflugen@gmail.com"},
{name = "Eric Hutton"}
{ email = "mcflugen@gmail.com" },
{ name = "Eric Hutton" },
]
keywords = ["sequence", "stratigraphy", "landlab"]
license = {text = "MIT"}
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.10"
dependencies = [
"compaction",
"landlab",
"netcdf4",
"numpy >=1.22",
"pyyaml",
"rich-click",
"scipy",
"tomlkit",
"tqdm",
]
dynamic = ["readme", "version"]
"compaction",
"landlab",
"netcdf4",
"numpy >=1.22",
"pyyaml",
"rich-click",
"scipy",
"tomlkit",
"tqdm",
]
dynamic = [
"readme",
"version",
]

[project.license]
text = "MIT"

[project.urls]
homepage = "https://github.com/sequence-dev/sequence"
changelog = "https://github.com/sequence-dev/sequence/blob/develop/CHANGES.md"
documentation = "https://sequence.readthedocs.io"
homepage = "https://github.com/sequence-dev/sequence"
repository = "https://github.com/sequence-dev/sequence"
changelog = "https://github.com/sequence-dev/sequence/blob/develop/CHANGES.md"

[project.optional-dependencies]
dev = ["nox"]
dev = [
"nox",
]

[project.scripts]
sequence = "sequence.cli:sequence"

[build-system]
requires = [
"setuptools",
]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["sequence"]
packages = [
"sequence",
]

[tool.setuptools.dynamic]
readme = {file = ["README.md", "AUTHORS.md"], content-type="text/markdown"}
version = {attr = "sequence._version.__version__"}
[tool.setuptools.dynamic.version]
attr = "sequence._version.__version__"

[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["notebooks", "sequence", "tests"]
norecursedirs = [".*", "*.egg*", "build", "dist", "examples"]
addopts = """
--ignore setup.py
--tb native
--strict
--durations 16
--doctest-modules
-vvv
"""
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ALLOW_UNICODE"
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"notebook: marks tests as notebook (deselect with '-m \"not notebook\"')"
]
[tool.setuptools.dynamic.readme]
file = "README.md"
content-type = "text/markdown"

[tool.isort]
multi_line_output = 3
Expand All @@ -90,38 +86,69 @@ line_length = 88
[tool.mypy]
ignore_missing_imports = true

[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
"notebooks",
"sequence",
"tests",
]
norecursedirs = [
".*",
"*.egg*",
"build",
"dist",
"examples",
]
addopts = [
"--ignore=setup.py",
"--tb=native",
"--strict",
"--durations=16",
"--doctest-modules",
"-vvv",
]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ALLOW_UNICODE",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"notebook: marks tests as notebook (deselect with '-m \"not notebook\"')",
]

[tool.ruff.lint]
select = [
"D",
]
extend-select = [
"D417",
]

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.towncrier]
directory = "news"
package = "sequence"
filename = "CHANGES.md"
single_file = true
underlines = ["", "", ""]
start_string = "<!-- towncrier release notes start -->\n"
underlines = [
"",
"",
"",
]
start_string = """
<!-- towncrier release notes start -->
"""
template = "news/changelog_template.jinja"
issue_format = "[#{issue}](https://github.com/sequence-dev/sequence/issues/{issue})"
title_format = "## {version} ({project_date})"

[[tool.towncrier.type]]
directory = "notebook"
name = "📚 New Tutorial Notebooks"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "🍰 New Features"
showcontent = true

[[tool.towncrier.type]]
directory = "bugfix"
name = "🛠️ Bug Fixes"
showcontent = true

[[tool.towncrier.type]]
directory = "docs"
name = "📖 Documentation Enhancements"
showcontent = true

[[tool.towncrier.type]]
directory = "misc"
name = "🔩 Other Changes and Additions"
showcontent = true
type = [
{ directory = "notebook", name = "📚 New Tutorial Notebooks", showcontent = true },
{ directory = "feature", name = "🍰 New Features", showcontent = true },
{ directory = "bugfix", name = "🛠️ Bug Fixes", showcontent = true },
{ directory = "docs", name = "📖 Documentation Enhancements", showcontent = true },
{ directory = "misc", name = "🔩 Other Changes and Additions", showcontent = true },
]
14 changes: 4 additions & 10 deletions sequence/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
"""A sequence-stratigraphic model of a 1D profile written with *Landlab*."""
from ._grid import SequenceModelGrid
from ._version import __version__
from .sequence import Sequence
from .sequence_model import SequenceModel
from __future__ import annotations

__all__ = [
"__version__",
"Sequence",
"SequenceModel",
"SequenceModelGrid",
]
from sequence._version import __version__

__all__ = ["__version__"]
2 changes: 2 additions & 0 deletions sequence/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from __future__ import annotations

__version__ = "0.5.2.dev0"
Loading