-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format and lint codes and fix packaging (#125)
* add: configure files (setup.py->setup.py+setup.cfg+pyproject.toml) * add: __download_url__ * format with black and isort * fix: flake8 section in setup.cfg * add: E501 to flake ignore * fix: metadata.name does not accept attr * fix: merge __version__.py into __init__.py * fix: flake8 errors in tests/ * fix: datetime.datetime -> datetime * fix: banner * fix: ignore W605 for banner * fix: way to install deps in CI * add: versem to setuptools * fix: drop python<=3.6 (#126) from package and CI
- Loading branch information
Showing
20 changed files
with
177 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["wheel", "setuptools"] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
black | ||
click | ||
requests | ||
pytest | ||
pytest-cov | ||
codecov | ||
flake8 | ||
mypy | ||
black | ||
setuptools>=46.4.0 | ||
pytest | ||
pytest-cov | ||
requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,67 @@ | ||
[metadata] | ||
description-file = README.md | ||
license_file = LICENSE | ||
name = waybackpy | ||
version = attr: waybackpy.__version__ | ||
description = attr: waybackpy.__description__ | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
license = attr: waybackpy.__license__ | ||
author = attr: waybackpy.__author__ | ||
author_email = attr: waybackpy.__author_email__ | ||
url = attr: waybackpy.__url__ | ||
download_url = attr: waybackpy.__download_url__ | ||
project_urls = | ||
Documentation = https://github.com/akamhy/waybackpy/wiki | ||
Source = https://github.com/akamhy/waybackpy | ||
Tracker = https://github.com/akamhy/waybackpy/issues | ||
keywords = | ||
Archive Website | ||
Wayback Machine | ||
Internet Archive | ||
Wayback Machine CLI | ||
Wayback Machine Python | ||
Internet Archiving | ||
Availability API | ||
CDX API | ||
savepagenow | ||
classifiers = | ||
Development Status :: 4 - Beta | ||
Intended Audience :: Developers | ||
Natural Language :: English | ||
License :: OSI Approved :: MIT License | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Programming Language :: Python :: Implementation :: CPython | ||
|
||
[options] | ||
packages = find: | ||
python_requires = >= 3.7 | ||
install_requires = | ||
click | ||
requests | ||
|
||
[options.extras_require] | ||
dev = | ||
black | ||
codecov | ||
flake8 | ||
mypy | ||
pytest | ||
pytest-cov | ||
setuptools>=46.4.0 | ||
|
||
|
||
[options.entry_points] | ||
console_scripts = | ||
waybackpy = waybackpy.cli:main | ||
|
||
[isort] | ||
profile = black | ||
|
||
[flake8] | ||
indent-size = 4 | ||
max-line-length = 88 | ||
extend-ignore = E203,W503 | ||
extend-ignore = E203,W503,E501,W605 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,3 @@ | ||
import os.path | ||
from setuptools import setup | ||
|
||
readme_path = os.path.join(os.path.dirname(__file__), "README.md") | ||
with open(readme_path, encoding="utf-8") as f: | ||
long_description = f.read() | ||
|
||
about = {} | ||
version_path = os.path.join(os.path.dirname(__file__), "waybackpy", "__version__.py") | ||
with open(version_path, encoding="utf-8") as f: | ||
exec(f.read(), about) | ||
|
||
version = str(about["__version__"]) | ||
|
||
download_url = "https://github.com/akamhy/waybackpy/archive/{version}.tar.gz".format( | ||
version=version | ||
) | ||
|
||
setup( | ||
name=about["__title__"], | ||
packages=["waybackpy"], | ||
version=version, | ||
description=about["__description__"], | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
license=about["__license__"], | ||
author=about["__author__"], | ||
author_email=about["__author_email__"], | ||
url=about["__url__"], | ||
download_url=download_url, | ||
keywords=[ | ||
"Archive Website", | ||
"Wayback Machine", | ||
"Internet Archive", | ||
"Wayback Machine CLI", | ||
"Wayback Machine Python", | ||
"Internet Archiving", | ||
"Availability API", | ||
"CDX API", | ||
"savepagenow", | ||
], | ||
install_requires=["requests", "click"], | ||
python_requires=">=3.4", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Natural Language :: English", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
], | ||
entry_points={"console_scripts": ["waybackpy = waybackpy.cli:main"]}, | ||
project_urls={ | ||
"Documentation": "https://github.com/akamhy/waybackpy/wiki", | ||
"Source": "https://github.com/akamhy/waybackpy", | ||
"Tracker": "https://github.com/akamhy/waybackpy/issues", | ||
}, | ||
) | ||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import pytest | ||
from datetime import datetime | ||
|
||
from waybackpy.cdx_snapshot import CDXSnapshot | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,37 @@ | ||
from .wrapper import Url | ||
__title__ = "waybackpy" | ||
__description__ = ( | ||
"Python package that interfaces with the Internet Archive's Wayback Machine APIs. " | ||
"Archive pages and retrieve archived pages easily." | ||
) | ||
__url__ = "https://akamhy.github.io/waybackpy/" | ||
__version__ = "3.0.2" | ||
__download_url__ = ( | ||
"https://github.com/akamhy/waybackpy/archive/{version}.tar.gz".format( | ||
version=__version__ | ||
) | ||
) | ||
__author__ = "Akash Mahanty" | ||
__author_email__ = "[email protected]" | ||
__license__ = "MIT" | ||
__copyright__ = "Copyright 2020-2022 Akash Mahanty et al." | ||
|
||
from .availability_api import WaybackMachineAvailabilityAPI | ||
from .cdx_api import WaybackMachineCDXServerAPI | ||
from .save_api import WaybackMachineSaveAPI | ||
from .availability_api import WaybackMachineAvailabilityAPI | ||
from .__version__ import ( | ||
__title__, | ||
__description__, | ||
__url__, | ||
__version__, | ||
__author__, | ||
__author_email__, | ||
__license__, | ||
__copyright__, | ||
) | ||
from .wrapper import Url | ||
|
||
__all__ = [ | ||
"__author__", | ||
"__author_email__", | ||
"__copyright__", | ||
"__description__", | ||
"__license__", | ||
"__title__", | ||
"__url__", | ||
"__download_url__", | ||
"__version__", | ||
"WaybackMachineAvailabilityAPI", | ||
"WaybackMachineCDXServerAPI", | ||
"WaybackMachineSaveAPI", | ||
"Url", | ||
] |
Oops, something went wrong.