Skip to content

Commit ed3c0a9

Browse files
committed
initialize project from template
0 parents  commit ed3c0a9

File tree

9 files changed

+222
-0
lines changed

9 files changed

+222
-0
lines changed

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# editor files
2+
*~
3+
\#*\#
4+
5+
# python bytecode
6+
*.py[co]
7+
__pycache__/
8+
9+
# install artifacts
10+
/build
11+
/dist
12+
/*.egg-info
13+
14+
# tools
15+
.ipynb_checkpoints/
16+
.hypothesis/
17+
.pytest_cache
18+
.prettier_cache
19+
.coverage
20+
.coverage.*
21+
.cache
22+
/docs/_build/

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
ci:
2+
autoupdate_schedule: weekly
3+
4+
# https://pre-commit.com/
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v4.6.0
8+
hooks:
9+
- id: trailing-whitespace
10+
- id: end-of-file-fixer
11+
- id: check-docstring-first
12+
- id: check-yaml
13+
- id: check-toml
14+
- repo: https://github.com/astral-sh/ruff-pre-commit
15+
rev: v0.6.2
16+
hooks:
17+
- id: ruff
18+
args: [--fix]
19+
- repo: https://github.com/psf/black-pre-commit-mirror
20+
rev: 24.8.0
21+
hooks:
22+
- id: black-jupyter
23+
- repo: https://github.com/keewis/blackdoc
24+
rev: v0.3.9
25+
hooks:
26+
- id: blackdoc
27+
additional_dependencies: ["black==24.8.0"]
28+
- id: blackdoc-autoupdate-black
29+
- repo: https://github.com/kynan/nbstripout
30+
rev: 0.7.1
31+
hooks:
32+
- id: nbstripout
33+
args: [--extra-keys=metadata.kernelspec metadata.language_info.version]
34+
- repo: https://github.com/rbubley/mirrors-prettier
35+
rev: v3.3.3
36+
hooks:
37+
- id: prettier
38+
args: [--cache-location=.prettier_cache/cache]

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Apache Software License 2.0
2+
3+
Copyright (c) 2024, xarray-array-testing developers
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.

ci/requirements/docs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: xarray-array-testing-docs
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.12
6+
- sphinx>=4
7+
- sphinx-book-theme
8+
- ipython

ci/requirements/environment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: xarray-array-testing-tests
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.12
6+
- ipython
7+
- pre-commit
8+
- pytest
9+
- pytest-reportlog

docs/conf.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# -- Project information -----------------------------------------------------
2+
import datetime as dt
3+
4+
project = "xarray-array-testing"
5+
author = f"{project} developers"
6+
initial_year = "2024"
7+
year = dt.datetime.now().year
8+
copyright = f"{initial_year}-{year}, {author}"
9+
10+
# The root toctree document.
11+
root_doc = "index"
12+
13+
# -- General configuration ---------------------------------------------------
14+
15+
# Add any Sphinx extension module names here, as strings. They can be
16+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
17+
# ones.
18+
extensions = [
19+
"sphinx.ext.extlinks",
20+
"sphinx.ext.intersphinx",
21+
"IPython.sphinxext.ipython_directive",
22+
"IPython.sphinxext.ipython_console_highlighting",
23+
]
24+
25+
extlinks = {
26+
"issue": (
27+
"https://github.com/xarray-contrib/xarray-array-testing/issues/%s",
28+
"GH%s",
29+
),
30+
"pull": ("https://github.com/xarray-contrib/xarray-array-testing/pull/%s", "PR%s"),
31+
}
32+
33+
# Add any paths that contain templates here, relative to this directory.
34+
templates_path = ["_templates"]
35+
36+
# List of patterns, relative to source directory, that match files and
37+
# directories to ignore when looking for source files.
38+
# This pattern also affects html_static_path and html_extra_path.
39+
exclude_patterns = ["_build", "directory"]
40+
41+
42+
# -- Options for HTML output -------------------------------------------------
43+
44+
# The theme to use for HTML and HTML Help pages. See the documentation for
45+
# a list of builtin themes.
46+
#
47+
html_theme = "sphinx-book-theme"
48+
49+
# Add any paths that contain custom static files (such as style sheets) here,
50+
# relative to this directory. They are copied after the builtin static files,
51+
# so a file named "default.css" will overwrite the builtin "default.css".
52+
# html_static_path = ["_static"]
53+
54+
# -- Options for the intersphinx extension -----------------------------------
55+
56+
intersphinx_mapping = {
57+
"python": ("https://docs.python.org/3/", None),
58+
"sphinx": ("https://www.sphinx-doc.org/en/stable/", None),
59+
}

docs/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sphinx>=4
2+
sphinx-book-theme
3+
ipython

pyproject.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[project]
2+
name = "xarray-array-testing"
3+
requires-python = ">= 3.12"
4+
license = {text = "Apache-2.0"}
5+
dependencies = []
6+
dynamic = ["version"]
7+
8+
[build-system]
9+
requires = ["setuptools>=64.0", "setuptools-scm"]
10+
build-backend = "setuptools.build_meta"
11+
12+
[tool.setuptools]
13+
packages = ["xarray_array_testing"]
14+
15+
[tool.setuptools_scm]
16+
fallback_version = "9999"
17+
18+
[tool.ruff]
19+
builtins = ["ellipsis"]
20+
exclude = [
21+
".git",
22+
".eggs",
23+
"build",
24+
"dist",
25+
"__pycache__",
26+
"docs",
27+
]
28+
target-version = "py312"
29+
30+
extend-include = ["*.ipynb"]
31+
line-length = 100
32+
33+
[tool.ruff.lint]
34+
select = [
35+
# Pyflakes
36+
"F",
37+
# Pycodestyle
38+
"E",
39+
# isort
40+
"I",
41+
# Pyupgrade
42+
"UP",
43+
# tidy imports
44+
"TID",
45+
]
46+
ignore = [
47+
"E402", # E402: module level import not at top of file
48+
"E501", # E501: line too long - let black worry about that
49+
"E731", # E731: do not assign a lambda expression, use a def
50+
]
51+
fixable = ["I"]
52+
extend-safe-fixes = [
53+
"TID252", # absolute imports
54+
]
55+
56+
57+
[tool.ruff.lint.isort]
58+
known-first-party = ["xarray_array_testing"]
59+
known-third-party = []
60+
61+
[tool.ruff.lint.flake8-tidy-imports]
62+
ban-relative-imports = "all"

xarray_array_testing/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from importlib.metadata import version
2+
3+
try:
4+
__version__ = version("xarray_array_testing")
5+
except Exception:
6+
__version__ = "9999"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy