Skip to content
Snippets Groups Projects
Commit 4f4180bb authored by Viktor Vorobev's avatar Viktor Vorobev Committed by Eloy Retamino
Browse files

Merged in NRRPLT-8403-pynrp-package (pull request #36)

NRRPLT-8403 pynrp auto package build and push to nexus

* [NRRPLT-8403] PyPi package build and push

* [NRRPLT-8403] fetch tags

* [NRRPLT-8403] update docs

* [NRRPLT-8403] update docs

* Merged development into NRRPLT-8403-pynrp-package
* [NRRPLT-8103] Update instructions


Approved-by: Eloy Retamino
parent 97ef6b26
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
set -e
# Build package
git fetch --tags
PYNRP_VERSION=$(git describe --tags --always)
echo "${PYNRP_VERSION}"
echo "VERSION = \"${PYNRP_VERSION}\"" > hbp_nrp_virtual_coach/pynrp/version.py
pushd hbp_nrp_virtual_coach
python3 setup.py sdist bdist_wheel
popd
......@@ -34,6 +34,8 @@ pipeline {
TOPIC_BRANCH = "${TOPIC_BRANCH}"
DEFAULT_BRANCH = "${DEFAULT_BRANCH}"
NexusPyPiRepoUrl = "https://nexus.neurorobotics.ebrains.eu/repository/nrp-pypi-internal/"
CODE_COVERAGE_LINE = 74
}
agent {
......@@ -107,6 +109,23 @@ pipeline {
}
}
}
stage('Create package') {
steps {
bitbucketStatusNotify(buildState: 'INPROGRESS', buildName: 'Building pynrp')
dir(env.GIT_CHECKOUT_DIR){
// tbuild package
sh 'bash ./.ci/whl-package.bash'
// upload package
withCredentials([usernamePassword(credentialsId: 'nexusadmin', usernameVariable: 'USER', passwordVariable: 'PASSWORD')])
{
sh 'pip3 install twine'
sh 'twine upload -u $USER -p $PASSWORD --repository-url ${NexusPyPiRepoUrl} hbp_nrp_virtual_coach/dist/*.whl'
}
}
}
}
}
post {
......
......@@ -14,4 +14,5 @@ Virtual Coach developer space
.. toctree::
:maxdepth: 2
python_api
\ No newline at end of file
python_api
pypi
\ No newline at end of file
.. _virtual-pypi:
.. sectionauthor:: Viktor Vorobev <vorobev@in.tum.de>
.. seealso::
:ref:`User manual<virtual_coach_intro>` /
:ref:`Tutorials<virtual-coach-tutorial>` /
:ref:`Developer pages<virtual_coach_dev_space>`
Stand-alone installation
========================
The Virtual Coach is packed and published to PyPi repository.
The official releases can be found `here <https://pypi.org/project/pynrp/>`_ and you can install it as
.. code-block:: bash
pip3 install pynrp
The intermediate packages are stored in internal PyPi repository with developer-only access. One requires the username and the password for the developers Nexus server to get them. The following command will help to install the specific version
.. code-block:: bash
pip3 install pynrp==<version> --index-url https://<user>:<pass>@nexus.neurorobotics.ebrains.eu/repository/nrp-pypi/simple/ --trusted-host nexus.neurorobotics.ebrains.eu --use-deprecated=legacy-resolver
where
* :code:`<user>` is your Nexus username;
* :code:`<pass>` is your Nexus password;
* :code:`<version>` is a package version, that is determined as :code:`git describe --tags --always` of your commit.
You can browse the available versions `here <https://nexus.neurorobotics.ebrains.eu/#browse/browse:nrp-pypi-internal>`_.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment