diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..f1e3f927 --- /dev/null +++ b/.flake8 @@ -0,0 +1,15 @@ +[flake8] +ignore = + # whitespace before ':' - doesn't work well with black + E203 + # module level import not at top of file + E402 + # line too long - let black worry about that + E501 + # do not assign a lambda expression, use a def + E731 + # line break before binary operator + W503 +exclude= + .eggs + doc diff --git a/.git_archival.txt b/.git_archival.txt new file mode 100644 index 00000000..3994ec0a --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,4 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true)$ +ref-names: $Format:%D$ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7773f727..b1439989 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-yaml # isort should run before black as black sometimes tweaks the isort output - repo: https://github.com/PyCQA/isort - rev: 5.11.4 + rev: 5.12.0 hooks: - id: isort # https://github.com/python/black#version-control-integration diff --git a/ci/doc.yml b/ci/doc.yml index 69c9b104..6e1fda6e 100644 --- a/ci/doc.yml +++ b/ci/doc.yml @@ -18,8 +18,8 @@ dependencies: - ipython - h5netcdf - zarr + - xarray - pip: - - git+https://github.com/xarray-contrib/datatree + - -e .. - sphinxext-rediraffe - sphinxext-opengraph - - xarray>=2022.05.0.dev0 diff --git a/pyproject.toml b/pyproject.toml index 209ec8fe..a219b976 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,37 @@ +[project] +name = "xarray-datatree" +description = "Hierarchical tree-like data structures for xarray" +readme = "README.md" +authors = [ + {name = "Thomas Nicholas", email = "thomas.nicholas@columbia.edu"} +] +license = {text = "Apache-2"} +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +requires-python = ">=3.9" +dependencies = [ + "xarray >=2022.6.0", +] +dynamic = ["version"] + +[project.urls] +Home = "https://github.com/xarray-contrib/datatree" +Documentation = "https://xarray-datatree.readthedocs.io/en/stable/" + [build-system] requires = [ - "setuptools>=42", + "setuptools>=61.0.0", "wheel", - "setuptools_scm[toml]>=3.4", - "setuptools_scm_git_archive", + "setuptools_scm[toml]>=7.0", "check-manifest" ] @@ -13,3 +41,20 @@ write_to_template = ''' # Do not change! Do not track in version control! __version__ = "{version}" ''' + +[tool.setuptools.packages.find] +exclude = ["docs", "tests", "tests.*", "docs.*"] + +[tool.setuptools.package-data] +datatree = ["py.typed"] + +[tool.isort] +profile = "black" +skip_gitignore = true +float_to_top = true +default_section = "THIRDPARTY" +known_first_party = "datatree" + +[mypy] +files = "datatree/**/*.py" +show_error_codes = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 4066b2c3..00000000 --- a/setup.cfg +++ /dev/null @@ -1,60 +0,0 @@ -[metadata] -name = xarray-datatree -description = Hierarchical tree-like data structures for xarray -long_description_content_type=text/markdown -long_description = file: README.md -url = https://github.com/xarray-contrib/datatree -author = Thomas Nicholas -author_email = thomas.nicholas@columbia.edu -license = Apache -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Science/Research - Topic :: Scientific/Engineering - License :: OSI Approved :: Apache Software License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - -[options] -packages = find: -package_data={'datatree': 'py.typed'} -python_requires = >=3.9 -install_requires = - xarray >=2022.6.0 - -[options.packages.find] -exclude = - docs - tests - tests.* - docs.* - -[flake8] -ignore = - # whitespace before ':' - doesn't work well with black - E203 - # module level import not at top of file - E402 - # line too long - let black worry about that - E501 - # do not assign a lambda expression, use a def - E731 - # line break before binary operator - W503 -exclude= - .eggs - doc - -[isort] -profile = black -skip_gitignore = true -float_to_top = true -default_section = THIRDPARTY -known_first_party = datatree - -[mypy] -files = datatree/**/*.py -show_error_codes = True