swh.loader.mercurial 3.4.0__tar.gz → 3.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. swh.loader.mercurial-3.5.0/.copier-answers.yml +11 -0
  2. swh.loader.mercurial-3.5.0/.gitignore +16 -0
  3. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/.pre-commit-config.yaml +15 -11
  4. swh.loader.mercurial-3.5.0/PKG-INFO +87 -0
  5. swh.loader.mercurial-3.5.0/README.rst +40 -0
  6. swh.loader.mercurial-3.5.0/docs/Makefile +1 -0
  7. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/docs/index.rst +1 -5
  8. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/mypy.ini +3 -4
  9. swh.loader.mercurial-3.5.0/pyproject.toml +60 -0
  10. swh.loader.mercurial-3.5.0/pytest.ini +8 -0
  11. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/requirements.txt +0 -1
  12. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/test_directory.py +1 -1
  13. swh.loader.mercurial-3.5.0/swh.loader.mercurial.egg-info/PKG-INFO +87 -0
  14. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh.loader.mercurial.egg-info/SOURCES.txt +2 -5
  15. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh.loader.mercurial.egg-info/requires.txt +9 -1
  16. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/tox.ini +18 -27
  17. swh.loader.mercurial-3.4.0/.gitignore +0 -13
  18. swh.loader.mercurial-3.4.0/MANIFEST.in +0 -6
  19. swh.loader.mercurial-3.4.0/PKG-INFO +0 -56
  20. swh.loader.mercurial-3.4.0/README.md +0 -34
  21. swh.loader.mercurial-3.4.0/docs/Makefile +0 -1
  22. swh.loader.mercurial-3.4.0/pyproject.toml +0 -11
  23. swh.loader.mercurial-3.4.0/pytest.ini +0 -7
  24. swh.loader.mercurial-3.4.0/setup.py +0 -74
  25. swh.loader.mercurial-3.4.0/swh/__init__.py +0 -3
  26. swh.loader.mercurial-3.4.0/swh/loader/__init__.py +0 -3
  27. swh.loader.mercurial-3.4.0/swh.loader.mercurial.egg-info/PKG-INFO +0 -56
  28. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/.git-blame-ignore-revs +0 -0
  29. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/AUTHORS +0 -0
  30. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/CODE_OF_CONDUCT.md +0 -0
  31. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/CONTRIBUTORS +0 -0
  32. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/LICENSE +0 -0
  33. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/Makefile +0 -0
  34. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/conftest.py +0 -0
  35. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/docs/.gitignore +0 -0
  36. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/docs/_static/.placeholder +0 -0
  37. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/docs/_templates/.placeholder +0 -0
  38. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/docs/conf.py +0 -0
  39. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/requirements-swh.txt +0 -0
  40. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/requirements-test.txt +0 -0
  41. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/setup.cfg +0 -0
  42. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/__init__.py +0 -0
  43. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/archive_extract.py +0 -0
  44. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/converters.py +0 -0
  45. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/directory.py +0 -0
  46. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/hgutil.py +0 -0
  47. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/identify.py +0 -0
  48. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/loader.py +0 -0
  49. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/py.typed +0 -0
  50. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tasks.py +0 -0
  51. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/__init__.py +0 -0
  52. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/conftest.py +0 -0
  53. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/anomad-d.tgz +0 -0
  54. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/build.py +0 -0
  55. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/example.json +0 -0
  56. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/example.sh +0 -0
  57. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/example.tgz +0 -0
  58. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/hello.json +0 -0
  59. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/hello.tgz +0 -0
  60. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/missing-filelog.sh +0 -0
  61. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/missing-filelog.tgz +0 -0
  62. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/multiple-heads.json +0 -0
  63. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/multiple-heads.sh +0 -0
  64. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/multiple-heads.tgz +0 -0
  65. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/the-sandbox.json +0 -0
  66. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/the-sandbox.tgz +0 -0
  67. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/transplant.json +0 -0
  68. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/data/transplant.tgz +0 -0
  69. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/loader_checker.py +0 -0
  70. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/test_converters.py +0 -0
  71. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/test_identify.py +0 -0
  72. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/test_loader.py +0 -0
  73. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/test_tasks.py +0 -0
  74. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/tests/test_tasks_directory.py +0 -0
  75. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh/loader/mercurial/utils.py +0 -0
  76. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh.loader.mercurial.egg-info/dependency_links.txt +0 -0
  77. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh.loader.mercurial.egg-info/entry_points.txt +0 -0
  78. {swh.loader.mercurial-3.4.0 → swh.loader.mercurial-3.5.0}/swh.loader.mercurial.egg-info/top_level.txt +0 -0
