Skip to content

Migrate to pyproject.toml #93

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

Merged
merged 11 commits into from
Nov 28, 2021

Conversation

mateuszmidor
Copy link
Contributor

KNTK-367

  • Migrate configuration to pyproject.toml to ensure consistency between github actions and local runs.

@mateuszmidor mateuszmidor force-pushed the migrate_to_pyproject.toml branch 6 times, most recently from ccdfafb to 5d02089 Compare November 19, 2021 13:23
@mateuszmidor mateuszmidor force-pushed the migrate_to_pyproject.toml branch from 5d02089 to e79711c Compare November 19, 2021 13:27
Copy link
Contributor

@danielfurman danielfurman left a comment

Choose a reason for hiding this comment

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

I like this unification!

danielfurman
danielfurman previously approved these changes Nov 22, 2021
Copy link
Contributor

@mmac-m3a mmac-m3a left a comment

Choose a reason for hiding this comment

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

I in general like this change, however we cannot force black to always run in check mode in pyproject.toml.

@mateuszmidor mateuszmidor force-pushed the migrate_to_pyproject.toml branch 2 times, most recently from db565ba to 87e53fc Compare November 23, 2021 12:21
@mateuszmidor mateuszmidor force-pushed the migrate_to_pyproject.toml branch 3 times, most recently from a6f909a to 2de8b20 Compare November 23, 2021 15:04
danielfurman
danielfurman previously approved these changes Nov 23, 2021
ignore_missing_imports = true
exclude = "(generated|build)/"

[[tool.mypy.overrides]]
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the double square brackets required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the whole section is redundant. Removing

packages=PACKAGES,
package_dir={pkg: os.path.join(*pkg.split(".")) for pkg in PACKAGES},
cmdclass={"pylint": PylintCmd, "mypy": MypyCmd},
cmdclass={"pylint": Pylint, "mypy": Mypy, "black": Black, "pytest": Pytest},
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also have custom command for isort? Or maybe we could merge commands for black and isort into a single comand named (for example) format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add "format" command to do black and isort in a single shot

@@ -0,0 +1,268 @@
0.
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of those 2 files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unintentionally committed; removing

Copy link
Contributor

Choose a reason for hiding this comment

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

Done

mmac-m3a
mmac-m3a previously approved these changes Nov 24, 2021
Copy link
Contributor

@mmac-m3a mmac-m3a left a comment

Choose a reason for hiding this comment

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

Good to go in. Consider the one non-critical comment at the earlies convenience.
I'll wait for @Fenthick to approve too.


assert library_found, "Can't import '" + library + "'"
assert error is None, f'Can\'t import "{library}": {error}'
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep double-quotes at the top level, like this:

assert error is None, f"Can't import '{library}': {error}"

It is more readable and black has no problem with this (at least in my quick test).

@mmac-m3a mmac-m3a merged commit 58ec400 into kentik:main Nov 28, 2021
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