Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions docs/source/dependencies-design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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”.


***************
Expand Down Expand Up @@ -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:
~~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions docs/source/test-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path/to/requirements.txt> \
python-inspector --python-version 38 --requirement <path/to/requirements.txt> \
--json <path/to/resolved-requirements.txt.json> \
--netrc <path/to/.netrc>

Expand Down Expand Up @@ -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
Expand Down
23 changes: 11 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -59,22 +59,22 @@ 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]
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 =
Expand Down
4 changes: 2 additions & 2 deletions src/python_inspector/resolve_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/data/default-url-expected.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion tests/data/pinned-requirements.txt-expected.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion tests/data/single-url-except-simple-expected.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion tests/data/single-url-expected.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion tests/data/tilde_req-expected.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down