Skip to content

Conversation

swastkk
Copy link
Contributor

@swastkk swastkk commented Jan 18, 2023

Merged the template skeleton into python-inspector project.
SIgned-off-by: swastik [email protected]

chinyeungli and others added 15 commits September 22, 2022 16:45
Signed-off-by: Chin Yeung Li <[email protected]>
The following images are deprecated in GitHub actions and Azure DevOps:

* `ubuntu-18.04` : actions/runner-images#6002
* `macos-10.15` : actions/runner-images#5583

Due to this there was failing tests due to planned brownouts.

Updated ubuntu18 to ubuntu22
Updated macos-1015 to macos12

Signed-off-by: Chin Yeung Li <[email protected]>
    * Rename references to etc/release with etc/scripts

Signed-off-by: Jono Yang <[email protected]>
3.7 is not available anymore on newer OSes and is retired in 2023.

Signed-off-by: Philippe Ombredanne <[email protected]>
…pdate_ci

Remove thirdparty and update ci
* import update in src/scripts/utils_dejacode

* Packvers replacing packaging in other src/scripts

* Added packvers in src/scripts/requirments.txt

Signed-off-by: swastik <[email protected]>
Replace packaging with packvers in src/scripts
Signed-off-by: Philippe Ombredanne <[email protected]>
Also test on latest Ubuntu and macOS

Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
@swastkk swastkk requested a review from TG1999 January 19, 2023 14:26
@swastkk swastkk changed the title Aligning project with template skeleton Merge latest skeleton in python-inspector Jan 24, 2023
@swastkk
Copy link
Contributor Author

swastkk commented Jan 27, 2023

@TG1999 review please :)

@TG1999
Copy link
Contributor

TG1999 commented Jan 30, 2023

@swastkk tests are failing, please look into this

@swastkk
Copy link
Contributor Author

swastkk commented Jan 30, 2023

@swastkk tests are failing, please look into this

okay :)

@swastkk
Copy link
Contributor Author

swastkk commented Feb 4, 2023

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) ========================

@swastkk
Copy link
Contributor Author

swastkk commented Feb 4, 2023

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': [],[email protected]'}]} == {'files': [],[email protected]'}]}
E         Omitting 1 identical items, use -vv to show
E         Differing items:
E         {'resolution': [{'dependencies': [], 'package': 'pkg:pypi/[email protected]'}, {'dependencies': ['pkg:pypi/[email protected]', 'pk...: 'pkg:pypi/[email protected]'}, {'dependencies': ['pkg:pypi/[email protected]'], 'package': 'pkg:pypi/[email protected]'}]} != {'resolution': [{'dependencies': [], 'package': 'pkg:pypi/[email protected]'}, {'dependencies': ['pkg:pypi/[email protected]', 'pk...: 'pkg:pypi/[email protected]'}, {'dependencies': ['pkg:pypi/[email protected]'], 'package': 'pkg:pypi/[email protected]'}]}
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...?

@TG1999
Copy link
Contributor

TG1999 commented Feb 6, 2023

@swastkk you can regen the test output by running these commands

$ source venv/bin/activate
$ PYINSP_REGEN_TEST_FIXTURES=yes pytest -vvs

@swastkk
Copy link
Contributor Author

swastkk commented Feb 6, 2023

@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 :)

@TG1999
Copy link
Contributor

TG1999 commented Feb 6, 2023

@swastkk please squash commits from 37d6d74 to 440b1ea

@swastkk

This comment was marked as resolved.

Copy link
Contributor

@TG1999 TG1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@TG1999 TG1999 requested a review from pombredanne April 11, 2023 13:02
@swastkk
Copy link
Contributor Author

swastkk commented Apr 11, 2023

@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

Screenshot_2023-04-11_19-11-44
Screenshot_2023-04-11_19-15-03

and after writing command getting this-
Screenshot_2023-04-11_19-13-58

@TG1999
Copy link
Contributor

TG1999 commented Apr 11, 2023

@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.

@swastkk
Copy link
Contributor Author

swastkk commented Apr 11, 2023

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	[email protected]:nexB/skeleton (fetch)
skeleton	[email protected]:nexB/skeleton (push)

@TG1999
Copy link
Contributor

TG1999 commented Apr 11, 2023

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 ?

@swastkk
Copy link
Contributor Author

swastkk commented Apr 11, 2023

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
Screenshot_2023-04-11_20-10-44

@TG1999
Copy link
Contributor

TG1999 commented Apr 11, 2023

@swastkk you did rebase on which branch ? Can you please run git status and show me the output for the command.

@swastkk
Copy link
Contributor Author

swastkk commented Apr 11, 2023

@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 :"(

Signed-off-by: Philippe Ombredanne <[email protected]>
@swastkk
Copy link
Contributor Author

swastkk commented Apr 11, 2023

I will rebase it with my main branch and that PR issue will be resolved.

pombredanne and others added 7 commits April 11, 2023 20:21
Also test on latest Ubuntu and macOS

Signed-off-by: Philippe Ombredanne <[email protected]>
    * Rename references to etc/release with etc/scripts

Signed-off-by: Jono Yang <[email protected]>
3.7 is not available anymore on newer OSes and is retired in 2023.

Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: swastik <[email protected]>
- Test errors resolve in tests/resolution.py
- Bump the requirments packages to latest version
- Test error resolve in test_resolution.py
- Tests updated with PYINSP_REGEN_TEST_FIXTURES

Signed-off-by: Swastik Sharma <[email protected]>
@swastkk
Copy link
Contributor Author

swastkk commented Apr 11, 2023

Done with rebase

I will rebase it with my main branch and that PR issue will be resolved.

Rebase DONE 🏁

@TG1999
Copy link
Contributor

TG1999 commented Apr 11, 2023

@swastkk this PR now has unrelated changes : |

@swastkk
Copy link
Contributor Author

swastkk commented Apr 11, 2023

@swastkk this PR now has unrelated changes : |

What to do now :"( ?

@TG1999
Copy link
Contributor

TG1999 commented Apr 11, 2023

@pombredanne what are your thoughts on this ?

@pombredanne
Copy link
Member

@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

@swastkk
Copy link
Contributor Author

swastkk commented Apr 11, 2023

@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.

@pombredanne pombredanne mentioned this pull request Aug 3, 2023
@pombredanne
Copy link
Member

gentle ping ... we need the latest skeleton still :)

@swastkk
Copy link
Contributor Author

swastkk commented Oct 10, 2023

Ok I will have a look!

@pombredanne
Copy link
Member

@swastkk please sync up with @TG1999 as he may started doing it already.

@pombredanne
Copy link
Member

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants