Skip to content

add new tests for pypi setup.py - #2465

Closed
Siddhant-K-code wants to merge 1 commit into
aboutcode-org:developfrom
Siddhant-K-code:siddhant-improving-pypi
Closed

Siddhant-K-code wants to merge 1 commit into
aboutcode-org:developfrom
Siddhant-K-code:siddhant-improving-pypi

Conversation

@Siddhant-K-code

@Siddhant-K-code Siddhant-K-code commented Mar 29, 2021

Copy link
Copy Markdown
Contributor

Fixes:

Added New Tests for pypi setup.py

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁

Signed-off-by: Siddhant Khare <siddhantkhare2694@gmail.com>
@Siddhant-K-code
Siddhant-K-code force-pushed the siddhant-improving-pypi branch from ac08081 to a99b671 Compare March 29, 2021 12:52
@Siddhant-K-code

Copy link
Copy Markdown
Contributor Author

@MaJuRG @pombredanne Please Review!

@steven-esser steven-esser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Siddhant-K-code What is the related issue these tests are for?

@Siddhant-K-code

Copy link
Copy Markdown
Contributor Author

@Siddhant-K-code What is the related issue these tests are for?

The issue is currently not there, but it can create a mess/issue if a setup.py file doesn't have a name. as similar as #2382 ( which get fixed by #2457 )

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!
Do you know if if is possible to even get a working setup.py without a version or without a name?

@Siddhant-K-code

Copy link
Copy Markdown
Contributor Author

Thanks!
Do you know if if is possible to even get a working setup.py without a version or without a name?

yes, it is a good practice to do so?

@pombredanne

Copy link
Copy Markdown
Member

Thanks!
Do you know if if is possible to even get a working setup.py without a version or without a name?

yes, it is a good practice to do so?

It is probably a bad practice, but we have to deal with it! It create an "UNKNOWN" name.

@pombredanne

Copy link
Copy Markdown
Member

Do you mind to rebase on the latest and we can then find a proper way to handle this case?

Comment on lines +237 to +238
except AttributeError as e:
assert "'NoneType' object has no attribute 'to_dict'" in str(e)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would probably be nicer to have a named exception for this or some custom logged error message so we know what exactly is wrong with the setup.py pypi package (in this case, a missing name field).

pombredanne added a commit that referenced this pull request Sep 22, 2021
Improve tests and ensure we can handle nameless PyPI packages.

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
pombredanne added a commit that referenced this pull request Sep 22, 2021
Improve tests and ensure we can handle nameless PyPI packages.

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
pombredanne added a commit that referenced this pull request Sep 23, 2021
Description lines are sometimes padded with 8 spaces. When this happen
these need to be trimmed and this was not taking place correctly

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne

Copy link
Copy Markdown
Member

This has been merged with accd630 after a rebase. Thank you ++
Closing now

@pombredanne pombredanne closed this Jan 8, 2022
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.

3 participants