-
Create a branch directly in this repo or a fork (if you don't have push access). Please name branches within this repository
<fix type>/<description>
. For example, something like feature/install_from_deb. -
Create an issue or open a PR. If you aren't sure your PR will solve the issue, or may be controversial, we commend opening an issue separately and linking to it in your PR, so that if the PR is not accepted, the issue will remain and be tracked.
-
Close (and reference) issues by the
closes #XXX
orfixes #XXX
notation in the commit message. Please use a descriptive, useful commit message that could be used to understand why a particular change was made. -
Keep pushing commits to the initial branch,
--amend
-ing if necessary. Please don't mix fixing unrelated issues in a single branch. -
Create a changelog entry as per Keep A Changelog. You should only be putting new stuff under
## [Unreleased]
and should not concern yourself with bumping the version and dates as this will be done when releasing changes. When you need to have a change that will break things it needs to be called out with a### Breaking Changes
as opposed to a more common header such as### Added, ### Fixed, ### Changed
. This helps maintainers evaluate what the appropriate version bump should be as there could be changes that are not immediately released. -
When everything is ready for merge, clean up the branch (rebase with master to synchronize, squash, edit commits, etc) to prepare for it to be merged. Unless you have meaningful history it should be a single commit. Prefer a rebase to a merge for brining in changes that have been committed to upstream master.
- After reviewing commits for documentation, passing CI tests, and good descriptive commit messages, merge it with either "squash and merge" or "rebase and merge" do not use the "merge pull request" as it does not do a fast forward first.
- Update python version in
Pipfile
. - Run
pipenv update --python <new version ex 3.12>
will update thePipfile.lock
file. - Run
pyupgrade sumologic/sumologic.py
will upgrade the syntax. - Run
pipenv run bandit sumologic/sumologic.py
will find common security issues. - Run
pipenv run flake8 sumologic/sumologic.py
will find linting issues.
-
Create/update the changelog entries and evaluate the type of release.
-
Run
pip install pipenv
to install pipenv -
Run
pipenv install --dev
to install dev dependencies -
Run
pipenv run python -m build
-
Run
pipenv run python -m twine upload dist/*
to publish in pypi repository -
The new wheel package gets released automatically after the tags are pushed using Github actions(Refer tagged-release in https://github.com/marvinpinto/action-automatic-releases). Run below commands to create and push tags
git tag -a v<major.minor.patch> <commit_id>
git push origin v<major.minor.patch>
- Generate the access keys by following the sumologic docs. The user should have
Manage Collectors
permissions. - export the below environment variables
export SUMOLOGIC_ACCESS_ID=<your user's access id> export SUMOLOGIC_ACCESS_KEY = <your user's access key>
- Run the unit tests present in
test
folderpython -m unittest