File tree Expand file tree Collapse file tree 5 files changed +41
-23
lines changed
doc/source/getting_started Expand file tree Collapse file tree 5 files changed +41
-23
lines changed Original file line number Diff line number Diff line change 44Install packages
55================
66
7- The ``ansys-sherlock `` package supports Python 3.7 through Python 3.10 on Windows.
7+ The ``ansys-sherlock-core `` package supports Python 3.7 through Python 3.10 on Windows.
88
99To use PySherlock, you must download and install both the ``ansys-api-sherlock ``
10- and ``ansys-sherlock `` packages.
10+ and ``ansys-sherlock-core `` packages. By using ``pip ``, ``ansys-api-sherlock `` is
11+ installed as part of ``ansys-sherlock-core ``. Run the following to install
1112
12- .. TODO: uncomment the following lines when PySherlock is released to the public PyPi.
13- Install the latest ``ansys-sherlock-core`` package from PyPi with:
13+ the publicly distributed version of the package.
1414
15- .. .. code::
15+ .. code ::
1616
17- .. pip install ansys-sherlock-core
17+ pip install ansys-sherlock-core
18+
19+ If you want to install the ``ansys-api-sherlock `` and ``ansys-sherlock-core `` packages
20+ from its source code directly, follow the upcoming instructions:
1821
1922#. Download the latest ``ansys-api-sherlock `` package by running this
2023 ``git clone `` command:
@@ -35,7 +38,7 @@ and ``ansys-sherlock`` packages.
3538 cd ansys-api-sherlock
3639 pip install -e .
3740
38- #. Download the latest ``ansys-sherlock `` package by running this
41+ #. Download the latest ``ansys-sherlock-core `` package by running this
3942 ``git clone `` command:
4043
4144 .. code ::
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
44
55[project ]
66name = " ansys-sherlock-core"
7- version = " 0.1 .dev0"
7+ version = " 0.2 .dev0"
88description = " A python wrapper for Ansys Sherlock"
99readme = " README.rst"
1010requires-python = " >=3.8,<4"
Original file line number Diff line number Diff line change 11# © 2023 ANSYS, Inc. All rights reserved.
22
33"""PySherlock client library."""
4- from ansys .sherlock .core ._version import __version__
4+
5+ # Version
6+ # ------------------------------------------------------------------------------
7+
8+ try :
9+ import importlib .metadata as importlib_metadata
10+ except ModuleNotFoundError : # pragma: no cover
11+ import importlib_metadata # type: ignore
12+
13+ __version__ = importlib_metadata .version (__name__ .replace ("." , "-" ))
14+ """PySherlock version."""
15+
16+ # Ease import statements
17+ # ------------------------------------------------------------------------------
18+
519from ansys .sherlock .core .logging import Logger
620
721LOG = Logger ("sherlock" )
8- SHERLOCK = None
22+ """PySherlock logger."""
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ from ansys .sherlock .core import __version__
2+
3+
4+ def test_pkg_version ():
5+ try :
6+ import importlib .metadata as importlib_metadata
7+ except ModuleNotFoundError : # pragma: no cover
8+ import importlib_metadata
9+
10+ # Read from the pyproject.toml
11+ # major, minor, patch
12+ read_version = importlib_metadata .version ("ansys-sherlock-core" )
13+
14+ assert __version__ == read_version
You can’t perform that action at this time.
0 commit comments