bin/publish.py
def publish(nightly):
    """Publishes (uploads) all submodules to PyPI.

    Appropriate credentials must be available to twine, e.g. in a ~/.pypirc file, and users must
    be permissioned as maintainers on the PyPI projects. Publishing will fail if versions (git
    tags and Python versions) are not in lockstep, if the current commit is not tagged, or if
    there are untracked changes.
    """

    try:
        RCParser.from_file()
    except ConfigFileError:
        raise ConfigFileError(PYPIRC_EXCEPTION_MESSAGE)

    assert '\nwheel' in subprocess.check_output(['pip', 'list']).decode('utf-8'), (
        'You must have wheel installed in order to build packages for release -- run '
        '`pip install wheel`.'
    )

    assert which_('twine'), (
        'You must have twin installed in order to upload packages to PyPI -- run '
        '`pip install twine`.'
    )

    assert which_('yarn'), (
        'You must have yarn installed in order to build dagit for release -- see '
        'https://yarnpkg.com/lang/en/docs/install/'
    )

    print('Checking that module versions are in lockstep')
    check_versions(nightly=nightly)
    if not nightly:
        print('... and match git tag on most recent commit...')
        check_git_status()

    print('Publishing packages to PyPI...')

    if nightly:
        new_version = increment_nightly_versions()
        commit_new_version('nightly: {nightly}'.format(nightly=new_version['__nightly__']))
        set_git_tag('{nightly}'.format(nightly=new_version['__nightly__']))
        git_push()
        git_push(tags=True)
    publish_all(nightly)
def publish(nightly):
    """Publishes (uploads) all submodules to PyPI.

    Appropriate credentials must be available to twine, e.g. in a ~/.pypirc file, and users must
    be permissioned as maintainers on the PyPI projects. Publishing will fail if versions (git
    tags and Python versions) are not in lockstep, if the current commit is not tagged, or if
    there are untracked changes.
    """

    try:
        RCParser.from_file()
    except ConfigFileError:
        raise ConfigFileError(PYPIRC_EXCEPTION_MESSAGE)

    assert '\nwheel' in subprocess.check_output(['pip', 'list']).decode('utf-8'), (
        'You must have wheel installed in order to build packages for release -- run '
        '`pip install wheel`.'
    )

    assert which_('twine'), (
        'You must have twin installed in order to upload packages to PyPI -- run '
        '`pip install twine`.'
    )

    assert which_('yarn'), (
        'You must have yarn installed in order to build dagit for release -- see '
        'https://yarnpkg.com/lang/en/docs/install/'
    )

    print('Checking that module versions are in lockstep')
    check_versions(nightly=nightly)
    if not nightly:
        print('... and match git tag on most recent commit...')
        check_git_status()

    print('Publishing packages to PyPI...')

    if nightly:
        new_version = increment_nightly_versions()
        commit_new_version('nightly: {nightly}'.format(nightly=new_version['__nightly__']))
        set_git_tag('{nightly}'.format(nightly=new_version['__nightly__']))
        git_push()
        git_push(tags=True)
    publish_all(nightly)
def publish ( nightly ) : try : RCParser . from_file ( ) except ConfigFileError : raise ConfigFileError ( PYPIRC_EXCEPTION_MESSAGE ) assert '\nwheel' in subprocess . check_output ( [ 'pip' , 'list' ] ) . decode ( 'utf-8' ) , ( 'You must have wheel installed in order to build packages for release -- run ' '`pip install wheel`.' ) assert which_ ( 'twine' ) , ( 'You must have twin installed in order to upload packages to PyPI -- run ' '`pip install twine`.' ) assert which_ ( 'yarn' ) , ( 'You must have yarn installed in order to build dagit for release -- see ' 'https://yarnpkg.com/lang/en/docs/install/' ) print ( 'Checking that module versions are in lockstep' ) check_versions ( nightly = nightly ) if not nightly : print ( '... and match git tag on most recent commit...' ) check_git_status ( ) print ( 'Publishing packages to PyPI...' ) if nightly : new_version = increment_nightly_versions ( ) commit_new_version ( 'nightly: {nightly}' . format ( nightly = new_version [ '__nightly__' ] ) ) set_git_tag ( '{nightly}' . format ( nightly = new_version [ '__nightly__' ] ) ) git_push ( ) git_push ( tags = True ) publish_all ( nightly )
Publishes (uploads) all submodules to PyPI.

    Appropriate credentials must be available to twine, e.g. in a ~/.pypirc file, and users must
    be permissioned as maintainers on the PyPI projects. Publishing will fail if versions (git
    tags and Python versions) are not in lockstep, if the current commit is not tagged, or if
    there are untracked changes.
Publishes ( uploads ) all submodules to PyPI .