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

Continuous deployment #33

Open
LourensVeen opened this issue Jun 4, 2024 · 2 comments
Open

Continuous deployment #33

LourensVeen opened this issue Jun 4, 2024 · 2 comments

Comments

@LourensVeen
Copy link
Collaborator

LourensVeen commented Jun 4, 2024

I'm looking at adding a CD setup to make it easier to make releases. The basic steps would be to use pip to build and then twine to upload, but we need to make some decisions as to how to set it up.

The first question is what constitutes a release, and thus triggers the CD. I can think of three possibilities: 1) a tag of the form vX.Y.Z-postfix (or similar) on a commit, 2) a commit to main (or master here I guess) as in git flow, and 3) a GitHub release.

Number 1) is simple but limited, 2) entails using a branching model that I like, but which may be more complex than what you want, and 3) ties you to GitHub but makes it easier to e.g. add a description of new features, and it's needed anyway for Zenodo integration for DOIs.

Second, do we want to support pre-releases? Those can be useful to test the package itself and whether everything works for the user installing it, but then this package is pretty simple so chances are it'll work anyway. The main issue is actually in the hard-to-install dependencies rather than in the package itself I think.

Note that this will anyway require some work on your side as well, because the various services need to be set up with accounts and tokens and such, and that's something you need to do.

@Sbte
Copy link
Contributor

Sbte commented Jun 12, 2024

I'm looking at adding a CD setup to make it easier to make releases. The basic steps would be to use pip to build and then twine to upload, but we need to make some decisions as to how to set it up.

The first question is what constitutes a release, and thus triggers the CD. I can think of three possibilities: 1) a tag of the form vX.Y.Z-postfix (or similar) on a commit, 2) a commit to main (or master here I guess) as in git flow, and 3) a GitHub release.

Number 1) is simple but limited, 2) entails using a branching model that I like, but which may be more complex than what you want, and 3) ties you to GitHub but makes it easier to e.g. add a description of new features, and it's needed anyway for Zenodo integration for DOIs.

I think you need a tag for github releases, so github releases would be fine. I want tags for sure. Speaking of branches. Do you know if you can rename the main branch without breaking pull for existing clones?

Second, do we want to support pre-releases? Those can be useful to test the package itself and whether everything works for the user installing it, but then this package is pretty simple so chances are it'll work anyway. The main issue is actually in the hard-to-install dependencies than in the package itself I think.

I prefer to cover as much as possible by CI, and just do a x.x.1 release if that wasn't adequate.

@LourensVeen
Copy link
Collaborator Author

I think renaming the main branch will break clones, they would have to manually update the local branch using git branch -u main master if you've renamed master to main on GitHub. It probably makes more sense to just do git switch main though, to get a new local branch that has origin/main as its upstream automatically.

Okay, so we want to have an automatic deployment that triggers whenever a release is made on GitHub, and which then automatically releases to PyPI as a full release.

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

No branches or pull requests

2 participants