Closed swastkk closed 1 year ago
@TG1999 review please :)
@swastkk tests are failing, please look into this
@swastkk tests are failing, please look into this
okay :)
Can you please help in solving these errors, actually solved the errors which were in resolution.py
by changing the versions of the packages mentioned there, but in these errors, I am not able to find where to make changes.
Thanks in advance.
======================================== short test summary info =========================================
FAILED tests/test_api.py::test_api_with_specifier - assert {'files': [],\n 'packages': [{'api_data_url'...
FAILED tests/test_api.py::test_api_with_specifier_pdt - assert {'files': [],\n 'packages': [{'api_data_...
FAILED tests/test_api.py::test_api_with_requirement_file - assert {'files': [{'package_data': [{'api_da...
FAILED tests/test_api.py::test_api_with_prefer_source - assert {'files': [],\n 'packages': [{'api_data_...
FAILED tests/test_api.py::test_api_with_python_311 - assert {'files': [],\n 'packages': [{'api_data_url...
FAILED tests/test_cli.py::test_pdt_output_with_pinned_requirements - assert {'files': [{'package_data':...
FAILED tests/test_cli.py::test_pdt_output_with_frozen_requirements - assert {'files': [{'package_data':...
FAILED tests/test_cli.py::test_cli_with_single_index_url_except_pypi_simple - assert {'files': [],\n 'h...
FAILED tests/test_cli.py::test_cli_with_azure_devops_with_python_310 - assert {'files': [{'package_data...
FAILED tests/test_cli.py::test_cli_with_azure_devops_with_python_38 - assert {'files': [{'package_data'...
FAILED tests/test_cli.py::test_cli_with_pinned_requirements_file - assert {'files': [{'package_data': [...
======================= 11 failed, 112 passed, 1352 warnings in 299.90s (0:04:59) ========================
like was having this error
tests/test_api.py:101:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
result_file = '/tmp/scancode-tk-tests -rsjax3qe/4kwmmz7f/td/tf.json'
expected_file = '/home/swastik/Desktop/Projects/python-inspector/tests/data/test-api-with-prefer-source.json'
clean = True, regen = False
def check_json_results(result_file, expected_file, clean=True, regen=REGEN_TEST_FIXTURES):
"""
Check the ``result_file`` JSON results against the ``expected_file``
expected JSON results.
If ``clean`` is True, remove headers data that can change across runs to
provide stable test resultys.
If ``regen`` is True the expected_file WILL BE overwritten with the new
results from ``results_file``. This is convenient for updating tests
expectations.
"""
with open(result_file) as res:
results = json.load(res)
if regen:
with open(expected_file, "w") as reg:
json.dump(results, reg, indent=2, separators=(",", ": "))
expected = results
else:
with open(expected_file) as res:
expected = json.load(res)
if clean:
clean_results(expected)
if clean:
results = clean_results(results)
> assert results == expected
E AssertionError: assert {'files': [],...zeug@2.2.2'}]} == {'files': [],...zeug@2.2.2'}]}
E Omitting 1 identical items, use -vv to show
E Differing items:
E {'resolution': [{'dependencies': [], 'package': 'pkg:pypi/click@8.1.3'}, {'dependencies': ['pkg:pypi/click@8.1.3', 'pk...: 'pkg:pypi/markupsafe@2.1.2'}, {'dependencies': ['pkg:pypi/markupsafe@2.1.2'], 'package': 'pkg:pypi/werkzeug@2.2.2'}]} != {'resolution': [{'dependencies': [], 'package': 'pkg:pypi/click@8.1.3'}, {'dependencies': ['pkg:pypi/click@8.1.3', 'pk...: 'pkg:pypi/markupsafe@2.1.1'}, {'dependencies': ['pkg:pypi/markupsafe@2.1.1'], 'package': 'pkg:pypi/werkzeug@2.2.2'}]}
E {'packages': [{'api_data_url': 'h...
E
E ...Full output truncated (2 lines hidden), use '-vv' to show
tests/test_cli.py:495: AssertionError
how to approach these type of errors...?
@swastkk you can regen the test output by running these commands
$ source venv/bin/activate
$ PYINSP_REGEN_TEST_FIXTURES=yes pytest -vvs
@swastkk you can regen the test output by running these commands
$ source venv/bin/activate $ PYINSP_REGEN_TEST_FIXTURES=yes pytest -vvs
Yep, its done with all tests passing Thanks :)
Actually while squashing with rebase, getting merge issues with the previous commits as well, so what to do now?
git rebase -i HEAD~10
Auto-merging tests/test_resolution.py
CONFLICT (content): Merge conflict in tests/test_resolution.py
error: could not apply 9383d32... Fix tests to reflect correct dependencies.
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 9383d32... Fix tests to reflect correct dependencies.
@swastkk thanks please squash these 2 as well https://github.com/nexB/python-inspector/pull/119/commits/37d6d74ee51b9fca53a2637d01af425bdb422382 and https://github.com/nexB/python-inspector/pull/119/commits/fd7236ac8034bf47a56b32cd7db2c3fcb00a9ca8
@swastkk thanks please squash these 2 as well 37d6d74 and fd7236a
Actually I am unable to find this 37d6d74 on my system as this commit was a merge commit of remote skeleton as
commit 37d6d74ee51b9fca53a2637d01af425bdb422382
Merge: f2b19f9 1205bc0
Author: swastik <swastkk@gmail.com>
Date: Wed Jan 18 19:09:19 2023 +0530
Aligning project with Template skeleton
Signed-off-by: swastik <swastkk@gmail.com>
So, how to handel please share...
@TG1999 Review please :)
@swastkk please rebase your branch
@swastkk please rebase your branch
Sure, but for the rebase i have to pull the latest changes right? but it seems that the latest changes can't be fetched from the main
branch
and after writing command getting this-
@swastkk please don't use main branch for PR purposes, instead always cut out a branch and make PR from that. Please run git remote -v
and show the output for same here.
Getting this after git remote -v
git remote -v
origin https://github.com/swastkk/python-inspector (fetch)
origin https://github.com/swastkk/python-inspector (push)
skeleton git@github.com:nexB/skeleton (fetch)
skeleton git@github.com:nexB/skeleton (push)
Please run these commands:
git remote add upstream https://github.com/nexB/python-inspector
git fetch upstream main
git rebase upstream/main
And let us know if you are able to rebase with this ?
Please run these commands:
git remote add upstream https://github.com/nexB/python-inspector git fetch upstream main git rebase upstream/main
And let us know if you are able to rebase with this ?
Yes rebased, resolved the conflicts. BUT it is asking for a New PR
@swastkk you did rebase on which branch ? Can you please run git status
and show me the output for the command.
@swastkk you did rebase on which branch ? Can you please run
git status
and show me the output for the command.
Ohh my bad, i think i rebased my old branch packvers-added
instead of the changes i made in this PR which was in the main
branch :"(
I will rebase it with my main
branch and that PR issue will be resolved.
Done with rebase
I will rebase it with my
main
branch and that PR issue will be resolved.
Rebase DONE :checkered_flag:
@swastkk this PR now has unrelated changes : |
@swastkk this PR now has unrelated changes : |
What to do now :"( ?
@pombredanne what are your thoughts on this ?
@pombredanne what are your thoughts on this ?
IMHO there was a snafu during the rebase. The best way is likely to restart anew... from a clean latest main branch base and merging back the latest skeleton again, then force push this
@pombredanne what are your thoughts on this ?
IMHO there was a snafu during the rebase. The best way is likely to restart anew... from a clean latest main branch base and merging back the latest skeleton again, then force push this
Okay got it, making this PR as Draft for any reference and creating a New PR as soon as possible.
gentle ping ... we need the latest skeleton still :)
Ok I will have a look!
@swastkk please sync up with @TG1999 as he may started doing it already.
@TG1999 merged a different branch with the same effect, so I am closing this. Thank you ++ for your efforts in all cases that are much appreciated!
Merged the template skeleton into python-inspector project. SIgned-off-by: swastik swastkk@gmail.com