diff --git a/README.rst b/README.rst index a2bb6e5f..2685c401 100644 --- a/README.rst +++ b/README.rst @@ -31,9 +31,9 @@ Usage pip install git+https://github.com/nexB/python-inspector -- Run a command line with:: +- Run the command line utility with:: - dad --help + python-inspector --help diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4a299116..5b7e8498 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,8 +26,8 @@ jobs: - template: etc/ci/azure-posix.yml parameters: - job_name: macos1015_cpython - image_name: macos-10.15 + job_name: macos12_cpython + image_name: macos-12 python_versions: ['3.8', '3.9', '3.10'] test_suites: all: venv/bin/pytest -n 2 -vvs diff --git a/docs/source/dependencies-design.rst b/docs/source/dependencies-design.rst index ec3a1de5..f1b95791 100644 --- a/docs/source/dependencies-design.rst +++ b/docs/source/dependencies-design.rst @@ -5,7 +5,7 @@ This is a design to create a new command line tool to resolve Python dependencies for a given Python version, operating system and -architecture. Thename for this new tool is “python-inspector”. +architecture. The name for this new tool is “python-inspector”. *************** @@ -171,8 +171,7 @@ User experience: The goal of the command line interface and user experience is to be obvious and familiar to a pip user. -Create a new CLI named "dad" short for "dad analyzes dependencies" with -these key options: +We will create a new CLI named "python-inspector" with these key options: Inputs: ~~~~~~~~~ diff --git a/docs/source/test-protocol.rst b/docs/source/test-protocol.rst index d5e918a8..6e1d365d 100644 --- a/docs/source/test-protocol.rst +++ b/docs/source/test-protocol.rst @@ -73,13 +73,13 @@ packages that were installed during the build. Step 4: Resolve dependencies using development requirement files -------------------------------------------------------------------- -In this step, you will resolve the dependencies using python-inspector dad +In this step, you will resolve the dependencies using python-inspector python-inspector command for each of the requirements files identified in Step 1 using the Python version identified in Step 2. Run this command for each requirements file, using each time a different output file name. We assume here Python version 3.8 (note the absence of dot when passed as a command line option:: - dad --python-version 38 --requirement \ + python-inspector --python-version 38 --requirement \ --json \ --netrc @@ -238,10 +238,10 @@ Step 4: Resolve dependencies using development requirement files cd ~/tmp/pyinsp-example/tools/python-inspector source venv/bin/activate - dad --requirement ~/tmp/pyinsp-example/ion/docs/rtd-requirements.txt \ + python-inspector --requirement ~/tmp/pyinsp-example/ion/docs/rtd-requirements.txt \ --json ~/tmp/pyinsp-example/output/resolved-rtd-requirements.txt.json - dad --requirement ~/tmp/pyinsp-example/ion/requirements.txt \ + python-inspector --requirement ~/tmp/pyinsp-example/ion/requirements.txt \ --json ~/tmp/pyinsp-example/output/resolved-requirements.txt.json deactivate diff --git a/requirements.txt b/requirements.txt index cb292414..1f953e2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,27 +1,26 @@ -attrs==21.4.0 +attrs==22.1.0 beautifulsoup4==4.11.1 -certifi==2022.5.18.1 -charset-normalizer==2.0.12 -click==8.0.4 -colorama==0.4.4 +certifi==2022.6.15 +charset-normalizer==2.1.0 +click==8.1.3 +colorama==0.4.5 commoncode==30.2.0 dparse2==0.6.1 idna==3.3 -importlib-metadata==4.8.3 +importlib-metadata==4.12.0 intbitset==3.0.1 -packageurl-python==0.9.9 +packageurl-python==0.10.0 packaging==21.3 pip-requirements-parser==31.2.0 pkginfo2==30.0.0 pyparsing==3.0.9 PyYAML==6.0 -requests==2.27.1 +requests==2.28.1 resolvelib==0.8.1 saneyaml==0.5.2 soupsieve==2.3.2.post1 text-unidecode==1.3 +tinynetrc==1.3.1 toml==0.10.2 -typing==3.6.6 -typing_extensions==4.1.1 -urllib3==1.26.9 -zipp==3.6.0 +urllib3==1.26.11 +zipp==3.8.1 diff --git a/setup.cfg b/setup.cfg index b1a16857..fd4c5ed2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ name = python-inspector license = Apache-2.0 # description must be on ONE line https://github.com/pypa/setuptools/issues/1390 -description = python-inspector +description = python-inspector is is a collection of utilities to collect PyPI package metadata and resolve packages dependencies. long_description = file:README.rst long_description_content_type = text/x-rst url = https://github.com/nexB/python-inspector @@ -12,7 +12,7 @@ author = nexB. Inc. and others author_email = info@aboutcode.org classifiers = - Development Status :: 5 - Production/Stable + Development Status :: 4 - Beta Intended Audience :: Developers Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only @@ -59,14 +59,14 @@ install_requires = colorama >= 0.3.9 commoncode >= 30.0.0 dparse2 >= 0.6.1 - importlib_metadata + importlib_metadata >= 4.12.0 packageurl_python >= 0.9.0 pkginfo2 >= 30.0.0 pip-requirements-parser >= 31.2.0 requests >= 2.18.0 - resolvelib + resolvelib >= 0.8.1 saneyaml >= 0.5.2 - tinynetrc + tinynetrc >= 1.3.1 toml >= 0.10.0 [options.packages.find] @@ -74,7 +74,7 @@ where = src [options.entry_points] console_scripts = - dad = python_inspector.resolve_cli:resolve_dependencies + python-inspector = python_inspector.resolve_cli:resolve_dependencies [options.extras_require] testing = diff --git a/src/python_inspector/resolve_cli.py b/src/python_inspector/resolve_cli.py index d30d27a0..471fda20 100644 --- a/src/python_inspector/resolve_cli.py +++ b/src/python_inspector/resolve_cli.py @@ -170,7 +170,7 @@ def resolve_dependencies( For example, display the results of resolving the dependencies for flask==2.1.2 on screen:: - dad --spec "flask==2.1.2" --json - + python-inspector --spec "flask==2.1.2" --json - """ if not (json_output or pdt_output): click.secho("No output file specified. Use --json or --json-pdt.", err=True) @@ -272,7 +272,7 @@ def resolve_dependencies( ) headers = dict( - tool_name="dad", + tool_name="python-inspector", tool_homepageurl="https://github.com/nexB/python-inspector", tool_version=__version__, options=cli_options, diff --git a/tests/data/default-url-expected.json b/tests/data/default-url-expected.json index 2dc22860..b92ee860 100644 --- a/tests/data/default-url-expected.json +++ b/tests/data/default-url-expected.json @@ -1,6 +1,6 @@ { "headers": { - "tool_name": "dad", + "tool_name": "python-inspector", "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.5.0", "options": [ diff --git a/tests/data/pinned-requirements.txt-expected.json b/tests/data/pinned-requirements.txt-expected.json index 30a90c3e..49bd415c 100644 --- a/tests/data/pinned-requirements.txt-expected.json +++ b/tests/data/pinned-requirements.txt-expected.json @@ -1,6 +1,6 @@ { "headers": { - "tool_name": "dad", + "tool_name": "python-inspector", "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.5.0", "options": [ diff --git a/tests/data/single-url-except-simple-expected.json b/tests/data/single-url-except-simple-expected.json index deb70dac..45f09563 100644 --- a/tests/data/single-url-except-simple-expected.json +++ b/tests/data/single-url-except-simple-expected.json @@ -1,6 +1,6 @@ { "headers": { - "tool_name": "dad", + "tool_name": "python-inspector", "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.5.0", "options": [ diff --git a/tests/data/single-url-expected.json b/tests/data/single-url-expected.json index 1e5b9b76..3ac1d08b 100644 --- a/tests/data/single-url-expected.json +++ b/tests/data/single-url-expected.json @@ -1,6 +1,6 @@ { "headers": { - "tool_name": "dad", + "tool_name": "python-inspector", "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.5.0", "options": [ diff --git a/tests/data/tilde_req-expected.json b/tests/data/tilde_req-expected.json index 5f6267f1..5bc6ed56 100644 --- a/tests/data/tilde_req-expected.json +++ b/tests/data/tilde_req-expected.json @@ -1,6 +1,6 @@ { "headers": { - "tool_name": "dad", + "tool_name": "python-inspector", "tool_homepageurl": "https://github.com/nexB/python-inspector", "tool_version": "0.5.0", "options": [