Package: releaseup
releaseupAn extractiveNLPapproach for generating release notes from comments and
docstrings added between two git tags.releaseupextracts all the comments and docstrings usinggit diff,
preprocesses the outputs, and finally generates release notes usingsklearn'sTfidfVectorizerandspacy! The generated release notes are not at all
abstractive, which is somethingreleaseupaims to achieve in the future.As of now,releaseupis a holiday project (built in mere 2 days), but I do
intend to maintain it in the future.releaseupdoes work, but only if your
comments are well written.Read more aboutreleaseupthrough itsdocumentation.StructureAll the extraction and preprocessing work is carried out using theextractmodule.All the extractiveNLPwork is done inside thenlp_backendmodule.releaseupalso prvides a high level API present inn thehigh_levelmodule.Seeexamplesfor more information.InstallationUsepipmagicreleaseupuses modernPythonpackaging and can be installed usingpip-python -m pip install releaseupFor developer install, see ourContributing Guidelines.ExamplesHigh level APIimportreleaseuptag=["v0.8.0","v0.9.0"]# can also be commitspath="././mypackage/"# to ignore changes made to other folders (./github/, docs/, etc) and filescomments_filename="COMMENTS.txt"# extract added comments and docstringscomments=releaseup.extract_release_comments(tags,path,comments_filename)release_filename="RELEASE_NOTES.txt"# generate release notesnotes=releaseup.generate_release_notes(comments,release_filename,model_name="en_core_web_trf",# any spacy modelthreshold=0.3,# percentage of comments to be selected)Low level APIfromreleaseup.extractimport(extract_additions,get_comments_and_docstrings,get_diff,preprocess_additions,)fromreleaseup.nlp_backendimportget_release_notes,get_tfid_scorestag=["v0.8.0","v0.9.0"]# can also be commitspath="././mypackage/"# to ignore changes made to other folders (./github/, docs/, etc) and filescomments_filename="COMMENTS.txt"# extract added comments and docstringsget_diff(tags,path,comments_filename)extracted_additions=extract_additions(comments_filename)preprocessed_additions=preprocess_additions(extracted_additions)comments=get_comments_and_docstrings(preprocessed_additions)release_filename="RELEASE_NOTES.txt"word_score=get_tfid_scores(comments)release_notes=get_release_notes(comments,word_score,release_filename,model_name="en_core_web_trf",# any spacy modelthreshold=0.3,# percentage of comments to be selected)TestingTODO: ADD TESTSActivating pre-commitreleaseupuses a set ofpre-commithooks and thepre-commitbot to format,
type-check, and prettify the codebase. The hooks can be installed locally
using -pre-commit installThis would run the checks every time a commit is created locally. The checks
will only run on the files modified by that commit, but the checks can be
triggered for all the files using -pre-commit run --all-filesIf you would like to skip the failing checks and push the code for further
discussion, use the--no-verifyoption withgit commit.Documenting releaseupreleaseup's documentation is mainly written in the form ofdocstringsandMarkdown. The docstrings include the
description, arguments, examples, return values, and attributes of a class or a
function, and the.mdfiles enable us to render this documentation onreleaseup's documentation website.releaseupprimarily usesMkDocsandmkdocstringsfor rendering documentation on
its website. The configuration file (mkdocs.yml) forMkDocscan be foundhere. The
documentation is deployed onhttps://readthedocs.iohere.Ideally, with the addition of every new feature toreleaseup, documentation
should be added using comments, docstrings, and.mdfiles.Building documentation locallyThe documentation is located in thedocsfolder of the main repository. This
documentation can be generated using thedocsdependencies ofreleaseupin
the following way -mkdocs serveThe commands executed above will clean any existing documentation build, create
a new build (in./site/), and serve it on yourlocalhost. To just build the
documentation, use -mkdocs buildNoxThe fastest way to start with development is to use nox. If you don't have nox,
you can usepipx run noxto run it without installing, orpipx install nox.
If you don't have pipx (pip for applications), then you can install with withpip install pipx(the only case were installing an application with regular
pip is reasonable). If you use macOS, then pipx and nox are both in brew, usebrew install pipx nox.To use, runnox. This will lint and test using every installed version of
Python on your system, skipping ones that are not installed. You can also run
specific jobs:$nox-slint# Lint only$nox-stests-3.9# Python 3.9 tests only$nox-sdocs--serve# Build and serve the docs$nox-sbuild# Make an SDist and wheelThe default sessions (lintandtests) can be executed using -noxContinuous IntegrationreleaseupusesGitHub Actionsas aCIprovider to run tests, build docs,
release onPyPI, test package, etc. All the configuration forGitHub Actionsis written inYAML, present in.github/directory. The CI runs every time a
pull request is made or a push is made to themainbranch.Continuous DeploymentreleaseupusesRead The Docsas aCDprovider to deploy documentation. All
the configuration forRead The Docsis written inYAML, present in the.readthedocs.ymlfile. The CD runs every time a push is made to themainbranch.CreditsLogo image credits: Taufik Ramadhan (taken from canva)