Utils Folder Attributes

This section explains the attributive action provided for the Utils folder.

The Utilis folder allows the users to import the utility files from their systems and Git repository.

Please Note: The Utils folder will be added by default to only normal Data Science Lab projects.

  • Navigate to the Workspace tab.

  • Select the Utils folder.

  • Click the ellipsis icon to open the context menu.

  • Click the Import option that appears in the context menu.

  • The Import Utility File window opens.

  • The user can import a utility file using either of the options: Import Utility or Pull from Git.

Importing a Utility File

Check out the walk-through video to understand the Import Utility functionality.

  • Navigate to the Import Utility File window.

  • Select the Import Utility option by using the checkbox.

  • Describe the Utility script using the Utility Description space.

  • Click the Choose File option to import a utility file.

  • Search and upload a utility file from the system.

  • The uploaded utility file title appears next to the Choose File option.

  • Click the Save option.

  • The imported utility file will display completed 100% when imported completely.

  • A notification also ensures that the file has been imported.

  • Open the Utils folder provided under the Workspace tab.

  • The imported utility file appears under the Utils folder.

Pulling a Utility File from Git

The user can also pull a utility script or an updated version of the utility script from the Git Repository.

Pre-requisite:

  • The user needs to do an Admin configuration with an authentication token.

  • The user needs to do the Project level- configuration of Git Project and Git branch.

Please Note:

  • The normal Data Science Project with the Git branch configured to it will support the Pull from Git import functionality for a utility file.

  • Users can generate an authentication token from their Git Lab or Git Hub repositories.

Admin Level Configuration

  • Navigate to the Admin module.

  • Open the Version Control from the Configuration options.

  • Select the Token type as a private token.

  • Provide the authentication token in the given space.

  • Click the Test option.

  • A notification message appears to inform the user that authentication has been established.

  • Click the Save option.

  • A notification message appears to inform that the version control has been updated.

Pull from Git

Projects and Branches created in GitLab/GitHub can be accessed using the access token inside the DS Lab and the files (.ipynb) can be pulled using the Pull from Git functionality.

Once the initial pull (import) has happened, the user can pull the latest version of the Python file from Git using the Pull from Git functionality available in the Notebook List.

A Pulled utility file can be imported into the Data Science Notebooks.

Check out the walk-through video to understand the Pulling Utility script from the Git repository.

Steps to pull the latest Utility file from Git

  • Navigate to the Import Utility File window.

  • Select the Pull from Git option by using the checkbox.

  • All the available files from Git will be listed for the initial pull. Select a file using the checkbox.

  • Click the Save option to import a utility file.

  • A notification ensures that the selected utility file has been pulled.

  • Open the Utils folder.

  • The pulled utility file will be added there. The file content opens on the right side using a click on it.

  • Navigate to the Git repository and open the same utility file version with a click.

  • The file content opens. Click the Edit option to get the Edit context menu.

  • Select an option from the Edit context menu. Here, the Edit single file has been selected.

  • The Edit file page opens.

  • Edit the file content.

  • Click the Commit changes option to save the edited content in the file.

  • A notification ensures that changes are committed. The modified content of the file can be previewed below as well.

  • Navigate back to the same utility file.

  • Click the Pull from VCS option from the context menu.

  • The Pull from Git dialog box opens.

  • Click the Yes option.

  • A notification ensures that the latest file version is pulled.

  • Click on the same utility file.

  • The updated content can be seen on the right side.

Last updated