Skip to content

Commit 3970b5d

Browse files
authored
Adding private PyPI release (#104)
* Adding private PyPI release * Enhancing README * Adapting version shown on docs * Typo and missing link
1 parent 2af7fad commit 3970b5d

File tree

3 files changed

+87
-8
lines changed

3 files changed

+87
-8
lines changed

.github/workflows/ci_cd.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ jobs:
174174
needs: [package]
175175
runs-on: ubuntu-latest
176176
steps:
177+
- name: Release to the private PyPI repository
178+
uses: pyansys/actions/release-pypi-private@v3
179+
with:
180+
library-name: ${{ env.PACKAGE_NAME }}
181+
twine-username: "__token__"
182+
twine-token: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
183+
177184
- name: Release to GitHub
178185
uses: pyansys/actions/release-github@v3
179186
with:
@@ -202,4 +209,4 @@ jobs:
202209
with:
203210
cname: ${{ env.DOCUMENTATION_CNAME }}
204211
token: ${{ secrets.GITHUB_TOKEN }}
205-
python-version: ${{ env.MAIN_PYTHON_VERSION }}
212+
python-version: ${{ env.MAIN_PYTHON_VERSION }}

README.rst

Lines changed: 77 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
PyDyna
2-
#############
1+
PyDyna
2+
######
33

44
PyDyna is a pythonic dyna package that aims to provide user a more convenient and complete way to
55
build up ansys-dyna input deck, submit to solver and finally post processing their results.
@@ -37,14 +37,82 @@ detailed description of the package.
3737

3838
Installation
3939
------------
40-
This package is not yet available on PyPI, so for now the only real
41-
option is for you to download the code from GitHub:
40+
41+
PyDyna has three installation modes: user, developer, and offline.
42+
43+
Install in user mode
44+
^^^^^^^^^^^^^^^^^^^^
45+
46+
Before installing PyDyna in user mode, make sure you have the latest version of
47+
`pip`_ with:
48+
49+
.. code:: bash
50+
51+
python -m pip install -U pip
52+
53+
Then, install PyDyna with:
54+
55+
.. code:: bash
56+
57+
python -m pip install ansys-dyna-core
58+
59+
.. caution::
60+
61+
PyDyna is currently hosted in a private PyPI repository. You must provide the index
62+
URL to the private PyPI repository:
63+
64+
* Index URL: ``https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/``
65+
66+
If access to this package registry is needed, email `[email protected] <mailto:[email protected]>`_
67+
to request access. The PyAnsys team can provide you a read-only token to be inserted in ``${PRIVATE_PYPI_ACCESS_TOKEN}``.
68+
Once you have it, run the following command:
69+
70+
.. code:: bash
71+
72+
pip install ansys-dyna-core --index-url=https://${PRIVATE_PYPI_ACCESS_TOKEN}@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/
73+
74+
Install in developer mode
75+
^^^^^^^^^^^^^^^^^^^^^^^^^
76+
77+
Installing PyDyna in developer mode allows you to modify the source and enhance it.
78+
79+
.. note::
80+
81+
Before contributing to the project, ensure that you are thoroughly familiar
82+
with the `PyAnsys Developer's Guide`_.
83+
84+
Start by cloning the repository
4285

4386
.. code::
4487
4588
git clone https://github.com/pyansys/pyDyna
4689
47-
and copy the required files
90+
and copy the required files.
91+
92+
Install in offline mode
93+
^^^^^^^^^^^^^^^^^^^^^^^
94+
95+
If you lack an internet connection on your installation machine (or you do not have access to the
96+
private Ansys PyPI packages repository), you should install PyDyna by downloading the wheelhouse
97+
archive from the `Releases Page <https://github.com/pyansys/pydyna/releases>`_ for your
98+
corresponding machine architecture.
99+
100+
Each wheelhouse archive contains all the Python wheels necessary to install PyDyna from scratch on Windows
101+
and Linux, from Python 3.7 to 3.10. You can install this on an isolated system with a fresh Python
102+
installation or on a virtual environment.
103+
104+
For example, on Linux with Python 3.7, unzip the wheelhouse archive and install it with:
105+
106+
.. code:: bash
107+
108+
unzip ansys-dyna-core-v0.2.dev0-wheelhouse-Linux-3.7.zip wheelhouse
109+
pip install ansys-dyna-core -f wheelhouse --no-index --upgrade --ignore-installed
110+
111+
If you are on Windows with Python 3.9, unzip the corresponding wheelhouse to a wheelhouse directory
112+
and install using the preceding command.
113+
114+
Consider installing using a `virtual environment <https://docs.python.org/3/library/venv.html>`_.
115+
48116

49117
Documentation
50118
-------------
@@ -115,3 +183,7 @@ License
115183
-------
116184
Distributed under the MIT license. See LICENSE in the root directory
117185
of the repository for details.
186+
187+
.. LINKS AND REFERENCES
188+
.. _pip: https://pypi.org/project/pip/
189+
.. _PyAnsys Developer's Guide: https://dev.docs.pyansys.com/

doc/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
PyDyna documentation 0.0.1
2-
===========================
1+
PyDyna documentation |version|
2+
===============================
33

44
.. include:: ../../README.rst
55

0 commit comments

Comments
 (0)