Skip to content

Commit

Permalink
Add entry point for the GUI (run swolfpy in terminal)
Browse files Browse the repository at this point in the history
  • Loading branch information
msm-sardar committed Feb 21, 2024
1 parent f6d4803 commit db0a062
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
History
=======

1.3.0 (2024-02-20)
------------------

* Add entry point for the GUI (run swolfpy in terminal)


1.2.0 (2023-07-30)
------------------

Expand Down
14 changes: 11 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,17 @@ Installation

python

8- Run swolfpy in python::
8- Run swolfpy

import swolfpy as sp
sp.swolfpy()
- In terminal::

swolfpy
# or
python -m swolfpy

- In python::

import swolfpy as sp
sp.SwolfPy()

.. endInstallation
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ Homepage = "https://swolfpy-project.github.io/"
Documentation = "https://swolfpy.readthedocs.io/en/latest/"
"Source Code" = "https://github.com/SwolfPy-Project/swolfpy"

[project.scripts]
swolfpy = "swolfpy:SwolfPy"

[tool.setuptools.dynamic]
version = {attr = "swolfpy.__version__"}
readme = {file = ["README.rst", "HISTORY.rst"]}
Expand Down
6 changes: 3 additions & 3 deletions swolfpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
"Optimization",
"Monte_Carlo",
"MyQtApp",
"swolfpy",
"SwolfPy",
]

__version__ = "1.2.0"
__version__ = "1.3.0"


class swolfpy:
class SwolfPy:
def __init__(self):
if not QtWidgets.QApplication.instance():
self.app = QtWidgets.QApplication(sys.argv)
Expand Down
4 changes: 4 additions & 0 deletions swolfpy/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import SwolfPy

if __name__ == "__main__":
SwolfPy()

0 comments on commit db0a062

Please sign in to comment.