@@ -0,0 +1,11 @@
1
+ # Changes here will be overwritten by Copier
2
+ _commit: v0.1.6
3
+ _src_path: https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git
4
+ description: Software Heritage Mercurial Loader
5
+ distribution_name: swh-loader-mercurial
6
+ have_cli: false
7
+ have_workers: true
8
+ package_root: swh/loader/mercurial
9
+ project_name: swh.loader.mercurial
10
+ python_minimal_version: '3.7'
11
+ readme_format: rst
@@ -0,0 +1,16 @@
1
+ *.egg-info/
2
+ *.pyc
3
+ .coverage
4
+ .eggs/
5
+ .hypothesis
6
+ .mypy_cache
7
+ .tox
8
+ __pycache__
9
+ build/
10
+ dist/
11
+ # these are symlinks created by a hook in swh-docs' main sphinx conf.py
12
+ docs/README.rst
13
+ docs/README.md
14
+ # this should be a symlink for people who want to build the sphinx doc
15
+ # without using tox, generally created by the swh-env/bin/update script
16
+ docs/Makefile.sphinx
@@ -1,13 +1,23 @@
1
1
  repos:
2
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.3.0
3
+ rev: v4.4.0
4
4
  hooks:
5
5
  - id: trailing-whitespace
6
6
  - id: check-json
7
7
  - id: check-yaml
8
8
 
9
+ - repo: https://github.com/python/black
10
+ rev: 23.1.0
11
+ hooks:
12
+ - id: black
13
+
14
+ - repo: https://github.com/PyCQA/isort
15
+ rev: 5.12.0
16
+ hooks:
17
+ - id: isort
18
+
9
19
  - repo: https://github.com/pycqa/flake8
10
- rev: 5.0.4
20
+ rev: 6.0.0
11
21
  hooks:
12
22
  - id: flake8
13
23
  additional_dependencies: [flake8-bugbear==22.9.23]
@@ -18,6 +28,9 @@ repos:
18
28
  - id: codespell
19
29
  name: Check source code spelling
20
30
  stages: [commit]
31
+ - id: codespell
32
+ name: Check commit message spelling
33
+ stages: [commit-msg]
21
34
 
22
35
  - repo: local
23
36
  hooks:
@@ -29,12 +42,3 @@ repos:
29
42
  language: system
30
43
  types: [python]
31
44
 
