Skip to content
Snippets Groups Projects
Commit 18f891a3 authored by Jenkins for Software Heritage's avatar Jenkins for Software Heritage
Browse files

Update upstream source from tag 'debian/upstream/6.6.3'

Update to upstream version '6.6.3'
with Debian dir 31fdf17d4194de4add0cf4ae2de37d1595575405
parents 29a3d29d c4e85c2a
No related branches found
No related tags found
No related merge requests found
Metadata-Version: 2.1 Metadata-Version: 2.1
Name: swh.model Name: swh.model
Version: 6.6.2 Version: 6.6.3
Summary: Software Heritage data model Summary: Software Heritage data model
Home-page: https://forge.softwareheritage.org/diffusion/DMOD/ Home-page: https://forge.softwareheritage.org/diffusion/DMOD/
Author: Software Heritage developers Author: Software Heritage developers
......
Metadata-Version: 2.1 Metadata-Version: 2.1
Name: swh.model Name: swh.model
Version: 6.6.2 Version: 6.6.3
Summary: Software Heritage data model Summary: Software Heritage data model
Home-page: https://forge.softwareheritage.org/diffusion/DMOD/ Home-page: https://forge.softwareheritage.org/diffusion/DMOD/
Author: Software Heritage developers Author: Software Heritage developers
......
...@@ -18,6 +18,7 @@ pytz ...@@ -18,6 +18,7 @@ pytz
types-python-dateutil types-python-dateutil
types-pytz types-pytz
swh.core>=0.3 swh.core>=0.3
Click
dulwich dulwich
[testing-minimal] [testing-minimal]
......
...@@ -69,7 +69,9 @@ def swhid_of_file_content(data) -> CoreSWHID: ...@@ -69,7 +69,9 @@ def swhid_of_file_content(data) -> CoreSWHID:
return object.swhid() return object.swhid()
def model_of_dir(path: bytes, exclude_patterns: Iterable[bytes] = None) -> Directory: def model_of_dir(
path: bytes, exclude_patterns: Optional[Iterable[bytes]] = None
) -> Directory:
from swh.model.from_disk import accept_all_directories, ignore_directories_patterns from swh.model.from_disk import accept_all_directories, ignore_directories_patterns
dir_filter = ( dir_filter = (
...@@ -81,7 +83,9 @@ def model_of_dir(path: bytes, exclude_patterns: Iterable[bytes] = None) -> Direc ...@@ -81,7 +83,9 @@ def model_of_dir(path: bytes, exclude_patterns: Iterable[bytes] = None) -> Direc
return Directory.from_disk(path=path, dir_filter=dir_filter) return Directory.from_disk(path=path, dir_filter=dir_filter)
def swhid_of_dir(path: bytes, exclude_patterns: Iterable[bytes] = None) -> CoreSWHID: def swhid_of_dir(
path: bytes, exclude_patterns: Optional[Iterable[bytes]] = None
) -> CoreSWHID:
obj = model_of_dir(path, exclude_patterns) obj = model_of_dir(path, exclude_patterns)
return obj.swhid() return obj.swhid()
......
...@@ -59,10 +59,6 @@ Sha1Git = bytes ...@@ -59,10 +59,6 @@ Sha1Git = bytes
Sha1 = bytes Sha1 = bytes
KT = TypeVar("KT")
VT = TypeVar("VT")
def hash_repr(h: bytes) -> str: def hash_repr(h: bytes) -> str:
if h is None: if h is None:
return "None" return "None"
...@@ -71,8 +67,8 @@ def hash_repr(h: bytes) -> str: ...@@ -71,8 +67,8 @@ def hash_repr(h: bytes) -> str:
def freeze_optional_dict( def freeze_optional_dict(
d: Union[None, Dict[KT, VT], ImmutableDict[KT, VT]] # type: ignore d: Union[None, Dict, ImmutableDict]
) -> Optional[ImmutableDict[KT, VT]]: ) -> Optional[ImmutableDict]:
if isinstance(d, dict): if isinstance(d, dict):
return ImmutableDict(d) return ImmutableDict(d)
else: else:
......
[tox] [tox]
requires =
tox>4
envlist=black,flake8,mypy,py3-{minimal,full} envlist=black,flake8,mypy,py3-{minimal,full}
[testenv] [testenv]
...@@ -18,8 +20,8 @@ commands = ...@@ -18,8 +20,8 @@ commands =
skip_install = true skip_install = true
deps = tox deps = tox
commands = commands =
tox -e py3-full -- {posargs} tox run -e py3-full -- {posargs}
tox -e py3-minimal -- {posargs} tox run -e py3-minimal -- {posargs}
[testenv:black] [testenv:black]
skip_install = true skip_install = true
...@@ -41,7 +43,7 @@ commands = ...@@ -41,7 +43,7 @@ commands =
extras = extras =
testing testing
deps = deps =
mypy==0.942 mypy==1.0
commands = commands =
mypy swh mypy swh
...@@ -49,14 +51,13 @@ commands = ...@@ -49,14 +51,13 @@ commands =
# git HEAD of swh-docs, is executed on CI for each diff to prevent # git HEAD of swh-docs, is executed on CI for each diff to prevent
# breaking doc build # breaking doc build
[testenv:sphinx] [testenv:sphinx]
whitelist_externals = make allowlist_externals = make
usedevelop = true usedevelop = true
extras = extras =
testing testing
deps = deps =
# fetch and install swh-docs in develop mode # fetch and install swh-docs in develop mode
-e git+https://forge.softwareheritage.org/source/swh-docs#egg=swh.docs -e git+https://gitlab.softwareheritage.org/swh/devel/swh-docs.git\#egg=swh.docs
setenv = setenv =
SWH_PACKAGE_DOC_TOX_BUILD = 1 SWH_PACKAGE_DOC_TOX_BUILD = 1
# turn warnings into errors # turn warnings into errors
...@@ -64,18 +65,16 @@ setenv = ...@@ -64,18 +65,16 @@ setenv =
commands = commands =
make -I ../.tox/sphinx/src/swh-docs/swh/ -C docs make -I ../.tox/sphinx/src/swh-docs/swh/ -C docs
# build documentation only inside swh-environment using local state # build documentation only inside swh-environment using local state
# of swh-docs package # of swh-docs package
[testenv:sphinx-dev] [testenv:sphinx-dev]
whitelist_externals = make allowlist_externals = make
usedevelop = true usedevelop = true
extras = extras =
testing testing
deps = deps =
# install swh-docs in develop mode # install swh-docs in develop mode
-e ../swh-docs -e ../swh-docs
setenv = setenv =
SWH_PACKAGE_DOC_TOX_BUILD = 1 SWH_PACKAGE_DOC_TOX_BUILD = 1
# turn warnings into errors # turn warnings into errors
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment