This repository is intended for hosting Brooklin test automation code.
-
Install Python 3.7
- For Linux, you can use
yum
. Here's how you can check if you already have it.This will print a list of already installed Python interpreters. You can check the exact path of the one you would like to use by running:yum list installed | grep LNKD-python
# Replace LNKD-python37_3_7_0.x86_64 with the one of interest rpm -ql LNKD-python37_3_7_0.x86_64
- For macOS, you can download the latest 3.7.x installer from the Python releases page. It typically installs to the following location on disk:
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
- For Linux, you can use
-
Install
pipenv
Make sure to use the same Python you installed in step 1.
# on Linux sudo /export/apps/python/3.7/bin/python3 -m pip install pipenv # on macOS sudo /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pip install pipenv
-
Upload your LinkedIn SSH keys to GitHub if you haven't done that before. Instructions for doing so can be found on this page.
-
Clone the repo
git clone [email protected]:linkedin/brooklin-certification.git
-
Open the repo using IntelliJ
- Import Project
- Create project from existing sources
- Open any of the Python files and click IntelliJ's tips regarding using Pipenv and installing dependencies
-
Initialize your virtual environment using
pipenv
# on Linux /export/apps/python/3.7/bin/python3 -m pipenv install --python /export/apps/python/3.7/bin/python3 # on macOS /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pipenv install --python /Library/Frameworks/Python.framework/Versions/3.7/bin/python3
-
Activate your virtual environment
# on Linux /export/apps/python/3.7/bin/python3 -m pipenv shell python src/run-tests.py -h # on macOS /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m pipenv shell python src/run-tests.py -h
To package all the scripts into a Python source tar.gz, you can run:
cd brooklin-certification
pipenv shell
python setup.py sdist