32
- - repo: https://github.com/PyCQA/isort
33
- rev: 5.11.5
34
- hooks:
35
- - id: isort
36
-
37
- - repo: https://github.com/python/black
38
- rev: 22.10.0
39
- hooks:
40
- - id: black
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.1
2
+ Name: swh.loader.mercurial
3
+ Version: 3.5.0
4
+ Summary: Software Heritage Mercurial Loader
5
+ Author-email: Software Heritage developers <swh-devel@inria.fr>
6
+ Project-URL: Homepage, https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial
7
+ Project-URL: Bug Reports, https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial/-/issues
8
+ Project-URL: Funding, https://www.softwareheritage.org/donate
9
+ Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-loader-mercurial/
10
+ Project-URL: Source, https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial.git
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Development Status :: 4 - Beta
16
+ Requires-Python: >=3.7
17
+ Description-Content-Type: text/x-rst
18
+ License-File: LICENSE
19
+ License-File: AUTHORS
20
+ Requires-Dist: click
21
+ Requires-Dist: patool
22
+ Requires-Dist: python-dateutil
23
+ Requires-Dist: python-hglib
24
+ Requires-Dist: mercurial
25
+ Requires-Dist: swh.model>=2.6.1
26
+ Requires-Dist: swh.storage>=0.37.0
27
+ Requires-Dist: swh.scheduler>=0.0.39
28
+ Requires-Dist: swh.loader.core>=5.0.0
29
+ Provides-Extra: testing
30
+ Requires-Dist: click; extra == "testing"
31
+ Requires-Dist: patool; extra == "testing"
32
+ Requires-Dist: python-dateutil; extra == "testing"
33
+ Requires-Dist: python-hglib; extra == "testing"
34
+ Requires-Dist: mercurial; extra == "testing"
35
+ Requires-Dist: swh.model>=2.6.1; extra == "testing"
36
+ Requires-Dist: swh.storage>=0.37.0; extra == "testing"
37
+ Requires-Dist: swh.scheduler>=0.0.39; extra == "testing"
38
+ Requires-Dist: swh.loader.core>=5.0.0; extra == "testing"
39
+ Requires-Dist: pytest; extra == "testing"
40
+ Requires-Dist: pytest-mock; extra == "testing"
41
+ Requires-Dist: swh.core[http]>=0.0.61; extra == "testing"
42
+ Requires-Dist: swh.scheduler[testing]>=0.5.0; extra == "testing"
43
+ Requires-Dist: swh.storage[testing]; extra == "testing"
44
+ Requires-Dist: types-click; extra == "testing"
45
+ Requires-Dist: types-deprecated; extra == "testing"
46
+ Requires-Dist: types-python-dateutil; extra == "testing"
47
+
48
+ swh-loader-mercurial
49
+ ====================
50
+
51
+ The Software Heritage Mercurial Loader is a tool and a library to walk a local
52
+ mercurial repository and inject into the SWH dataset all contained files that
53
+ weren't known before.
54
+
55
+ The main entry points are:
56
+
57
+ - ``swh.loader.mercurial.loader.HgLoader`` which reads and loads a local
58
+ repository into an SWH archive.
59
+
60
+ - ``swh.loader.mercurial.loader.HgArchiveLoader`` which reads and loads
61
+ a local repository wrapped within a tarball
62
+
63
+ - ``swh.loader.mercurial.directory.HgCheckoutLoader`` which ingests the hg
64
+ tree at a specific changeset or tag.
65
+
66
+ CLI run
67
+ -------
68
+
69
+ Configuration file
70
+ ++++++++++++++++++
71
+
72
+ /tmp/mercurial.yml:
73
+
74
+ .. code-block:: yaml
75
+
76
+ storage:
77
+ cls: remote
78
+ args:
79
+ url: http://localhost:5002/
80
+
81
+
82
+ Basic use
83
+ +++++++++
84
+
85
+ .. code-block:: shell
86
+
87
+ swh loader --C /tmp/mercurial.yml run mercurial https://www.mercurial-scm.org/repo/hello
@@ -0,0 +1,40 @@
1
+ swh-loader-mercurial
2
+ ====================
3
+
4
+ The Software Heritage Mercurial Loader is a tool and a library to walk a local
5
+ mercurial repository and inject into the SWH dataset all contained files that
6
+ weren't known before.
7
+
8
+ The main entry points are:
9
+
10
+ - ``swh.loader.mercurial.loader.HgLoader`` which reads and loads a local
11
+ repository into an SWH archive.
12
+
13
+ - ``swh.loader.mercurial.loader.HgArchiveLoader`` which reads and loads
14
+ a local repository wrapped within a tarball
15
+
16
+ - ``swh.loader.mercurial.directory.HgCheckoutLoader`` which ingests the hg
17
+ tree at a specific changeset or tag.
18
+
19
+ CLI run
20
+ -------
21
+
22
+ Configuration file
23
+ ++++++++++++++++++
24
+
25
+ /tmp/mercurial.yml:
26
+
27
+ .. code-block:: yaml
28
+
29
+ storage:
30
+ cls: remote
31
+ args:
32
+ url: http://localhost:5002/
33
+
34
+
35
+ Basic use
36
+ +++++++++
37
+
38
+ .. code-block:: shell
39
+
40
+ swh loader --C /tmp/mercurial.yml run mercurial https://www.mercurial-scm.org/repo/hello
@@ -0,0 +1 @@
1
+ include Makefile.sphinx
@@ -1,10 +1,6 @@
1
1
  .. _swh-loader-mercurial:
2
2
 
3
- Software Heritage - Mercurial loader
4
- ====================================
5
-
6
- Loader for `Mercurial <https://www.mercurial-scm.org/>`_ repositories.
7
-
3
+ .. include:: README.rst
8
4
 
9
5
  Reference Documentation
10
6
  -----------------------
@@ -1,13 +1,12 @@
1
1
  [mypy]
2
2
  namespace_packages = True
3
3
  warn_unused_ignores = True
4
-
4
+ explicit_package_bases = True
5
+ # ^ Needed for mypy to detect py.typed from swh packages installed
6
+ # in editable mode
5
7
 
6
8
  # 3rd party libraries without stubs (yet)
7
9
 
8
- [mypy-billiard.*]
9
- ignore_missing_imports = True
10
-
11
10
  [mypy-celery.*]
12
11
  ignore_missing_imports = True
13
12
 
