generated from goodbyekansas/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
β‘ π Change python default to pyproject.toml
The days of setuptools are numbered! Switch default component to use pyproject.toml, it is currently the least deprecated way of building python packages. Also sneak in some nifty features like adding a `run` command for clients and services. And add a corresponding entry point to their package. Also made the generated code pass `ruff`, it uses the `--unsafe-fixes` to add period at the end of docstrings if missing. Since it only runs on the templated code we know that it won't do anything else.
- Loading branch information
1 parent
d21f4f5
commit 44487c7
Showing
7 changed files
with
41 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
""" @desc@ """ | ||
"""@desc@""" | ||
|
||
|
||
def main() -> None: | ||
""" main function of @mainPackage@ """ | ||
"""Main function of @mainPackage@.""" | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
|
||
[project] | ||
name = "@pname@" | ||
version = "@version@" | ||
description = "@desc@" | ||
authors = [{name = "@author@", email = "@email@"}] | ||
|
||
[setuptools.packages.find] | ||
exclude = ["tests*"] | ||
|
||
[urls] | ||
Homepage = "@email@" | ||
|
||
[project.scripts] | ||
@entryPoint@ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" Tests for @mainPackage@ in @pname@ """ | ||
"""Tests for @mainPackage@ in @pname@.""" | ||
import @mainPackage@.main | ||
|
||
|
||
def test_main() -> None: | ||
""" Tests for the main function """ | ||
"""Tests for the main function.""" | ||
@mainPackage@.main.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters