Skip to content

Parameterize repository#20

Open
juliocvergarah wants to merge 3 commits intosocrata:mainfrom
juliocvergarah:parameterize_repository
Open

Parameterize repository#20
juliocvergarah wants to merge 3 commits intosocrata:mainfrom
juliocvergarah:parameterize_repository

Conversation

@juliocvergarah
Copy link

Updating pull request, for parameterizing respository name instead of hard-coding to artifactory

Copy link
Contributor

@rlvoyer rlvoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. Left a few suggestion.

def publish_to_pypi(repository):
"""
Publish the distribution to our local PyPi.
:param repository: the repository to be used by the ReleaseCommand for the artifact upload. If ommitted, repository will be defaulted to PyPi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the style specified here.

So this should be

"""
Args:
    repository: the repository to be uploaded to (eg. Artifactory or Pypi.org).
"""

:param repository: the repository to be used by the ReleaseCommand for the artifact upload. If ommitted, repository will be defaulted to PyPi
"""
code = Popen(["twine", "upload", "dist/*", "-r", "artifactory"]).wait()
cmd = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: it would be slightly simpler as follows:

if repository is None:
    repository = "pypy"

cmd = ["twine", "upload", "dist/*", "--repository", repository]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments