Package: easyrelease
easyreleaseAutomate your GitHub, pypi and conda releasesHow to installVia pippip install easyreleaseor via condaconda install -c pablormira easyreleasePackages vs ApplicationWe conceptually differentiate between two kind of projects:Packages: These are python projects you want to bundle for others to install viapiporcondaApplications: These are python projects without packaging purposes like a web application. You can still use this package for this kind of projects in order to automate your release workflowHow to usePrerequisitesAfter installation you need the fulfill the following prerequisites for the package to work:Git projectYou need to initialize a git project in your project root folder for this package to work, i.e. run in your command linegit initGitHub credentialsYou need to store your GitHub credentials (GitHub username and token) in your project root for automatic GitHub releases. The credentials should be stored in a file called.gh-credentialswith the following contents:gh_user=Your GitHub usernamegh_token=Your GitHub tokenPackage structureOnly for python packagesFor this package to work you need to comply to the following minimal project structure for python packagespackage_name
|-- .git
|-- package_name
|   |-- __init__.py
|   |-- module1.py
|   |-- module2.py
|   |-- ...
|-- tests
|   |-- test_module1.py
|   |-- test_module2.py
|   |-- ...Pypi credentialsOnly for python packagesTo publish to Pypi you need to store your pypi credentials in a file with the name.pypi-credentialsin your user root or project root directory. The file should include the following contentsusername=Your Pypi usernamepassword=Your Pypi passwordAnaconda credentialsOnly for python packagesTo publish to Anaconda you need to store your anaconda credentials in a file with the name.anaconda-credentialsin your user root or project root directory. The file should include the following contentsusername=Your Anaconda usernamepassword=Your Anaconda passwordCONDA_BLD_PATHOnly for Linux users and only in case of problemsIn case of problems concerning permission errors building your package viabuild-conda-packageyou may need to add the following line to your~/.bashrcexportCONDA_BLD_PATH=/tmp/conda-bldGetting startedFor applicationsOnly once:Fulfill theprerequisitesRuneasyrelease-init applicationEdit your in the previous step generated filesettings.iniEdit your in the previous step generated file.gh-release-config.yaml.gh-release-config.yamlsets the title and keyword that will be used to assign your commits to a certain section in your GitHub release notes and changelog. So if for example you want all commits to be in your release notes without keyword matching, you could modify.gh-release-config.yamlasgh_categories:-title:"###Commits:"keyword:""Each time you want to make a GitHub release:Rungh-releaseto make a GitHub releaseRunmake-changelogto generate / update your CHANGELOGFor packagesOnly once:Fulfill theprerequisitesRuneasyrelease-init applicationEdit your in the previous step generated filesettings.iniEdit your in the previous step generated file.gh-release-config.yamlRunlogin-to-anacondaEach time you want to release / publish your package:Runpublish-pypi-packageto publish to pypiRunupdate-meta-yamlto generate / update your meta.yaml under conda-bld(Optionally recommended): Check your meta.yamlRunbuild-conda-packageto build your conda packageRunupload-conda-packageto publish your conda packageRungh-releaseto make a GitHub releaseRunmake-changelogto generate / update your CHANGELOGVersioningWe version our package viasemantic versioning, i.e.,We use three digits separated by points x1.x2.x3, e.g. 0.5.1We increase x1 (the major version) if we introduce breaking changesException: Versions with 0 at the beginning (e.g. 0.5.1) mean that the package is not stable yet and therefore every new feature could be a breaking changeWe increase x2 (the minor version) if we introduce a new featureWe increase x3 (the patch version) if we fix a bugNew documentation, refactoring / maintenance of code and admin tasks do not change the versions.You can follow the changes introduced by each version in ourCHANGELOGDifferences tofastreleaseThis package was inspired by thefastreleasepackage but it differs from it in the way it generates the release notes.easyreleasegenerates the release notes out of the commit messages whereasfastreleasegenerates the release notes out of GitHub issues.This package was also motivated by the fact thatfastreleasedid not work for me out of the box in my first attempt and I really liked the idea of automating releases and package publishing.Compatibility withnbdevThis package was developed and is compatible with thenbdevframework but it also works for ordinary project development without notebooks.In the case you want to develop your project withnbdevyou need to first initialize your project vianbdevand afterwards runeasyrelease-init. This is because thesettings.iniwe initialize for your project is a proper / strict subset of thesettings.inifromnbdev