github-archive 7.0.1__tar.gz → 7.0.3__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 (29) hide show
  1. {github_archive-7.0.1 → github_archive-7.0.3}/PKG-INFO +5 -20
  2. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive/__init__.py +0 -1
  3. github_archive-7.0.3/github_archive/_version.py +1 -0
  4. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive/constants.py +0 -1
  5. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive/gists.py +8 -2
  6. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive/repos.py +7 -3
  7. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive.egg-info/PKG-INFO +5 -20
  8. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive.egg-info/SOURCES.txt +0 -1
  9. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive.egg-info/requires.txt +2 -4
  10. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive.egg-info/top_level.txt +1 -0
  11. github_archive-7.0.3/pyproject.toml +41 -0
  12. github_archive-7.0.1/github_archive/_version.py +0 -1
  13. github_archive-7.0.1/pyproject.toml +0 -16
  14. github_archive-7.0.1/setup.py +0 -68
  15. {github_archive-7.0.1 → github_archive-7.0.3}/LICENSE +0 -0
  16. {github_archive-7.0.1 → github_archive-7.0.3}/README.md +0 -0
  17. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive/archive.py +0 -0
  18. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive/cli.py +0 -0
  19. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive/logger.py +0 -0
  20. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive/py.typed +0 -0
  21. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive.egg-info/dependency_links.txt +0 -0
  22. {github_archive-7.0.1 → github_archive-7.0.3}/github_archive.egg-info/entry_points.txt +0 -0
  23. {github_archive-7.0.1 → github_archive-7.0.3}/setup.cfg +0 -0
  24. {github_archive-7.0.1 → github_archive-7.0.3}/test/unit/__init__.py +0 -0
  25. {github_archive-7.0.1 → github_archive-7.0.3}/test/unit/conftest.py +0 -0
  26. {github_archive-7.0.1 → github_archive-7.0.3}/test/unit/test_archive.py +0 -0
  27. {github_archive-7.0.1 → github_archive-7.0.3}/test/unit/test_gists.py +0 -0
  28. {github_archive-7.0.1 → github_archive-7.0.3}/test/unit/test_logger.py +0 -0
  29. {github_archive-7.0.1 → github_archive-7.0.3}/test/unit/test_repos.py +0 -0
@@ -1,38 +1,23 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-archive
3
- Version: 7.0.1
3
+ Version: 7.0.3
4
4
  Summary: A powerful tool to concurrently clone, pull, or fork user and org repos and gists to create a GitHub archive.
5
- Home-page: http://github.com/justintime50/github-archive
6
5
  Author: Justintime50
7
6
  License: MIT
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.10, <4
7
+ Project-URL: Homepage, http://github.com/justintime50/github-archive
8
+ Requires-Python: >=3.10
12
9
  Description-Content-Type: text/markdown
13
10
  License-File: LICENSE
14
- Requires-Dist: PyGithub==2.8.*
11
+ Requires-Dist: PyGithub==2.9.*
15
12
  Requires-Dist: woodchips==2.*
16
13
  Provides-Extra: dev
17
14
  Requires-Dist: bandit==1.9.*; extra == "dev"
18
- Requires-Dist: black==25.*; extra == "dev"
19
15
  Requires-Dist: build==1.3.*; extra == "dev"
20
- Requires-Dist: flake8==7.*; extra == "dev"
21
- Requires-Dist: isort==7.*; extra == "dev"
22
16
  Requires-Dist: mypy==1.18.*; extra == "dev"
23
17
  Requires-Dist: pytest==9.*; extra == "dev"
24
18
  Requires-Dist: pytest-cov==7.*; extra == "dev"
25
- Dynamic: author
26
- Dynamic: classifier
27
- Dynamic: description
28
- Dynamic: description-content-type
29
- Dynamic: home-page
30
- Dynamic: license
19
+ Requires-Dist: ruff==0.14.*; extra == "dev"
31
20
  Dynamic: license-file
32
- Dynamic: provides-extra
33
- Dynamic: requires-dist
34
- Dynamic: requires-python
35
- Dynamic: summary
36
21
 
37
22
  <div align="center">
38
23
 
@@ -1,6 +1,5 @@
1
1
  from github_archive.archive import GithubArchive
2
2
 
3
-
4
3
  __all__ = [
5
4
  "GithubArchive",
6
5
  ]
@@ -0,0 +1 @@
1
+ __version__ = "7.0.3"
@@ -1,7 +1,6 @@
1
1
  import os
2
2
  from typing import Literal
3
3
 
4
-
5
4
  DEFAULT_BASE_URL = "https://api.github.com"
6
5
  DEFAULT_LOCATION = os.path.join("~", "github-archive")
7
6
  DEFAULT_NUM_THREADS = 10
