Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Move config dir to be part of the lib #278

Merged
merged 6 commits into from
Feb 8, 2024

Conversation

acatav
Copy link
Contributor

@acatav acatav commented Feb 7, 2024

Problem

Right now there is no way to access the config dir that compatible with the installation

Solution

Make the config dir part of the library

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Adjusted the relevant test to work with the new config path

Copy link
Contributor

@igiloh-pinecone igiloh-pinecone left a comment

Choose a reason for hiding this comment

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

@acatav two comments:

  1. Please merge main, there's a new cohere.yaml config as well.
  2. We need to give users easy access to config templates.
    Please add a canopy gen-config PATH cli command that "generates" config templates by finding them in the installed package and copying to a user's selected path. We should also add this to the README.

@acatav acatav enabled auto-merge February 8, 2024 15:43
@izellevy izellevy self-requested a review February 8, 2024 15:46
@acatav acatav dismissed igiloh-pinecone’s stale review February 8, 2024 15:47

Followed all commnents and we have an approval from another maintainer

@acatav acatav added this pull request to the merge queue Feb 8, 2024

try:
with pkg_resources.open_text('canopy.config', template) as f:
config = yaml.safe_load(f)
Copy link
Contributor

Choose a reason for hiding this comment

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

@acatav you don't need this tedious loading and saving code. Just copy the entire content of the config/ dir from the installed location to the user's desired path

Merged via the queue into pinecone-io:main with commit 1fb9288 Feb 8, 2024
7 checks passed
@acatav acatav deleted the include-config-in-pacakge branch February 8, 2024 15:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants