Add pyproject.toml

This commit is contained in:
Magnus Ulimoen 2022-04-06 23:03:54 +02:00
parent cfeb30fac0
commit 05873c0e22
3 changed files with 27 additions and 1 deletions

4
multigrid/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
build
dist
*.egg-info
.venv

View File

@ -267,7 +267,7 @@ def read_from_file(filename):
return grids, file["t"]
if __name__ == "__main__":
def main():
parser = ArgumentParser(description="Plot a solution from the eulersolver")
parser.add_argument("filename", metavar="filename", type=str)
parser.add_argument("-s", help="Save figure", action="store_true", dest="save")
@ -295,3 +295,7 @@ if __name__ == "__main__":
plot_pressure_slider(grids, t)
else:
plot_pressure(grids, args.save, args.output)
if __name__ == "__main__":
main()

18
multigrid/pyproject.toml Normal file
View File

@ -0,0 +1,18 @@
[project]
name = "plotter"
version = "0.0.1"
dependencies = [
"matplotlib",
"numpy",
"h5py",
]
[project.scripts]
eulerplot = "plotter.plotter:main"
[tool.setuptools]
packages = ["plotter"]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"