Skip to main content

Enforce a triangular Git workflow. If this is not possible, explain why.

Project description

Samosa (समोसा)

Enforce a triangular Git workflow. If this is not possible, explain why.

Usage

cd [repository-folder]
samosa

If any checks fail, Samosa will attempt to make a correction. If the correction cannot be made automatically, Samosa will make a suggestion and terminate with exit code 1 (error).

If all checks pass, Samosa will display a short confirmation message and terminate with exit code 0 (success).

Samosa standard

The following checks should be true:

  • In a Git repository
  • There is a remote named "origin"
  • There is a remote named "upstream"
  • Author name and email are set, and are not invalid
  • The default push target is "origin:current"
  • The pre-commit hook exists and is executable
  • There is a local branch named "main"
  • The main branch tracks "upstream/main"

See WORKFLOW.md for a detailed workflow that results in a samosa standard repository.

Roadmap (don't hold your breath)

  • samosa clone: interactive prompts that follow the suggested workflow
  • samosa checkout: in samosa repository, checkout a new branch, hooked up correctly
  • samosa refresh: fetch all, and pull main
  • samosa log: show log since upstream/main
  • samosa diff: show diff from upstream/main

Suggestions

Sole maintainer: origin = upstream

Sole maintainers of young projects probably don't have separate personal and upstream repositories. In this case, set both to the same value. When contribution activity justifies a project repository outside your personal namespace, create it and update your "upstream" value.

Out of scope

Acknowledgements

WORKFLOW.md and the associated pre-commit bash script are derived from Aaron Bull Schaefer's excellent Git Triangular Workflow. License details are included in the relevant files.

Additional references

Development environment

Install prerequisites

  • Python 3.10
  • pdm
  • make

Instructions

  • Fork the upstream repository.
  • git clone [fork-url]
  • cd [project-folder]
  • Run make develop to initialise your development environment.

You can use any text editor or IDE that supports virtualenv / pdm. See the Makefile for toolchain details.

Please make test and make lint before submitting changes.

Make targets

USAGE: make [target]

help    : Show this message.
develop : Set up Python development environment.
run     : Run from source.
clean   : Remove all build artefacts.
test    : Run tests and generate coverage report.
lint    : Fix or warn about linting errors.
build   : Clean, test, lint, then generate new build artefacts.
publish : Upload build artefacts to PyPI.

Sharing and contributions

Samosa (समोसा)
https://lofidevops.neocities.org
Copyright 2022 David Seaward and contributors
SPDX-License-Identifier: AGPL-3.0-or-later

Shared under AGPL-3.0-or-later. We adhere to the Contributor Covenant 2.1, and certify origin per DCO 1.1 with a signed-off-by line. Contributions under the same terms are welcome.

Submit security and conduct issues as private tickets. Sign commits with git commit --signoff. For a software bill of materials run reuse spdx. For more details see CONDUCT, COPYING and CONTRIBUTING.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

samosa-0.2.5.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

samosa-0.2.5-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file samosa-0.2.5.tar.gz.

File metadata

  • Download URL: samosa-0.2.5.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.5.2 CPython/3.10.6

File hashes

Hashes for samosa-0.2.5.tar.gz
Algorithm Hash digest
SHA256 2b0ebd0fe09590ecaea68ecd487ec4f174b8e12a444ab468e9f443fe1c93b883
MD5 9d6fdef15548914ff482037fdd734b97
BLAKE2b-256 89013154bb58e339c14c9656015cbe427c6a0c3cd75877d47be5fb1c0699f456

See more details on using hashes here.

File details

Details for the file samosa-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: samosa-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.5.2 CPython/3.10.6

File hashes

Hashes for samosa-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b8af813bd5b8fd743ded2f37d6a3e2691ec880b085f2ba5b6590c9727ebdb041
MD5 de85da6ead26e55682eca5dc5e8a6cba
BLAKE2b-256 e3fe7d73c9f39066a38786dcec915a761d3c7333660d0324ccc84101d9ce1081

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page