@@ -16,7 +16,6 @@ from typing import (
16
16
  import woodchips
17
17
  from github import Gist
18
18
 
19
-
20
19
  if TYPE_CHECKING:
21
20
  # This is needed to get around circular imports while allowing `mypy` to be happy
22
21
  from github_archive.archive import GithubArchive # pragma: no cover
@@ -28,7 +27,11 @@ from github_archive.constants import (
28
27
  )
29
28
 
30
29
 
31
- def iterate_gists_to_archive(github_archive: GithubArchive, gists: List[Gist.Gist], operation: str) -> None:
30
+ def iterate_gists_to_archive(
31
+ github_archive: GithubArchive,
32
+ gists: List[Gist.Gist],
33
+ operation: str,
34
+ ) -> List[Optional[str]]:
32
35
  """Iterate over each gist and start a thread if it can be archived."""
33
36
  pool = ThreadPoolExecutor(github_archive.threads)
34
37
  thread_list = []
@@ -46,6 +49,9 @@ def iterate_gists_to_archive(github_archive: GithubArchive, gists: List[Gist.Gis
46
49
  )
47
50
 
48
51
  wait(thread_list, return_when=ALL_COMPLETED)
52
+ failed_gists = [gist.result() for gist in thread_list if gist.result()]
53
+
54
+ return failed_gists
49
55
 
50
56
 
51
57
  def view_gists(gists: List[Gist.Gist]):
@@ -16,7 +16,6 @@ from typing import (
16
16
  import woodchips
17
17
  from github import Repository
18
18
 
19
-
20
19
  if TYPE_CHECKING:
21
20
  # This is needed to get around circular imports while allowing `mypy` to be happy
22
21
  from github_archive.archive import GithubArchive # pragma: no cover
@@ -29,7 +28,9 @@ from github_archive.constants import (
29
28
 
30
29
 
31
30
  def iterate_repos_to_archive(
32
- github_archive: GithubArchive, repos: List[Repository.Repository], operation: str
31
+ github_archive: GithubArchive,
32
+ repos: List[Repository.Repository],
33
+ operation: str,
33
34
  ) -> List[Optional[str]]:
34
35
  """Iterate over each repository and start a thread after filtering based on the
35
36
  user input and attempt to archive it.
@@ -82,7 +83,7 @@ def view_repos(repos: List[Repository.Repository]):
82
83
  logger.info(repo_name)
83
84
 
84
85
 
85
- def iterate_repos_to_fork(github_archive: GithubArchive, repos: List[Repository.Repository]) -> None:
86
+ def iterate_repos_to_fork(github_archive: GithubArchive, repos: List[Repository.Repository]) -> List[Optional[str]]:
86
87
  """Iterates through a list of repos and attempts to fork them."""
87
88
  pool = ThreadPoolExecutor(github_archive.threads)
88
89
  thread_list = []
@@ -96,6 +97,9 @@ def iterate_repos_to_fork(github_archive: GithubArchive, repos: List[Repository.
96
97
  )
97
98
 
98
99
  wait(thread_list, return_when=ALL_COMPLETED)
100
+ failed_repos = [repo.result() for repo in thread_list if repo.result()]
101
+
102
+ return failed_repos
99
103
 
100
104
 
101
105
  def _fork_repo(repo: Repository.Repository):
@@ -1,38 +1,23 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-archive
3
- Version: 7.0.1
3
+ Version: 7.0.3
4
4
  Summary: A powerful tool to concurrently clone, pull, or fork user and org repos and gists to create a GitHub archive.
5
- Home-page: http://github.com/justintime50/github-archive
6
5
  Author: Justintime50
7
6
  License: MIT
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.10, <4
7
+ Project-URL: Homepage, http://github.com/justintime50/github-archive
8
+ Requires-Python: >=3.10
12
9
  Description-Content-Type: text/markdown
13
10
  License-File: LICENSE
14
- Requires-Dist: PyGithub==2.8.*
11
+ Requires-Dist: PyGithub==2.9.*
15
12
  Requires-Dist: woodchips==2.*
16
13
  Provides-Extra: dev
17
14
  Requires-Dist: bandit==1.9.*; extra == "dev"
18
- Requires-Dist: black==25.*; extra == "dev"
19
15
  Requires-Dist: build==1.3.*; extra == "dev"
20
- Requires-Dist: flake8==7.*; extra == "dev"
21
- Requires-Dist: isort==7.*; extra == "dev"
22
16
  Requires-Dist: mypy==1.18.*; extra == "dev"
23
17
  Requires-Dist: pytest==9.*; extra == "dev"
24
18
  Requires-Dist: pytest-cov==7.*; extra == "dev"
25
- Dynamic: author
26
- Dynamic: classifier
27
- Dynamic: description
28
- Dynamic: description-content-type
29
- Dynamic: home-page
30
- Dynamic: license
19
+ Requires-Dist: ruff==0.14.*; extra == "dev"
31
20
  Dynamic: license-file
32
- Dynamic: provides-extra
33
- Dynamic: requires-dist
34
- Dynamic: requires-python
35
- Dynamic: summary
36
21
 
37
22
  <div align="center">
38
23
 
@@ -1,7 +1,6 @@
1
1
  LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
- setup.py
5
4
  github_archive/__init__.py
6
5
  github_archive/_version.py
7
6
  github_archive/archive.py
@@ -1,12 +1,10 @@
1
- PyGithub==2.8.*
1
+ PyGithub==2.9.*
2
2
  woodchips==2.*
3
3
 
4
4
  [dev]
5
5
  bandit==1.9.*
6
- black==25.*
7
6
  build==1.3.*
8
- flake8==7.*
9
- isort==7.*
10
7
  mypy==1.18.*
11
8
  pytest==9.*
12
9
  pytest-cov==7.*
10
+ ruff==0.14.*
@@ -0,0 +1,41 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "github-archive"
7
+ description = "A powerful tool to concurrently clone, pull, or fork user and org repos and gists to create a GitHub archive."
8
+ dynamic = ["version"]
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "Justintime50" }]
13
+ urls = { Homepage = "http://github.com/justintime50/github-archive" }
14
+ scripts = { github-archive = "github_archive.cli:main" }
15
+ dependencies = ["PyGithub == 2.9.*", "woodchips == 2.*"]
16
+ optional-dependencies = { dev = [
17
+ "bandit == 1.9.*",
18
+ "build == 1.3.*",
19
+ "mypy == 1.18.*",
20
+ "pytest == 9.*",
21
+ "pytest-cov == 7.*",
22
+ "ruff == 0.14.*",
23
+ ] }
24
+
25
+ [tool.setuptools.dynamic]
26
+ version = { attr = "github_archive._version.__version__" }
27
+
28
+ [tool.setuptools.packages.find]
29
+ exclude = ["test"]
30
+
31
+ [tool.setuptools.package-data]
32
+ github_archive = ["py.typed"]
33
+
34
+ [tool.ruff]
35
+ line-length = 120
36
+
37
+ [tool.ruff.lint]
38
+ extend-select = ["I", "E501"]
39
+
40
+ [tool.mypy]
41
+ disable_error_code = "import-untyped"
@@ -1 +0,0 @@
1
- __version__ = "7.0.1"
@@ -1,16 +0,0 @@
1
- [tool.black]
2
- line-length = 120
3
-
4
- [tool.isort]
5
- profile = "black"
6
- line_length = 120
7
- indent = 4
8
- force_grid_wrap = 2
9
- multi_line_output = 3
10
- sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
11
- lines_after_imports = 2
12
- include_trailing_comma = true
13
- use_parentheses = true
14
-
15
- [tool.mypy]
16
- disable_error_code = "import-untyped"
@@ -1,68 +0,0 @@
1
- import re
2
-
3
- import setuptools
4
-
5
- with open('README.md', 'r') as readme_file:
6
- long_description = readme_file.read()
7
-
8
- # Inspiration: https://stackoverflow.com/a/7071358/6064135
9
- with open('github_archive/_version.py', 'r') as version_file:
10
- version_groups = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M)
11
- if version_groups:
12
- version = version_groups.group(1)
13
- else:
14
- raise RuntimeError('Unable to find version string!')
15
-
16
- REQUIREMENTS = [
17
- 'PyGithub == 2.8.*',
18
- 'woodchips == 2.*',
19
- ]
20
-
21
- DEV_REQUIREMENTS = [
22
- 'bandit == 1.9.*',
23
- 'black == 25.*',
24
- 'build == 1.3.*',
25
- 'flake8 == 7.*',
26
- 'isort == 7.*',
27
- 'mypy == 1.18.*',
28
- 'pytest == 9.*',
29
- 'pytest-cov == 7.*',
30
- ]
31
-
32
- setuptools.setup(
33
- name='github-archive',
34
- version=version,
35
- description=(
36
- 'A powerful tool to concurrently clone, pull, or fork user and org repos and gists to create a GitHub archive.'
37
- ),
38
- long_description=long_description,
39
- long_description_content_type="text/markdown",
40
- url='http://github.com/justintime50/github-archive',
41
- author='Justintime50',
42
- license='MIT',
43
- packages=setuptools.find_packages(
44
- exclude=[
45
- 'test',
46
- ]
47
- ),
48
- package_data={
49
- 'github_archive': [
50
- 'py.typed',
51
- ]
52
- },
53
- classifiers=[
54
- "Programming Language :: Python :: 3",
55
- "License :: OSI Approved :: MIT License",
56
- "Operating System :: OS Independent",
57
- ],
58
- install_requires=REQUIREMENTS,
59
- extras_require={
60
- 'dev': DEV_REQUIREMENTS,
61
- },
62
- entry_points={
63
- 'console_scripts': [
64
- 'github-archive=github_archive.cli:main',
65
- ]
66
- },
67
- python_requires='>=3.10, <4',
68
- )
File without changes
File without changes
File without changes