Skip to content

Updating PyPI credentials on Azure

JCGoran edited this page May 16, 2025 · 1 revision

Overview

The NEURON project's location on Azure is: https://dev.azure.com/neuronsimulator/nrn/. We currently use Azure in two scenarios:

  • building wheels on x86_64 for MacOS and Linux as part of CI (activated on PRs)
  • building and uploading wheels on -||- as part of a schedule

The latter is achieved using twine, through this CI file.

Twine uses a username and a password to upload the wheels to PyPI. Occasionally, one needs to update the PyPI credentials, which is what this page explains.

Procedure

For security reasons, for uploading to PyPI one must generate an access token. To do this, go to this link (should also be reachable by clicking on your username on PyPI and going to "Account settings"), then scroll to the "API tokens" section, which should look like this:

api_token_screen

Click on "Add API token", and fill in the information as below (you can change the token name):

Screenshot 2025-05-16 at 13 17 00

Afterwards, click on "Copy token" below:

api_token_generated

Then go to Azure, and go to project settings of NEURON (https://dev.azure.com/neuronsimulator/nrn/_settings/), and click on "Service connections" under "Pipelines", and click on "AzureNeuronPypiNightly" (see picture below):

azure_screen

Finally, click on the "Edit" button in the top-right part of the screen:

azure_screen2

Finally paste the token you copied earlier in the "Password" field:

azure_screen3

and scroll down to click "Save".

From that point onward, the Azure CI will use the new credentials for uploading nightly releases to PyPI.

Clone this wiki locally