Skip to content

Commit

Permalink
Merge pull request #67 from ocefpaf/update_CIs
Browse files Browse the repository at this point in the history
Update CIs
  • Loading branch information
ocefpaf committed Aug 10, 2023
2 parents 46cede6 + b31dac4 commit e1444f3
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 55 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ repos:
files: requirements-dev.txt

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.4.1
hooks:
- id: mypy
exclude: docs/source/conf.py
Expand All @@ -40,7 +40,7 @@ repos:
args: [--config=pyproject.toml]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.5
hooks:
- id: codespell
exclude: >
Expand All @@ -51,17 +51,17 @@ repos:
- --ignore-words-list=pres

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
rev: v3.0.1
hooks:
- id: add-trailing-comma

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.270
rev: v0.0.284
hooks:
- id: ruff

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.11.2
rev: 0.13.0
hooks:
- id: pyproject-fmt

Expand Down
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion gliderpy/fetchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,4 @@ def get_ids(self):
raise ValueError(f"The {self.e.server} does not supported this operation.")
# TODO: List the platform_deployment variable
# if self.e.server == "https://erddap.ifremer.fr/erddap":
# dataset_id = OceanGlidersGDACTrajectories
# platform_deployment
6 changes: 3 additions & 3 deletions gliderpy/servers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"National Glider Data Assembly Center": "https://gliders.ioos.us/erddap",
"NGDAC": "https://gliders.ioos.us/erddap",
"IOOS": "https://gliders.ioos.us/erddap",
"Ocean Observatories Initiative": "https://erddap.dataexplorer.oceanobservatories.org/erddap/index.html", # noqa
"Ocean Observatories Initiative": "https://erddap.dataexplorer.oceanobservatories.org/erddap/index.html",
"OOI": "https://erddap.dataexplorer.oceanobservatories.org/erddap/index.html",
"Institut français de recherche pour l'exploitation de la mer": "https://www.ifremer.fr/erddap",
"ifremer": "https://www.ifremer.fr/erddap",
Expand Down Expand Up @@ -54,10 +54,10 @@ def server_select(server_string):
"""
Attempts to match the supplied string to a known ERDDAP server by address or alias
"""
if server_string in server_vars.keys():
if server_string in server_vars:
# If string matches exactly, return unchanged
return server_string
for server in server_vars.keys():
for server in server_vars:
# If string contains base ERDDAP address, return base ERDDAP address
if server in server_string:
return server
Expand Down
22 changes: 15 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ write_to = "gliderpy/_version.py"
write_to_template = "__version__ = '{version}'"
tag_regex = "^(?P<prefix>v)?(?P<version>[^\\+]+)(?P<suffix>.*)?$"

[tool.pytest.ini_options]
filterwarnings = [
"error:::gliderpy.*",
"ignore::UserWarning",
"ignore::RuntimeWarning",
]

[tool.ruff]
select = [
"A", # flake8-builtins
Expand All @@ -62,6 +55,13 @@ select = [
"I", # import sorting
"T20", # flake8-print
"UP", # upgrade
"ERA", # flake8-eradicate/eradicate (remove commented out code)
"PIE", # flake8-pie (misc lints)
"SIM", # flake8-simplify (reduce code complexity)
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"N", # pep8-naming
"RUF", # Ruff-specific rules
]
target-version = "py38"
line-length = 79
Expand All @@ -70,6 +70,14 @@ line-length = 79
"docs/source/conf.py" = [
"E402",
"A001",
"ERA001",
]

[tool.pytest.ini_options]
filterwarnings = [
"error:::gliderpy.*",
"ignore::UserWarning",
"ignore::RuntimeWarning",
]

[tool.check-manifest]
Expand Down

0 comments on commit e1444f3

Please sign in to comment.