Package: isee
IntroductionPython continuous integration (CI) support tools.To install:pip install iseeDocumentation here.IntroductionGoalWorkflowResults and LogsVersioningSkip CIHostingHow to setup CIFor a GitHub repositoryFor a GitLab repositoryUseful resourcesGoalThe goal of CI is to automate code formatting, validation, deployment and publishing of packages.WorkflowA CI pipeline is triggered when new code is pushed to a remote repository.
Every CI pipeline does at least:Code formattingApply automated linting on source codePush back the formatted code to the remote repositoryCode validationTesting (unit tests, integration tests, doctests)Docstring validation (only for frameworks)Deployment to an integration environment for applications / Publishing for frameworks -- (only onmasterand only if theValidationstep succeeded)Semi-automated versioning (see theVersioningsection) + Tag the repository with the new generated version numberPackagingDeployment / PublishingResults and LogsYou can see your CI pipeline's result and logs:From yourGitLab project page → CI/CD → PipelinesFrom yourGitHub project page → Actions → Continuous IntegrationVersioningVersioning is semi-automatically resolved: if you want the major or minor part to be bumped, you only have to add[bump major]or[bump minor]to your commit message onmaster(versioning is not applied to other branches).Example, the current version number is1.0.5.
If you commit with the following message:Added some new stuff.the new version number will be1.0.6.
But if you commit with the following message:Added some great new stuff! [bump minor]the new version number will be1.1.0.
Finally, if you commit with the following message:Added some extraordinary new stuff!!! [bump major]the new version number will be2.0.0.Skip CIYou can prevent the CI pipeline from being triggered by adding[skip ci]to your commit message.
Example:Updated the README file. [skip ci]Be careful!If you skip the CI process, any new code will not be validated and no new version will be deployed/published. So, think twice before using it.HostingCI pipelines for GitHub public repositories are run on GitHub-hosted runners. See theGitHub documentationfor more detailsHow to setup CIThis "How to" section applies to python package projects only. If you want to setup CI to an application project or another programing language, you will have to modify the CI pipeline definition according to your needs.For a GitHub repositoryAdd thisci.ymlfile to thegithub/workflow/directory (create the directory if it doesn't exist) into your local repository.
Note thatwadsdoes it for you by running the following command from the project's root directory (documentationhere):populate . --root-url=GITHUB_ROOT_URLNote that you can specify the root directory (in case you're not in the root directory), root url (in case the directory is not already associated to a git repo), and have many other parametrization choices.Fear not:populatewillnotcreate or modify theci.ymlfile (or any other file) if there is one already.In theci.ymlfile, replace#PROJECT_NAME#with the project name (must be the exact same name as the main module of the project, not needed if you ran thepopulatetool because it did it for you) and modify the pipeline workflow to suit the project's needs. Documentationhere.Add secretsPYPI_USERNAMEandPYPI_PASSWORDwith your PYPI credentials to the remote repository. Documentationhere.If you want the project's documentation to be published, configure the project's Github Pages for the project by selecting the/docsfolder. Documentationhere.Push your code and see the execution of the newContinuous Integrationworkflow. Documentationhere.
Consider usingwadsto automatically validate your code locally, commit and push by running the following command (documentationhere):pack check-in 'Your commit message.'Useful resourcestroubleshooting tests