@@ -0,0 +1,60 @@
1
+ [project]
2
+ name = "swh.loader.mercurial"
3
+ authors = [
4
+ {name="Software Heritage developers", email="swh-devel@inria.fr"},
5
+ ]
6
+
7
+ description = "Software Heritage Mercurial Loader"
8
+ readme = {file = "README.rst", content-type = "text/x-rst"}
9
+ requires-python = ">=3.7"
10
+ classifiers = [
11
+ "Programming Language :: Python :: 3",
12
+ "Intended Audience :: Developers",
13
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
14
+ "Operating System :: OS Independent",
15
+ "Development Status :: 4 - Beta",
16
+ ]
17
+ dynamic = ["version", "dependencies", "optional-dependencies"]
18
+
19
+ [tool.setuptools.packages.find]
20
+ include = ["swh.*"]
21
+
22
+ [tool.setuptools.dynamic]
23
+ dependencies = {file = ["requirements.txt", "requirements-swh.txt"]}
24
+
25
+ [tool.setuptools.dynamic.optional-dependencies]
26
+ testing = {file = ["requirements.txt", "requirements-swh.txt", "requirements-test.txt"]}
27
+
28
+ [project.entry-points."console_scripts"]
29
+ "swh-hg-identify" = "swh.loader.mercurial.identify:main"
30
+
31
+ [project.entry-points."swh.workers"]
32
+ "loader.mercurial" = "swh.loader.mercurial:register"
33
+ "loader.mercurial-checkout" = "swh.loader.mercurial:register_checkout"
34
+
35
+ [project.urls]
36
+ "Homepage" = "https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial"
37
+ "Bug Reports" = "https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial/-/issues"
38
+ "Funding" = "https://www.softwareheritage.org/donate"
39
+ "Documentation" = "https://docs.softwareheritage.org/devel/swh-loader-mercurial/"
40
+ "Source" = "https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial.git"
41
+
42
+ [build-system]
43
+ requires = ["setuptools", "setuptools-scm"]
44
+ build-backend = "setuptools.build_meta"
45
+
46
+ [tool.setuptools_scm]
47
+ fallback_version = "0.0.1"
48
+
49
+ [tool.black]
50
+ target-version = ['py37']
51
+
52
+ [tool.isort]
53
+ multi_line_output = 3
54
+ include_trailing_comma = true
55
+ force_grid_wrap = 0
56
+ use_parentheses = true
57
+ ensure_newline_before_comments = true
58
+ line_length = 88
59
+ force_sort_within_sections = true
60
+ known_first_party = ['swh']
@@ -0,0 +1,8 @@
1
+ [pytest]
2
+ norecursedirs = build docs .*
3
+ asyncio_mode = strict
4
+ addopts =
5
+ --import-mode=importlib
6
+ # Drop this when these fixtures aren't imported automatically anymore
7
+ -p no:pytest_swh_scheduler
8
+ -p no:pytest_swh_storage
@@ -1,7 +1,6 @@
1
1
  # Add here external Python modules dependencies, one per line. Module names
2
2
  # should match https://pypi.python.org/pypi names. For the full spec or
3
3
  # dependency lines, see https://pip.readthedocs.org/en/1.1/requirements.html
4
- billiard<4 # billiard 4 is not yet supported by Celery
5
4
  click
6
5
  patool
7
6
  python-dateutil
