<commit_before>
This file is intended for my own use, for summarizing how to package, test, release...

## Test in a clean venv:

Package up in the 'normal' python environment:
    cd ~/Dropbox/py/PyNOMAD
    # rm -rf dist/*  # you probably want to do this to clean up
    python setup.py sdist

Create a venv & install pynomad & develop pynomad with:
    cd ~/Dropbox/py/PyNOMAD
    canopy_cli venv -s test-venv
    source test-venv/bin/activate
    python setup.py develop
    cd test-venv
    ipython
    import nomad
    # TODO: fix next few lines
    py2mass.set_2mass_path('/Volumes/Offloader/2MASS/')
    ra_range = [281., 281.05]  #    RA is in degrees
    dec_range = [-30.6, -30.55]  #  Dec is in degrees
    stars = py2mass.fetch_2mass_psc_box(ra_range, dec_range)



## Original upload to github

Create a blank PyNOMAD repository on github, and then:

    cd /Users/hroe/Dropbox/py/PyNOMAD
    git remote add origin <EMAIL>:henryroe/PyNOMAD.git
    git push -u origin master



## Upload a version to github

TODO: develop a checklist for before uploading

    cd /Users/hroe/Dropbox/py/PyNOMAD
    versionnumber=`python -c "execfile('nomad/__about__.py') ; print(__version__)"`
    git tag -a $versionnumber -m "Tagged for version "$versionnumber
    git push origin $versionnumber
    

## Upload a version to pypi

[following along from here](https://python-packaging-user-guide.readthedocs.org/en/latest/distributing.html)

TODO: develop a checklist for before uploading

    cd /Users/hroe/Dropbox/py/PyNOMAD
    # rm -rf dist/*  # you probably want to do this to clean up
    # rm -rf build   # you may want to do this to clean up?
    python setup.py sdist

Test is working in a 'clean' python install:

    cd /Users/hroe/Dropbox/py/pynomad
    rm -rf minimal-venv
  
v1:  quickie where you rely on the existing canopy packages (just double check you're not being fooled by an already installed PyNOMAD!)

    cd ~/Dropbox/py/PyNOMAD
    canopy_cli venv -s test-venv
    source test-venv/bin/activate
    cd ~/Dropbox/py/PyNOMAD/dist/
    tar -zxvf PyNOMAD-0.1.2.tar.gz
    cd PyNOMAD-0.1.2
    python setup.py install
    ipython
    import pynomad
    # TODO update next few lines
    pynomad.set_2mass_path('/Volumes/Offloader/2MASS/')
    ra_range = [281., 281.05]  #    RA is in degrees
    dec_range = [-30.6, -30.55]  #  Dec is in degrees
    stars = py2mass.fetch_2mass_psc_box(ra_range, dec_range)
    print py2mass.__version__
    
---- end of test of sdist

Prep a wheel:

    python setup.py bdist_wheel
    <commit_msg>fixed typo<commit_after>
This file is intended for my own use, for summarizing how to package, test, release...

## Test in a clean venv:

Package up in the 'normal' python environment:
    cd ~/Dropbox/py/PyNOMAD
    # rm -rf dist/*  # you probably want to do this to clean up
    python setup.py sdist

Create a venv & install pynomad & develop pynomad with:
    cd ~/Dropbox/py/PyNOMAD
    canopy_cli venv -s test-venv
    source test-venv/bin/activate
    python setup.py develop
    cd test-venv
    ipython
    import nomad
    # TODO: fix next few lines
    py2mass.set_2mass_path('/Volumes/Offloader/2MASS/')
    ra_range = [281., 281.05]  #    RA is in degrees
    dec_range = [-30.6, -30.55]  #  Dec is in degrees
    stars = py2mass.fetch_2mass_psc_box(ra_range, dec_range)



## Original upload to github

Create a blank PyNOMAD repository on github, and then:

    cd /Users/hroe/Dropbox/py/PyNOMAD
    git remote add origin <EMAIL>:henryroe/PyNOMAD.git
    git push -u origin master



## Upload a version to github

TODO: develop a checklist for before uploading

    cd /Users/hroe/Dropbox/py/PyNOMAD
    versionnumber=`python -c "execfile('nomad/__about__.py') ; print(__version__)"`
    git tag -a $versionnumber -m "Tagged for version "$versionnumber
    git push origin $versionnumber
    

## Upload a version to pypi

[following along from here](https://python-packaging-user-guide.readthedocs.org/en/latest/distributing.html)

TODO: develop a checklist for before uploading

    cd /Users/hroe/Dropbox/py/PyNOMAD
    # rm -rf dist/*  # you probably want to do this to clean up
    # rm -rf build   # you may want to do this to clean up?
    python setup.py sdist

Test is working in a 'clean' python install:

    cd /Users/hroe/Dropbox/py/pynomad
    rm -rf minimal-venv
  
v1:  quickie where you rely on the existing canopy packages (just double check you're not being fooled by an already installed PyNOMAD!)

    cd ~/Dropbox/py/PyNOMAD
    canopy_cli venv -s test-venv
    source test-venv/bin/activate
    cd ~/Dropbox/py/PyNOMAD/dist/
    tar -zxvf PyNOMAD-0.1.2.tar.gz
    cd PyNOMAD-0.1.2
    python setup.py install
    ipython
    import nomad
    # TODO update next few lines
    ra_range = [281., 281.05]  #    RA is in degrees
    dec_range = [-30.6, -30.55]  #  Dec is in degrees
    stars = py2mass.fetch_2mass_psc_box(ra_range, dec_range)
    print py2mass.__version__
    
---- end of test of sdist

Prep a wheel:

    python setup.py bdist_wheel
    
{'fraction_non_alphanumeric': 0.08860257680872151, 'fraction_numerical': 0.01823587710604559, 'mean_word_length': 2.846036585365854, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2663519', 'n_tokens_mistral': 1826, 'n_tokens_neox': 1737, 'n_words': 570}