diff --git a/README.rst b/README.rst index 3829060..856ac0f 100644 --- a/README.rst +++ b/README.rst @@ -36,9 +36,10 @@ .. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue :target: https://github.com/diffpy/diffpy.apps/issues -User applications to help with tasks using diffpy packages +User applications to help with tasks using diffpy packages. Currently it +contains -* LONGER DESCRIPTION HERE +- `runmacro`: A runner for DiffPy macro files. For more information about the diffpy.apps library, please consult our `online documentation `_. @@ -63,7 +64,7 @@ To add "conda-forge" to the conda channels, run the following in a terminal. :: We want to install our packages in a suitable conda environment. The following creates and activates a new environment named ``diffpy.apps_env`` :: - conda create -n diffpy.apps_env diffpy.apps + conda create -n diffpy.apps_env diffpy.apps python=3.13 conda activate diffpy.apps_env The output should print the latest version displayed on the badges above. diff --git a/news/update-readme.rst b/news/update-readme.rst new file mode 100644 index 0000000..3091d43 --- /dev/null +++ b/news/update-readme.rst @@ -0,0 +1,24 @@ +**Added:** + +* Also add ``diffpy.apps`` as an entry point. +* Add ``runmacro`` in the ``README``. + +**Changed:** + +* Use ``python=3.13`` as default before ``python=3.14`` is supported by ``diffpy.cmi``. + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/pyproject.toml b/pyproject.toml index 92f67cb..ce61d46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ exclude = [] # exclude packages matching these glob patterns (empty by default) namespaces = false # to disable scanning PEP 420 namespaces (true by default) [project.scripts] +"diffpy.apps" = "diffpy.apps.apps:main" "diffpy.app" = "diffpy.apps.apps:main" [tool.setuptools.dynamic] diff --git a/src/diffpy/apps/apps.py b/src/diffpy/apps/apps.py index ef5ee44..95ae493 100644 --- a/src/diffpy/apps/apps.py +++ b/src/diffpy/apps/apps.py @@ -29,8 +29,8 @@ def main(): parser.add_argument( "--version", - action="store_true", - help="Show the program's version number and exit", + action="version", + version=f"diffpy.apps {__version__}", ) apps_parsers = parser.add_subparsers( title="Available applications", diff --git a/src/diffpy/apps/functions.py b/src/diffpy/apps/functions.py deleted file mode 100644 index e7e2c8e..0000000 --- a/src/diffpy/apps/functions.py +++ /dev/null @@ -1,31 +0,0 @@ -import numpy as np - - -def dot_product(a, b): - """Compute the dot product of two vectors of any size. - - Ensure that the inputs, a and b, are of the same size. - The supported types are "array_like" objects, which can - be converted to a NumPy array. Examples include lists and tuples. - - Parameters - ---------- - a : array_like - The first input vector. - b : array_like - The second input vector. - - Returns - ------- - float - The dot product of the two vectors. - - Examples - -------- - Compute the dot product of two lists: - >>> a = [1, 2, 3] - >>> b = [4, 5, 6] - >>> dot_product(a, b) - 32.0 - """ - return float(np.dot(a, b))