This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Page tree
Skip to end of metadata
Go to start of metadata

Setting up your development environment to contribute to SDAP repositories.  These instructions will be specific to incubator-sdap-ningesterpy

Requirements:

  • Git
  • Anaconda (v4.3.27)
  • Python 2.7
  • optional: PyCharm

Step-by-step guide

1. Create your conda environment:

conda env create -n sdap-ningesterpy python=2.7

source activate sdap-ningesterpy

2. Clone the incubator-sdap-nexusproto repository.

git clone https://github.com/apache/incubator-sdap-nexusproto

3. Fork the incubator-sdap-ningesterpy repository.

4. Clone the incubator-sdap-ningesterpy repository.

git clone https://github.com/<username>/incubator-sdap-ningesterpy

5. Set Up Remotes.

git remote add upstream https://github.com/apache/incubator-sdap-ningesterpy.git

git checkout master

git fetch upstream

git rebase upstream/master

6. Build the nexusproto Image.

cd incubator-sdap-nexusproto

./gradlew pythonInstall

7. Install Dependencies.

cd incubator-sdap-ningesterpy

python setup.py install

Make sure you have the channel conda-forge and the right versions of Anaconda and Python3

conda config --add channels conda-forge

conda install conda=4.3.27

conda install python=2.7

8. Create Branch & Make Changes.

Create a branch for the issue you are addressing:

git checkout -b SDAP-<issue number>

git status


After making your changes, commit to your branch:

git add .

git commit -a -m "SDAP-XXX descriptive title of SDAP-XXX"

9. Make a GitHub Pull Request.

IMPORTANT: Make sure you have rebased your SDAP-XXX branch to include the latest code from upstream/master before you do this.

git push origin master

git push origin SDAP-XXX

 

Using PyCharm

Build configurations:

  • Script: <filepath>/incubator-sdap-ningesterpy/sdap/ningesterpy.py
  • Environment variables: PYTHONUNBUFFERED=1

  • Python interpreter: ~/anaconda3/envs/incubator-sdap-ningesterpy/bin/python (from your conda environment)
  • Working directory: <filepath>/incubator-sdap-ningesterpy/sdap
  • Check:
    • Add content roots to PYTHONPATH
    • Add source roots to PYTHONPATH
    • Emulate terminal in output console
    • Activate tool window (optional)