dev_install - capn-freako/PyBERT GitHub Wiki

Developer Installation Instructions

NOTE: These instructions changed dramatically with the release of PyBERT v6, because PyBERT is now Pip-installable; no more Conda! :)

NOTE: These instructions are for developers only! If you are a user, who does not intend to modify the PyBERT source code, back up and choose Instant Gratification, instead.

NOTE: You may also wish to follow these instructions if you want to test the code in an unreleased development branch to, for instance, provide feedback to the developers.

NOTE: I'm assuming you're working at a Bash, or Sh, prompt. If you're using Csh, please, make the necessary translations to the following commands.

NOTE: The new development infrastructure is exclusively make driven. Enter just make without arguments, to see all available targets with descriptions.

Installing PyBERT in Development mode.

If you wish to install PyBERT in a way that allows you to see immediate feedback to any changes you make to the PyBERT source code, follow these steps:

CAUTION: Do NOT skip step #1! It provides protection to your pre-existing, system Python installation. By doing your PyBERT development work inside a new virtual Python environment intended only for that purpose, you will prevent damage to your system Python environment.

NOTE: Your new virtual environment will be set up to use whichever version of Python you run when you create it.

  1. Create and activate a custom virtual environment for PyBERT development:

    • python3 -m venv ~/.venv/pybert-dev (If that fails, try just "python".)
    • source ~/.venv/pybert-dev/bin/activate (Windows users: source ~\.venv\pybert-dev\Scripts\activate)

    NOTE: At this point, you should see (pybert-dev) in your prompt.

  2. Install PyBERT and its dependencies into the new environment:

    • pip install PipBERT (Note the package name: Pip BERT!)
  3. Fork/clone the PyBERT GitHub repository to your machine.

    1. From the main PyBERT repository, make your own fork of PyBERT by clicking where shown:

      GitHub Screen Shot Showing Fork Icon

    2. From your new fork of PyBERT, clone, or download, to your working machine, by clicking where shown:

      GitHub Screen Shot Showing Clone Icon

      and entering the following command:

      git clone <PASTE>

    Note: If you don't wish to create your own fork of the PyBERT project, you may just clone mine. However, note that you won't be able to push any changes you make to the Python source code back up to GitHub!

  4. Move into the newly created PyBERT/ directory and install PyBERT in "development" mode:

    pip install -e .

  5. If you wish to develop on something other than the main branch then check it out:

    git checkout <branch>

  6. Test your new development mode installation of PyBERT, by executing the following command:

    python -m pybert

    You should see the usual PyBERT GUI application appear on your screen.

  7. Enter the command: make, without any arguments, to see a list of targets available to you.

You are now ready to begin changing the PyBERT source code and testing those changes. Of course, you must quit and restart PyBERT, after making a source code change, in order to see its effects.

Installing PyIBIS-AMI in Development mode.

If you also wish to install PyIBIS-AMI in development mode, enter the following commands from the same command prompt and from within the PyBERT/ directory:

  1. git submodule update --init PyAMI/
  2. pip install -e ./PyAMI/
  3. python -c "import pyibisami as dut; print(dut.__file__)"

In response to the last command, you should see something like:

<path to PyBERT project>/PyAMI/pyibisami/__init__.py

⚠️ **GitHub.com Fallback** ⚠️