.. _install_check_install: 

Checking The |popy| Installation
##################################

Having opened a :ref:`opened a PoPy terminal <open_a_popy_command_prompt>`, 
the first screen you see
shows the help page for |popy| which lists the available |popy| commands.
This help is available at any time by typing 

.. code-block:: console

    popy

in any terminal (|ie| command prompt or Powershell).

In general, you use |popy| by calling

.. code-block:: console

    popy <command> <arguments>

in a |popy| terminal where ``<command>`` is an action that applies on its own
or to one or more ``<arguments>``.

To verify that |popy| is working, for example, run

.. code-block:: console

    popy info

which, if |popy| has installed successfully, will show 
detailed information on the installation similar to:
 
.. literalinclude:: popy_info_output_trial_mode.inc
    :language: console

(The output above shows information on a brand new installation of |popy| 
that is in its 60-day trial period and will look different once |popy|
has been :ref:`activated <activation>`.)


.. _validation:

|popy| Validation
===================================

Because computers vary in their architecture, it is possible that 
running the same code and the same script could give different results 
on different installations. 

We therefore bundle a tool, :ref:`popy_validate`, 
that runs |popy| on a suite of examples and compares the results generated 
locally on your hardware to some reference results generated 
on the |popy| development team's hardware. If the results agree sufficiently
well then |popy| is ready to use.

These :ref:`validation_examples` are interesting examples drawn from the 
|ddmore| repository that cover models with different features, 
|eg| inter-occasion variability.

To run this suite of tests, simply run

.. code-block:: console

    popy validate

from a :ref:`PoPy terminal<open_a_popy_command_prompt>`.
    
Some of the examples take a few minutes to run 
and the full validation can take about 20 minutes on older hardware
but you should only need to run the validation once.

If the validation is successful, you should get output on the command line as 
the validation examples are processed. The end of the output should look like:
    
.. literalinclude:: popy_validate_output.inc
    :language: console 

This output will also be written to the log file 
``validation_script.pyml.run.main.log`` in the ``validation``
subdirectory of your |popy| installation.

This log file can be used as a form of verification for a validation report,
if |popy| is to be used in a commercial setting.

.. note::

    If validation fails for any reason, 
    please get in touch with us to diagnose the problem.


