-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from adybbroe/switch-to-pyproject-toml
- Loading branch information
Showing
34 changed files
with
883 additions
and
3,647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[bandit] | ||
skips: B506 | ||
exclude: pyorbital/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ jobs: | |
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
password: ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,5 @@ nosetests.xml | |
|
||
# rope | ||
.ropeproject | ||
|
||
pyorbital/version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,42 @@ | ||
exclude: '^$' | ||
fail_fast: false | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.2.3 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: 'v0.7.2' | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-docstrings, flake8-debugger, flake8-bugbear] | ||
- id: ruff | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
exclude: pyorbital/tests/SGP4-VER.TLE | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
args: [--unsafe] | ||
- repo: https://github.com/PyCQA/bandit | ||
rev: '1.7.10' # Update me! | ||
hooks: | ||
- id: bandit | ||
args: [--ini, .bandit] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v1.13.0' # Use the sha / tag you want to point at | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: | ||
- types-docutils | ||
- types-setuptools | ||
- types-PyYAML | ||
- types-requests | ||
- types-pytz | ||
args: ["--python-version", "3.10", "--ignore-missing-imports"] | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
language_version: python3 | ||
ci: | ||
# To trigger manually, comment on a pull request with "pre-commit.ci autofix" | ||
autofix_prs: false | ||
autoupdate_schedule: "monthly" | ||
skip: [bandit] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ dependencies: | |
- pytest | ||
- pytest-cov | ||
- fsspec | ||
- defusedxml | ||
- pip | ||
- pip: | ||
- trollsift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright (c) 2017 | ||
|
||
# Author(s): | ||
|
||
# Martin Raspaud <[email protected]> | ||
# Copyright (c) 2017-2024 Pytroll Community | ||
|
||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -19,14 +15,16 @@ | |
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
"""Package file.""" | ||
|
||
import numpy as np | ||
from .version import get_versions | ||
__version__ = get_versions()['version'] | ||
del get_versions | ||
|
||
from pyorbital.version import __version__ # noqa | ||
|
||
|
||
def dt2np(utc_time): | ||
"""Convert datetime to numpy datetime64 object.""" | ||
try: | ||
return np.datetime64(utc_time) | ||
except ValueError: | ||
return utc_time.astype('datetime64[ns]') | ||
return utc_time.astype("datetime64[ns]") |
Oops, something went wrong.