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

Add dynamic versioning #25

Merged
merged 7 commits into from
Nov 8, 2022
Merged

Add dynamic versioning #25

merged 7 commits into from
Nov 8, 2022

Conversation

hrshdhgd
Copy link
Collaborator

@hrshdhgd
Copy link
Collaborator Author

I can only test this (I think) after merging the PR and creating a new project. The code itself I'm assuming is tested in linkml via linkml/linkml#1048 ?

@hrshdhgd hrshdhgd marked this pull request as draft October 28, 2022 14:21
@hrshdhgd
Copy link
Collaborator Author

hrshdhgd commented Oct 28, 2022

I have marked this as a draft for now and will update it once linkml/linkml#1053 is confirmed to work.

@hrshdhgd hrshdhgd marked this pull request as ready for review October 28, 2022 21:26
Comment on lines 20 to 21
- name: Install Poetry
uses: snok/install-poetry@v1.1.6
with:
virtualenvs-create: true
virtualenvs-in-project: true
run: pip install poetry poetry-dynamic-versioning
Copy link
Contributor

Choose a reason for hiding this comment

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

This installs poetry into the same env as the project env which can become a problem if poetry´s dependencies contradict the ones in your project. In this pipeline this is no problem because you don't need to install to build.

However, in the other pipelines where you do install

I would suggest to use pipx to achieve isolation between poetry and the project. For pipx (which is available by default) the poetry-install section would look like:

    - name: Install Poetry
      run: |
        pipx install poetry
        pipx inject poetry poetry-dynamic-versioning

Copy link
Collaborator Author

@hrshdhgd hrshdhgd Oct 29, 2022

Choose a reason for hiding this comment

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

I was under the impression that different workflows in this project (main.yaml , deploy-docs.yaml) are contained in independent environments. Isn't that true?

I have made changes but without pipx and seems to work with linkml. I'm hesitant using another package (in addition to pip and poetry). I hope you understand.

Copy link
Contributor

Choose a reason for hiding this comment

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

No problem. I would also pip install here. I just wanted to show the alternative.

Yes, the other workflows are isolated from this one. That is why I thought using pipx here has no advantage. It would only make sense in the other two workflows. But everyone weights the arguments pro/contra pipx that is better isolation vs. using yet another tool, differently.

@hrshdhgd hrshdhgd merged commit 60667e6 into main Nov 8, 2022
@hrshdhgd hrshdhgd deleted the issue-1051 branch November 8, 2022 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend project cookiecutter to be able to introspect dynamic versions
3 participants