Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maint/modernize #76

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9299add
MNT: Update enum parsing
Feb 5, 2024
2734e0b
DOC: add version of xarray
Feb 7, 2024
f255474
ENH: Migrate to pyproject.toml
Feb 7, 2024
60e0de0
maint: Make use of ouranos' cookiecutter
Feb 14, 2024
e77865d
Merge remote-tracking branch 'origin/main' into maint/modernize
Apr 12, 2024
616a589
maint: migrate .github from cookiecutter
Apr 15, 2024
c50ba40
maint: Apply code review suggestions
Apr 15, 2024
26ce02a
enh: Add bump-my-version template for CHANGELOG
Apr 15, 2024
45a4476
fix: lint issues
May 3, 2024
286ac06
fix: remove tox 38
May 7, 2024
131fcb6
maint: Remove bump templating of CHANGELOG
May 13, 2024
9457db2
maint: Create releasing.rst
May 13, 2024
365223b
update authors and maintainers
Zeitsperre May 13, 2024
5d2c9ab
Merge branch 'maint/modernize' of https://github.com/xarray-contrib/x…
May 14, 2024
9e066b7
enh: Upgrade via latest cookicutter template
May 14, 2024
5c42528
fix: lint
May 14, 2024
328c28a
fix: Makefile
May 14, 2024
8579ce3
maint: migrate from black to ruff format
May 14, 2024
1aa5188
fast-forward cookiecutter
Zeitsperre May 21, 2024
51ffa68
last adjustments
Zeitsperre May 21, 2024
401dd1f
add CODE_OF_CONDUCT.md
Zeitsperre Jul 5, 2024
71e83c9
fast-forward cookiecutter template
Zeitsperre Jul 5, 2024
ded5681
disable pre-commit ci for now
Zeitsperre Jul 5, 2024
ef1ead4
do not run pyupgrade yet
Zeitsperre Jul 5, 2024
585e6e1
run safe fixes, set ignored ruff violations
Zeitsperre Jul 5, 2024
cef99b0
fix coverage configuration
Zeitsperre Jul 5, 2024
f21df8e
fix coveralls reporting
Zeitsperre Jul 5, 2024
445b7e8
re-enable pre-commit ci
Zeitsperre Jul 5, 2024
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
5 changes: 0 additions & 5 deletions .coveragerc

This file was deleted.

29 changes: 29 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"template": "https://github.com/Ouranosinc/cookiecutter-pypackage.git",
"commit": "f391bbd6ee14ab2478c64a1f78b74bd9903cae81",
"checkout": null,
"context": {
"cookiecutter": {
"full_name": "Abel Aoun",
"email": "[email protected]",
"github_username": "bzah",
"project_name": "xncml",
"project_slug": "xncml",
"project_short_description": "Tools for manipulating NcML (NetCDF Markup Language) files with/for xarray",
"pypi_username": "bzah",
"version": "0.5.0",
"use_pytest": "y",
"use_black": "n",
"use_conda": "n",
"add_pyup_badge": "n",
"make_docs": "y",
"add_translations": "n",
"command_line_interface": "No command-line interface",
"create_author_file": "y",
"open_source_license": "Apache Software License 2.0",
"generated_with_cruft": "y",
"_template": "https://github.com/Ouranosinc/cookiecutter-pypackage.git"
}
},
"directory": null
}
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.{yaml,yml}]
indent_size = 2

[*.bat]
indent_style = tab
end_of_line = crlf

[LICENSE]
insert_final_newline = false

[Makefile]
indent_style = tab
30 changes: 30 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[flake8]
exclude =
.eggs,
.git,
build,
docs,
tests
ignore =
AZ100,
AZ200,
AZ300,
C,
D,
E,
F,
W503
per-file-ignores =
rst-roles =
doc,
mod,
py:attr,
py:attribute,
py:class,
py:const,
py:data,
py:func,
py:meth,
py:mod,
py:obj,
py:ref
1 change: 0 additions & 1 deletion .git_archival.txt

This file was deleted.

55 changes: 38 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ default_language_version:
python: python3

repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand All @@ -11,25 +10,47 @@ repos:
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: check-toml
- id: double-quote-string-fixer

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.3.0
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: black
args: ["--line-length", "100", "--skip-string-normalization"]

- repo: https://github.com/PyCQA/flake8
- id: toml-sort-fix
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
- id: rst-inline-touching-normal
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.7
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.7
hooks:
- id: ruff
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
- id: flake8
additional_dependencies: [ 'flake8-alphabetize', 'flake8-rst-docstrings' ]
args: [ '--config=.flake8' ]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: seed-isort-config

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
- id: yamllint
args: [ '--config-file=.yamllint.yaml' ]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.2
hooks:
- id: check-github-workflows
- id: check-readthedocs
- repo: meta
hooks:
- id: isort
- id: check-hooks-apply
- id: check-useless-excludes
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build:

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
configuration: docs/conf.py

# Optionally set the version of Python and requirements required to build your docs
conda:
Expand Down
8 changes: 8 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---

rules:
document-start: disable
line-length:
max: 120
level: warning
truthy: disable
17 changes: 17 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
=======
Credits
=======

Development Lead
----------------

* Anderson Banihirwe <[email protected]> `@andersy005 <https://github.com/andersy005>`_
* David Huard <[email protected]> `@huard <https://github.com/huard>`_

Contributors
-------------

* Trevor James Smith `@Zeitsperre <https://github.com/Zeitsperre>`_
* Pascal Bourgault <[email protected]> `@Zeitsperre <https://github.com/Zeitsperre>`_
* Francis Charette-Migneault <[email protected]> `@fmigneault <https://github.com/fmigneault>`_
* Abel Aoun <[email protected]> `@bzah <https://github.com/bzah>`_
18 changes: 10 additions & 8 deletions CHANGELOG.md → CHANGELOG.rst
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Changelog
=========

0.5.0 (unreleased)
==================
------------------

- Added support for running `pytest` with `pytest-cov`. By @Zeitsperre
- Reworked the GitHub CI testing workflow to perform version checks as well as tests with `pytest-cov` . By @Zeitsperre
Expand All @@ -12,23 +15,22 @@ Breaking changes
- [fix] scalar attributes that are not strings are no longer wrapped in tuples of length 1.

0.4.0 (2024-01-08)
==================
------------------

- Add support for <EnumTypeDef>. By @bzah
- Update XSD schema and dataclasses to latest version from netcdf-java to add support
for unsigned types. By @bzah
- Update XSD schema and dataclasses to latest version from netcdf-java to add support for unsigned types. By @bzah
- Add support for scalar variables. By @Bzah
- [fix] empty attributes are now parsed into an empty string instead of crashing the parser. By @Bzah

0.3.1 (2023-11-10)
==================
------------------

- Add support for Python 3.12
- Drop support for Python 3.8


0.3 (2023-08-28)
================
----------------

- Add `add_aggregation` and `add_variable_agg` to `Dataset` class. By @huard
- Add `add_scan` to `Dataset` class. By @huard
Expand All @@ -37,7 +39,7 @@ Breaking changes


0.2 (2023-02-23)
================
----------------

- Implement `Dataset.rename_dataset_attribute`. By @huard
- Allow empty `Dataset` creation. By @huard
Expand All @@ -46,7 +48,7 @@ Breaking changes


0.1 Initial release (2022-11-24)
================================
--------------------------------

- Manipulate NcML file: add & remove attributes, variables and dimensions. By @andersy005
- Implement `open_ncml`, which returns an `xarray.Dataset` built from an NcML. Note that
Expand Down
Loading
Loading