.. _activation:

|popy| Activation
#################

|popy| comes with a |trial_length| day trial period. To continue using |popy| after this period has expired, you will need a :ref:`licence<licences>` to activate the product.

You should have been supplied with a free activation code if you signed up for the |popy| academic version.

To obtain a valid |popy| licence see :ref:`licences`. 


.. _activation_status: 

Activation Status
===================

To check the current activation status and licencing of your |popy| installation, :ref:`open_a_popy_command_prompt` and type:-

.. code-block:: console

    popy_info
 
If you see output like this:-

.. code-block:: console

    INFO - product_key=None

Then |popy| is not yet activated. The trial period may or may not be active, which determines if |popy| will run without a |prod_key|. If you see the following:-

.. code-block:: console

    INFO - should_run=True
    
then |popy| is within the trial period.

If you have a |prod_key|, but this line is displayed:-

.. code-block:: console

    INFO - should_run=False

Then the |prod_key| is invalid and you need to obtain a new |prod_key| to successfully :ref:`activate_popy`.
 
.. _activate_popy:

Activate |popy|
===============

To activate |popy| :ref:`open_a_popy_command_prompt` and type:-

.. code-block:: console

    popy_activate XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
  
Where XXXX |etc|, is the |prod_key| supplied by |wdl|. Just cut and paste the |prod_key| from the email.

.. _verify_activation:

Verify Activation
-----------------

Run:-

.. code-block:: console

    popy_info

and you should see something like this:-
    
.. literalinclude:: popy_info_output_activated.inc
    :language: console 

showing the paths used by |popy|, a few internal variables, and details about the licence (if you have run :ref:`popy_activate` successfully).

.. _deactivate_popy:

Deactivate |popy|
=================

To remove a |popy| |prod_key| from your machine :ref:`open_a_popy_command_prompt` and type:-

.. code-block:: console

    popy_deactivate

.. _verify_deactivation:
 
Verify Deactivation
-------------------

Run:-

.. code-block:: console

    popy_info

and you should see something like this:-

.. code-block:: console

    INFO - product_key=None
 
.. _transfer_product_key_between_machines:

Transfer Product Key Between Machines
=====================================

If you wish to move a |popy| licence from one computer to another. Then you simply need to :ref:`deactivate_popy` on the current machine, noting the current |prod_key|. And then :ref:`activate_popy` on the new machine, using the same |prod_key|.

Note if you activate the same |prod_key| on multiple machines and you exceed the number of activations associated with the |prod_key|, this will invalidate your licence and may cause problems.


.. _licences:

Licensing
============

There are currently two licences for |popy|:-

|popy| *Academic* Licence
    A free licence for |popy| distributed to academics, which may |not| be used for commercial analyses.

|popy| *Commercial* Licence
    A paid licence granting the end user one year of |popy| usage on a single machine. A commercial license is required to use |popy| in regulator submissions or publications regarding work that is sponsored or funded by drug companies |ie| research that leads to profit.

Both licences comes with a |trial_length| day trial period, so you can try out |popy| before obtaining a |prod_key|.
  
All versions of |popy| have the same functionality. There are no *crippled* versions. Any version of |popy| can be upgraded to the latest version of |popy| at any time. The terms of the licence (|ie| duration |etc|) are unaffected by upgrading |popy|. 

Please email the following address for further information:-

.. parsed-literal::

    |email|
 
We will endeavour to respond promptly to questions regarding our licencing.