@@ -28,7 +28,7 @@ def compute_nar_hash_for_ref(
28
28
  tmp_path = Path(os.path.join(temp_dir, "compute-nar"))
29
29
  tmp_path.mkdir(exist_ok=True)
30
30
  repo = clone_repository(repo_url, ref, tmp_path)
31
- nar = Nar(hash_names=[hash_name], exclude_vcs=True)
31
+ nar = Nar(hash_names=[hash_name], exclude_vcs=True, vcs_type="hg")
32
32
  nar.serialize(repo)
33
33
  return nar.hexdigest()[hash_name]
34
34
 
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.1
2
+ Name: swh.loader.mercurial
3
+ Version: 3.5.0
4
+ Summary: Software Heritage Mercurial Loader
5
+ Author-email: Software Heritage developers <swh-devel@inria.fr>
6
+ Project-URL: Homepage, https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial
7
+ Project-URL: Bug Reports, https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial/-/issues
8
+ Project-URL: Funding, https://www.softwareheritage.org/donate
9
+ Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-loader-mercurial/
10
+ Project-URL: Source, https://gitlab.softwareheritage.org/swh/devel/swh-loader-mercurial.git
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Development Status :: 4 - Beta
16
+ Requires-Python: >=3.7
17
+ Description-Content-Type: text/x-rst
18
+ License-File: LICENSE
19
+ License-File: AUTHORS
20
+ Requires-Dist: click
21
+ Requires-Dist: patool
22
+ Requires-Dist: python-dateutil
23
+ Requires-Dist: python-hglib
24
+ Requires-Dist: mercurial
25
+ Requires-Dist: swh.model>=2.6.1
26
+ Requires-Dist: swh.storage>=0.37.0
27
+ Requires-Dist: swh.scheduler>=0.0.39
28
+ Requires-Dist: swh.loader.core>=5.0.0
29
+ Provides-Extra: testing
30
+ Requires-Dist: click; extra == "testing"
31
+ Requires-Dist: patool; extra == "testing"
32
+ Requires-Dist: python-dateutil; extra == "testing"
33
+ Requires-Dist: python-hglib; extra == "testing"
34
+ Requires-Dist: mercurial; extra == "testing"
35
+ Requires-Dist: swh.model>=2.6.1; extra == "testing"
36
+ Requires-Dist: swh.storage>=0.37.0; extra == "testing"
37
+ Requires-Dist: swh.scheduler>=0.0.39; extra == "testing"
38
+ Requires-Dist: swh.loader.core>=5.0.0; extra == "testing"
39
+ Requires-Dist: pytest; extra == "testing"
40
+ Requires-Dist: pytest-mock; extra == "testing"
41
+ Requires-Dist: swh.core[http]>=0.0.61; extra == "testing"
42
+ Requires-Dist: swh.scheduler[testing]>=0.5.0; extra == "testing"
43
+ Requires-Dist: swh.storage[testing]; extra == "testing"
44
+ Requires-Dist: types-click; extra == "testing"
45
+ Requires-Dist: types-deprecated; extra == "testing"
46
+ Requires-Dist: types-python-dateutil; extra == "testing"
47
+
48
+ swh-loader-mercurial
49
+ ====================
50
+
51
+ The Software Heritage Mercurial Loader is a tool and a library to walk a local
52
+ mercurial repository and inject into the SWH dataset all contained files that
53
+ weren't known before.
54
+
55
+ The main entry points are:
56
+
57
+ - ``swh.loader.mercurial.loader.HgLoader`` which reads and loads a local
58
+ repository into an SWH archive.
59
+
60
+ - ``swh.loader.mercurial.loader.HgArchiveLoader`` which reads and loads
61
+ a local repository wrapped within a tarball
62
+
63
+ - ``swh.loader.mercurial.directory.HgCheckoutLoader`` which ingests the hg
64
+ tree at a specific changeset or tag.
65
+
66
+ CLI run
67
+ -------
68
+
69
+ Configuration file
70
+ ++++++++++++++++++
71
+
72
+ /tmp/mercurial.yml:
73
+
74
+ .. code-block:: yaml
75
+
76
+ storage:
77
+ cls: remote
78
+ args:
79
+ url: http://localhost:5002/
80
+
81
+
82
+ Basic use
83
+ +++++++++
84
+
85
+ .. code-block:: shell
86
+
87
+ swh loader --C /tmp/mercurial.yml run mercurial https://www.mercurial-scm.org/repo/hello
@@ -1,3 +1,4 @@
1
+ .copier-answers.yml
1
2
  .git-blame-ignore-revs
2
3
  .gitignore
3
4
  .pre-commit-config.yaml
@@ -5,9 +6,8 @@ AUTHORS
5
6
  CODE_OF_CONDUCT.md
6
7
  CONTRIBUTORS
7
8
  LICENSE
8
- MANIFEST.in
9
9
  Makefile
10
- README.md
10
+ README.rst
11
11
  conftest.py
12
12
  mypy.ini
13
13
  pyproject.toml
@@ -16,7 +16,6 @@ requirements-swh.txt
16
16
  requirements-test.txt
17
17
  requirements.txt
18
18
  setup.cfg
19
- setup.py
20
19
  tox.ini
21
20
  docs/.gitignore
22
21
  docs/Makefile
@@ -24,14 +23,12 @@ docs/conf.py
24
23
  docs/index.rst
25
24
  docs/_static/.placeholder
26
25
  docs/_templates/.placeholder
27
- swh/__init__.py
28
26
  swh.loader.mercurial.egg-info/PKG-INFO
29
27
  swh.loader.mercurial.egg-info/SOURCES.txt
30
28
  swh.loader.mercurial.egg-info/dependency_links.txt
31
29
  swh.loader.mercurial.egg-info/entry_points.txt
32
30
  swh.loader.mercurial.egg-info/requires.txt
33
31
  swh.loader.mercurial.egg-info/top_level.txt
34
- swh/loader/__init__.py
35
32
  swh/loader/mercurial/__init__.py
36
33
  swh/loader/mercurial/archive_extract.py
37
34
  swh/loader/mercurial/converters.py
@@ -1,4 +1,3 @@
1
- billiard<4
2
1
  click
3
2
  patool
4
3
  python-dateutil
@@ -10,6 +9,15 @@ swh.scheduler>=0.0.39
10
9
  swh.loader.core>=5.0.0
11
10
 
12
11
  [testing]
12
+ click
13
+ patool
14
+ python-dateutil
15
+ python-hglib
16
+ mercurial
17
+ swh.model>=2.6.1
18
+ swh.storage>=0.37.0
19
+ swh.scheduler>=0.0.39
20
+ swh.loader.core>=5.0.0
13
21
  pytest
14
22
  pytest-mock
15
23
  swh.core[http]>=0.0.61
@@ -1,7 +1,10 @@
1
1
  [tox]
2
- requires =
3
- tox>4
4
- envlist=black,flake8,mypy,py3
2
+ minversion = 4
3
+ envlist =
4
+ black
5
+ flake8
6
+ mypy
7
+ py3
5
8
 
6
9
  [testenv]
7
10
  extras =
@@ -11,14 +14,20 @@ deps =
11
14
  swh.scheduler[testing]
12
15
  swh.storage[testing]
13
16
  commands =
14
- pytest --cov={envsitepackagesdir}/swh/loader/mercurial \
17
+ pytest --doctest-modules \
18
+ --rootdir {envsitepackagesdir} \
19
+ --cov={envsitepackagesdir}/swh/loader/mercurial \
20
+ --cov-branch \
15
21
  {envsitepackagesdir}/swh/loader/mercurial \
16
- --cov-branch {posargs}
22
+ {posargs}
23
+ # --rootdir (with --import-mode from pytest.ini) are required to make tests
24
+ # that depends on the test file to be a proper submodule of the swh namespace
25
+ # after migration to PEP420 (implicit namespace).
17
26
 
18
27
  [testenv:black]
19
28
  skip_install = true
20
29
  deps =
21
- black==22.10.0
30
+ black==23.1.0
22
31
  commands =
23
32
  {envpython} -m black --check swh
24
33
 
@@ -44,32 +53,14 @@ commands =
44
53
  # breaking doc build
45
54
  [testenv:sphinx]
46
55
  allowlist_externals = make
47
- usedevelop = true
48
56
  extras =
49
57
  testing
50
58
  deps =
51
- # fetch and install swh-docs in develop mode
52
- -e git+https://gitlab.softwareheritage.org/swh/devel/swh-docs.git\#egg=swh.docs
59
+ # fetch and install swh-docs
60
+ git+https://gitlab.softwareheritage.org/swh/devel/swh-docs.git\#egg=swh.docs
53
61
  setenv =
54
62
  SWH_PACKAGE_DOC_TOX_BUILD = 1
55
63
  # turn warnings into errors
56
64
  SPHINXOPTS = -W
57
65
  commands =
58
- make -I ../.tox/sphinx/src/swh-docs/swh/ -C docs
59
-
60
- # build documentation only inside swh-environment using local state
61
- # of swh-docs package
62
- [testenv:sphinx-dev]
63
- allowlist_externals = make
64
- usedevelop = true
65
- extras =
66
- testing
67
- deps =
68
- # install swh-docs in develop mode
69
- -e ../swh-docs
70
- setenv =
71
- SWH_PACKAGE_DOC_TOX_BUILD = 1
72
- # turn warnings into errors
73
- SPHINXOPTS = -W
74
- commands =
75
- make -I ../.tox/sphinx-dev/src/swh-docs/swh/ -C docs
66
+ make -I {env_dir}/share/swh-docs -C docs
@@ -1,13 +0,0 @@
1
- *.pyc
2
- *.sw?
3
- *~
4
- /.coverage
5
- /.coverage.*
6
- .eggs/
7
- __pycache__
8
- *.egg-info/
9
- version.txt
10
- build/
11
- dist/
12
- .tox/
13
- .mypy_cache/
@@ -1,6 +0,0 @@
1
- include Makefile
2
- include requirements*.txt
3
- include version.txt
4
- include conftest.py
5
- recursive-include swh/loader/mercurial/tests/data *
6
- recursive-include swh py.typed
@@ -1,56 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: swh.loader.mercurial
3
- Version: 3.4.0
4
- Summary: Software Heritage Mercurial Loader
5
- Home-page: https://forge.softwareheritage.org/diffusion/DLDHG/
6
- Author: Software Heritage developers
7
- Author-email: swh-devel@inria.fr
8
- Project-URL: Bug Reports, https://forge.softwareheritage.org/maniphest
9
- Project-URL: Funding, https://www.softwareheritage.org/donate
10
- Project-URL: Source, https://forge.softwareheritage.org/source/swh-loader-mercurial
11
- Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-loader-mercurial/
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Development Status :: 4 - Beta
17
- Requires-Python: >=3.7
18
- Description-Content-Type: text/markdown
19
- Provides-Extra: testing
20
- License-File: LICENSE
21
- License-File: AUTHORS
22
-
23
- swh-loader-mercurial
24
- =========================
25
-
26
- The Software Heritage Mercurial Loader is a tool and a library to walk a local mercurial
27
- repository and inject into the SWH dataset all contained files that weren't known
28
- before.
29
-
30
- The main entry points are:
31
- - :class:`swh.loader.mercurial.loader.HgLoader` which reads and loads a local
32
- repository into an SWH archive.
33
-
34
- - :class:`swh.loader.mercurial.loader.HgArchiveLoader` which reads and loads
35
- a local repository wrapped within a tarball
36
-
37
- - :class:`swh.loader.mercurial.directory.HgCheckoutLoader` which ingests the hg tree at
38
- a specific changeset or tag.
39
-
40
- # CLI run
41
-
42
- ## Configuration file
43
-
44
- /tmp/mercurial.yml:
45
- ``` YAML
46
- storage:
47
- cls: remote
48
- args:
49
- url: http://localhost:5002/
50
- ```
51
-
52
- ## Basic use
53
-
54
- ``` bash
55
- swh loader --C /tmp/mercurial.yml run mercurial https://www.mercurial-scm.org/repo/hello
56
- ```
@@ -1,34 +0,0 @@
1
- swh-loader-mercurial
2
- =========================
3
-
4
- The Software Heritage Mercurial Loader is a tool and a library to walk a local mercurial
5
- repository and inject into the SWH dataset all contained files that weren't known
6
- before.
7
-
8
- The main entry points are:
9
- - :class:`swh.loader.mercurial.loader.HgLoader` which reads and loads a local
10
- repository into an SWH archive.
11
-
12
- - :class:`swh.loader.mercurial.loader.HgArchiveLoader` which reads and loads
13
- a local repository wrapped within a tarball
14
-
15
- - :class:`swh.loader.mercurial.directory.HgCheckoutLoader` which ingests the hg tree at
16
- a specific changeset or tag.
17
-
18
- # CLI run
19
-
20
- ## Configuration file
21
-
22
- /tmp/mercurial.yml:
23
- ``` YAML
24
- storage:
25
- cls: remote
26
- args:
27
- url: http://localhost:5002/
28
- ```
29
-
30
- ## Basic use
31
-
32
- ``` bash
33
- swh loader --C /tmp/mercurial.yml run mercurial https://www.mercurial-scm.org/repo/hello
34
- ```
@@ -1 +0,0 @@
1
- include ../../swh-docs/Makefile.sphinx
@@ -1,11 +0,0 @@
1
- [tool.black]
2
- target-version = ['py37']
3
-
4
- [tool.isort]
5
- multi_line_output = 3
6
- include_trailing_comma = true
7
- force_grid_wrap = 0
8
- use_parentheses = true
9
- ensure_newline_before_comments = true
10
- line_length = 88
11
- force_sort_within_sections = true
@@ -1,7 +0,0 @@
1
- [pytest]
2
- # Drop this when these fixtures aren't imported automatically anymore
3
- addopts = -p no:pytest_swh_scheduler -p no:pytest_swh_storage
4
-
5
- norecursedirs = build docs .*
6
-
7
- asyncio_mode = strict
@@ -1,74 +0,0 @@
1
- #!/usr/bin/env python3
2
- # Copyright (C) 2015-2021 The Software Heritage developers
3
- # See the AUTHORS file at the top-level directory of this distribution
4
- # License: GNU General Public License version 3, or any later version
5
- # See top-level LICENSE file for more information
6
-
7
- from io import open
8
- from os import path
9
-
10
- from setuptools import find_packages, setup
11
-
12
- here = path.abspath(path.dirname(__file__))
13
-
14
- # Get the long description from the README file
15
- with open(path.join(here, "README.md"), encoding="utf-8") as f:
16
- long_description = f.read()
17
-
18
-
19
- def parse_requirements(name=None):
20
- if name:
21
- reqf = "requirements-%s.txt" % name
22
- else:
23
- reqf = "requirements.txt"
24
-
25
- requirements = []
26
- if not path.exists(reqf):
27
- return requirements
28
-
29
- with open(reqf) as f:
30
- for line in f.readlines():
31
- line = line.strip()
32
- if not line or line.startswith("#"):
33
- continue
34
- requirements.append(line)
35
- return requirements
36
-
37
-
38
- setup(
39
- name="swh.loader.mercurial",
40
- description="Software Heritage Mercurial Loader",
41
- long_description=long_description,
42
- long_description_content_type="text/markdown",
43
- python_requires=">=3.7",
44
- author="Software Heritage developers",
45
- author_email="swh-devel@inria.fr",
46
- url="https://forge.softwareheritage.org/diffusion/DLDHG/",
47
- packages=find_packages(),
48
- scripts=[],
49
- install_requires=parse_requirements() + parse_requirements("swh"),
50
- setup_requires=["setuptools-scm"],
51
- use_scm_version=True,
52
- extras_require={"testing": parse_requirements("test")},
53
- include_package_data=True,
54
- entry_points="""
55
- [swh.workers]
56
- loader.mercurial=swh.loader.mercurial:register
57
- loader.mercurial-checkout=swh.loader.mercurial:register_checkout
58
- [console_scripts]
59
- swh-hg-identify=swh.loader.mercurial.identify:main
60
- """,
61
- classifiers=[
62
- "Programming Language :: Python :: 3",
63
- "Intended Audience :: Developers",
64
- "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
65
- "Operating System :: OS Independent",
66
- "Development Status :: 4 - Beta",
67
- ],
68
- project_urls={
69
- "Bug Reports": "https://forge.softwareheritage.org/maniphest",
70
- "Funding": "https://www.softwareheritage.org/donate",
71
- "Source": ("https://forge.softwareheritage.org/source/swh-loader-mercurial"),
72
- "Documentation": "https://docs.softwareheritage.org/devel/swh-loader-mercurial/", # NoQA: B950
73
- },
74
- )
@@ -1,3 +0,0 @@
1
- from pkgutil import extend_path
2
-
3
- __path__ = extend_path(__path__, __name__)
@@ -1,3 +0,0 @@
1
- from pkgutil import extend_path
2
-
3
- __path__ = extend_path(__path__, __name__)
@@ -1,56 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: swh.loader.mercurial
3
- Version: 3.4.0
4
- Summary: Software Heritage Mercurial Loader
5
- Home-page: https://forge.softwareheritage.org/diffusion/DLDHG/
6
- Author: Software Heritage developers
7
- Author-email: swh-devel@inria.fr
8
- Project-URL: Bug Reports, https://forge.softwareheritage.org/maniphest
9
- Project-URL: Funding, https://www.softwareheritage.org/donate
10
- Project-URL: Source, https://forge.softwareheritage.org/source/swh-loader-mercurial
11
- Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-loader-mercurial/
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Development Status :: 4 - Beta
17
- Requires-Python: >=3.7
18
- Description-Content-Type: text/markdown
19
- Provides-Extra: testing
20
- License-File: LICENSE
21
- License-File: AUTHORS
22
-
23
- swh-loader-mercurial
24
- =========================
25
-
26
- The Software Heritage Mercurial Loader is a tool and a library to walk a local mercurial
27
- repository and inject into the SWH dataset all contained files that weren't known
28
- before.
29
-
30
- The main entry points are:
31
- - :class:`swh.loader.mercurial.loader.HgLoader` which reads and loads a local
32
- repository into an SWH archive.
33
-
34
- - :class:`swh.loader.mercurial.loader.HgArchiveLoader` which reads and loads
35
- a local repository wrapped within a tarball
36
-
37
- - :class:`swh.loader.mercurial.directory.HgCheckoutLoader` which ingests the hg tree at
38
- a specific changeset or tag.
39
-
40
- # CLI run
41
-
42
- ## Configuration file
43
-
44
- /tmp/mercurial.yml:
45
- ``` YAML
46
- storage:
47
- cls: remote
48
- args:
49
- url: http://localhost:5002/
50
- ```
51
-
52
- ## Basic use
53
-
54
- ``` bash
55
- swh loader --C /tmp/mercurial.yml run mercurial https://www.mercurial-scm.org/repo/hello
56
- ```