Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix #412

Merged
merged 2 commits into from
Jun 15, 2024
Merged

hotfix #412

merged 2 commits into from
Jun 15, 2024

Conversation

blooop
Copy link
Collaborator

@blooop blooop commented Jun 15, 2024

Summary by Sourcery

This pull request introduces a setup.py file to the project, enabling packaging and distribution of the 'bencher' library. The setup includes metadata, package discovery, data files, and test requirements.

  • Build:
    • Added a setup.py file to define the packaging and distribution configuration for the 'bencher' library.

Copy link
Contributor

sourcery-ai bot commented Jun 15, 2024

Reviewer's Guide by Sourcery

This pull request introduces a new setup.py file to the project, which is essential for packaging and distributing the 'bencher' library. The setup.py file includes metadata about the package, such as its name, description, and test requirements.


Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @blooop - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 4 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

setup(
name=package_name,
description="A library for benchmarking code and generating reports for analysis",
# maintainer="austin.gregg-smith",
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Commented-out maintainer information

The maintainer and maintainer_email fields are commented out. If this is intentional for a temporary reason, consider adding a comment explaining why. Otherwise, it might be better to either include or remove these lines.

name=package_name,
description="A library for benchmarking code and generating reports for analysis",
# maintainer="austin.gregg-smith",
# maintainer_email="austin.gregg-smith@dyson.com",
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Commented-out maintainer email

Similar to the maintainer field, the maintainer_email field is commented out. If this is intentional for a temporary reason, consider adding a comment explaining why. Otherwise, it might be better to either include or remove these lines.

# maintainer_email="austin.gregg-smith@dyson.com",
packages=find_packages(exclude=["test.*", "test"]),
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Hardcoded paths in data_files

Consider using os.path.join for constructing file paths to ensure compatibility across different operating systems.

Suggested change
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
import os
data_files=[
("share/ament_index/resource_index/packages", [os.path.join("resource", package_name)]),
("share/" + package_name, ["package.xml"]),
]

packages=find_packages(exclude=["test.*", "test"]),
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
("share/" + package_name, ["package.xml"]),
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Hardcoded paths in data_files

Similar to the previous line, consider using os.path.join for constructing file paths to ensure compatibility across different operating systems.

Suggested change
("share/" + package_name, ["package.xml"]),
import os
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
(os.path.join("share", package_name), ["package.xml"]),
],


package_name = "bencher"

setup(
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation)

@blooop blooop merged commit 3faa473 into main Jun 15, 2024
3 checks passed
@blooop blooop deleted the hotfix/setuppy branch June 15, 2024 12:38
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.

1 participant