Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package build broken if integration folder name contains hyphens #112

Closed
5 of 6 tasks
masci opened this issue Dec 15, 2023 · 0 comments
Closed
5 of 6 tasks

Package build broken if integration folder name contains hyphens #112

masci opened this issue Dec 15, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@masci
Copy link
Contributor

masci commented Dec 15, 2023

Describe the bug

We recently moved (#103) package versioning from hardcoded strings in the __about__.py file to git tags using setuptools_scm through hatch.

Problem is setuptools_scm splits the tag using - and having hyphens in the string prepending the version in the tag name, for example integrations/google_vertex-v0.0.1 confuses the plugin.

There isn't an easy fix, so I propose the following workaround:

  • Rename all the tags integrations/google-vertex-vXXX to integrations/google_vertex-vXXX
  • Rename all the tags integrations/instructor-embedders-vXXX to integrations/instructor_embedders-vXXX
  • Push the new tags, CI will attempt to rebuild the packages but will fail because the path google_vertex doesn't exist
  • Rename the folder integrations/google-vertex to integrations/google_vertex chore: replace - with _ #114
  • Rename the folder integrations/instructor-embedders to integrations/instructor_embedders chore: replace - with _ #114
  • Enforce the new naming convention with a job in the CI ci: raise an error if integration folder name contains hyphens #119

The workaround won't affect the name of the package on PyPI, nor the import paths.

To Reproduce

Checkout the latest tag for google vertex and call hatch version

Describe your environment (please complete the following information):

  • OS: [e.g. iOS]
  • Haystack version:
  • Integration version:
@masci masci added the bug Something isn't working label Dec 15, 2023
@masci masci self-assigned this Dec 18, 2023
@masci masci closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant