5B. [Repositories] Publishing and Using Shared Libraries in Code Repositories6. Publishing Shared Code
Feedback

6 - Publishing Shared Code

This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.

📖 Task Introduction

At this point, you have three interrelated artifacts:

  • Library: yourName_cleaning_functions | This will be the discoverable library name, and it can be altered in your repository's gradle.properties file.

  • Package: cleaning_functions | Changing the name of the folder will update the package name.

  • Modules: cleaning_utils and type_utils.py | Code files in shared repository folders containing an __init.py__ will be published as modules.

    Looking ahead, repositories that want to make use of your library will first import the library in the Libraries panel and then reference the modules in an import statement, like this:

    from cleaning_functions import type_utils as ${alias}

    Publishing your library so that it is discoverable by other Foundry users at your organization requires passing CI checks and then tagging your branch or commit with a semantic version.

🔨 Task Instructions

  1. In your yourName_cleaning_functions repository, click the Branches menu item at the top of your application screen (it may be hidden in the More ▾ dropdown menu).
  2. In the top right of your screen, to the left of the New branch button, click Tags. Your repository was automatically tagged with version 0.0.1 on creation, which you'll see in the list of tags.
  3. Click the green ➕ New tag button in the top right and tag the branch (Master) with a new semantic version. For example, consider clicking the Minor button to increment the version to 0.1.0.
  4. Click the blue Create tag button in the bottom right of the window.
  5. Your tag will not be published until the CI check process finishes running on the tag. To view the running check on the tag, click the Checks item in the menu across the top of your repository (it may be hidden in the More ▾ dropdown menu).
  6. Using the image below as a guide, filter your checks to Tags and choose your new semantic version. Click into the running check to view its progress.