Skip to content

Commit

Permalink
Major rework
Browse files Browse the repository at this point in the history
  • Loading branch information
matrss committed Feb 20, 2024
1 parent 0dd0366 commit f21c4c8
Show file tree
Hide file tree
Showing 21 changed files with 327 additions and 3,153 deletions.
12 changes: 0 additions & 12 deletions .flake8

This file was deleted.

2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: check

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
tox:
Expand All @@ -16,7 +18,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up system
shell: bash
run: |
sudo apt-get update -qq
sudo apt-get install git-annex
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/docbuild.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: docs

on: [push, pull_request]
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
Expand Down
16 changes: 9 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
.pybuild/
.coverage
/.tox
*.egg-info
*.grib
*.py[coe]
.#*
.*.swp
pip-wheel-metadata
docs/build
docs/source/generated
.coverage
.hypothesis
.pybuild/
/.tox
_version.py
build/
dist/
*.grib
docs/build
docs/source/generated
pip-wheel-metadata
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include CONTRIBUTORS LICENSE versioneer.py
include CONTRIBUTORS LICENSE
graft _datalad_buildsupport
graft src/datalad_cds
graft tests
Expand Down
69 changes: 14 additions & 55 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ dependencies = [

[project.optional-dependencies]
devel = [
"black",
"coverage",
"flake8",
"flake8-bugbear",
"isort",
"hypothesis",
"mypy",
"pytest",
"pytest-cov",
"ruff",
"sphinx",
"sphinx_rtd_theme",
]
Expand All @@ -45,72 +43,33 @@ devel = [
repository = "https://github.com/m.risse/datalad-cds"

[project.scripts]
git-annex-remote-cdsrequest = "datalad_cds.cdsrequest:main"
git-annex-remote-cds = "datalad_cds.cds_remote:main"

[project.entry-points."datalad.extensions"]
download-cds = "datalad_cds:command_suite"

[build-system]
requires = ["setuptools >= 43.0.0", "tomli; python_version < '3.11'"]
requires = ["setuptools>=61", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "src/datalad_cds/_version.py"
versionfile_build = "datalad_cds/_version.py"
tag_prefix = "v"
[tool.setuptools_scm]
version_file = "src/datalad_cds/_version.py"

[tool.coverage.report]
show_missing = true
omit = ["src/datalad_cds/_version.py"]

[tool.black]
[tool.ruff]
line-length = 88
extend-exclude = '''
(
^/_datalad_buildsupport
| ^/versioneer.py
| ^/src/datalad_cds/_version.py
)
'''
extend-exclude = ["_datalad_buildsupport"]

[tool.isort]
profile = "black"
skip_gitignore = true
extend_skip = [
"_datalad_buildsupport/",
"versioneer.py",
"src/datalad_cds/_version.py",
]
[tool.ruff.lint]
extend-select = ["I"]

[tool.mypy]
ignore_missing_imports = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
exclude = [
'.tox/',
'build/',
'_datalad_buildsupport/',
'datalad_cds/_version.py',
'versioneer.py',
]

[[tool.mypy.overrides]]
module = [
"setup",
"datalad_cds",
]
disallow_untyped_calls = false

[[tool.mypy.overrides]]
module = [
"datalad_cds._version",
"versioneer",
"_datalad_buildsupport.*",
".tox/",
"_datalad_buildsupport/",
"build/",
"venv/",
]
follow_imports = "skip"

# [tool.flake8]
# flake8 still does not support pyproject.toml, so it's configured in .flake8
3 changes: 0 additions & 3 deletions setup.cfg

This file was deleted.

20 changes: 0 additions & 20 deletions setup.py

This file was deleted.

13 changes: 8 additions & 5 deletions src/datalad_cds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

import logging

from datalad_cds._version import ( # noqa: F401
__version__,
__version_tuple__,
version,
version_tuple,
)

lgr = logging.getLogger("datalad.cds")

# Defines a datalad command suite.
Expand All @@ -16,7 +23,7 @@
# specification of a command, any number of commands can be defined
(
# importable module that contains the command implementation
"datalad_cds.downloadcds",
"datalad_cds.download_cds",
# name of the command class implementation in above module
"DownloadCDS",
# optional name of the command in the cmdline API
Expand All @@ -26,7 +33,3 @@
),
],
)

from . import _version # noqa: E402

__version__ = _version.get_versions()["version"]
Loading

0 comments on commit f21c4c8

Please sign in to comment.