mk


Namemk JSON
Version 2.7.0 PyPI version JSON
download
home_pageNone
Summarymk
upload_time2024-09-25 16:35:39
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords mk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Documentation of mk tool

`mk` is a CLI tool that aims to ease contribution and maintenance for projects
by hiding repository implementation details from the casual contributor. With
it, you can contribute without having to know all the build and testing tools
that the project team already uses, which often have strange requirements.

![mk-command-line-screenshot](images/mk-social-preview.png)

If you ever asked yourself one of the below questions, probably you would want
to try `mk` and if it can help you

- How do I run tests locally?
- Which are the test suites I can run?
- Is my change ready to be reviewed?
- How can I propose a change for review?

Run `mk` inside any cloned repository to display which options you have. No
configuration file is needed as the tool will look for common tools used by the
repository and expose their commands.

`mk` is inspired by tools such [make][make], [waf][waf], [taskfile][taskfile],
[tox][tox], [nox][nox], [npm][npm], [yarn][yarn] and [pre-commit][pre-commit],
but **it does not aim to replace them**. Instead, it aims to provide a unified
interface for calling them that is friendly even for those that never used these
tools.

## Installation

We recommend using [`pipx`](https://pipxproject.github.io/pipx/) to install `mk`
to avoid potential dependency conflicts. You can use `pip3 install --user mk` as
well.

```shell
pipx install mk
```

## How it works

`mk` inspects the current core repository and detects build tools used by the
project, like pre-commit, tox, npm and exposes their commands to the user in a
**predictable** way.

For example, you should be able to lint any code repository running only
`mk lint`, regardless of author preference for picking one way to execute them
or another.

Be assured that `mk` does not make use of AI to guess what needs to run. As most
projects use relatively similar patterns, it is easy to identify the one to
execute.

At this moment, if two tools expose the same command name, the tool will add a
number to its name. In the future, we may decide to either chain them under a
single name or allow some tools to shadow others and avoid duplicates.

## What are the main benefits

One of the benefits of `mk` is that it should reduce the amount of
how-to-contribute documentation the author needs to write.

A considerable amount of maintainer effort can go into producing documentation
that makes it easier for someone to contribute.

Some projects are less affected than others. That is usually related to how well
the potential contributors know the practices used by the project. Still, if
your project has a wide range of uses, you will quickly discover that newbie
contributors may hit a knowledge wall. Such a barrier will likely prevent most
of them from becoming active contributors. The remaining ones will flood the
project with questions, distracting other maintainers from doing more advanced
tasks.

Unless you want to deter contributions, you should plan to make it as easy as
possible for people to contribute. That is one area where `mk` aims to help.

## Aliases

Similar to [git aliases](https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases),
`mk` allows typing as little as possible by automatically aliasing commands. For
example, you can run `mk lint` just by typing `mk l` as long there is no other
command starting with the same letter. Aliases are available for one, two and
three letters prefixes.

## Using mk to propose changes to projects

Instead of writing a long list of tasks to follow, we can use a tool that tells
him what to do next. For example, `mk` has a built-in command named `up(load)`
that aims to ease preparing a local change from being proposed to the project.

This command detects if it should use GitHub workflow or Gerrit and will run the
appropriate commands for opening or updating a CR/PR. Users will be allowed to
upload a change only after passing the minimal set of local tests, preventing
noisy mistakes or clog CI/CD pipelines.

In addition to linting, it will also check that the repository is not in dirty
status or that the testing did not leave untracked files.

## Planned features

- A persistent state of each command run - This means that it will know if a
  specific command was run and if it failed or not. The state would be linked to
  the repository state, so modifying a tracked file would reset the state to be
  unknown. (#20)
- Configuration file where additional actions can be added. (#21)
- Dependencies between commands. While some tools support dependencies, many do
  not. You should be able to declare that a specific command will run only after
  another one already passed. (#22)
- Ability to generate CI/CD pipelines so the user would spend less time writing
  non-portable configurations. (#23)

[make]: https://www.gnu.org/software/make/
[nox]: https://nox.thea.codes/en/stable/
[npm]: https://www.npmjs.com/
[pre-commit]: https://pre-commit.com/
[taskfile]: https://taskfile.dev/#/
[tox]: https://github.com/tox-dev/tox/
[waf]: https://waf.io/
[yarn]: https://yarnpkg.com/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "mk",
    "author": null,
    "author_email": "Sorin Sbarnea <sorin.sbarnea@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bb/20/9c4f75b2fdcfd4f3269f32bb8a59288390c2234a369f744a6699a19dd3bd/mk-2.7.0.tar.gz",
    "platform": null,
    "description": "# Documentation of mk tool\n\n`mk` is a CLI tool that aims to ease contribution and maintenance for projects\nby hiding repository implementation details from the casual contributor. With\nit, you can contribute without having to know all the build and testing tools\nthat the project team already uses, which often have strange requirements.\n\n![mk-command-line-screenshot](images/mk-social-preview.png)\n\nIf you ever asked yourself one of the below questions, probably you would want\nto try `mk` and if it can help you\n\n- How do I run tests locally?\n- Which are the test suites I can run?\n- Is my change ready to be reviewed?\n- How can I propose a change for review?\n\nRun `mk` inside any cloned repository to display which options you have. No\nconfiguration file is needed as the tool will look for common tools used by the\nrepository and expose their commands.\n\n`mk` is inspired by tools such [make][make], [waf][waf], [taskfile][taskfile],\n[tox][tox], [nox][nox], [npm][npm], [yarn][yarn] and [pre-commit][pre-commit],\nbut **it does not aim to replace them**. Instead, it aims to provide a unified\ninterface for calling them that is friendly even for those that never used these\ntools.\n\n## Installation\n\nWe recommend using [`pipx`](https://pipxproject.github.io/pipx/) to install `mk`\nto avoid potential dependency conflicts. You can use `pip3 install --user mk` as\nwell.\n\n```shell\npipx install mk\n```\n\n## How it works\n\n`mk` inspects the current core repository and detects build tools used by the\nproject, like pre-commit, tox, npm and exposes their commands to the user in a\n**predictable** way.\n\nFor example, you should be able to lint any code repository running only\n`mk lint`, regardless of author preference for picking one way to execute them\nor another.\n\nBe assured that `mk` does not make use of AI to guess what needs to run. As most\nprojects use relatively similar patterns, it is easy to identify the one to\nexecute.\n\nAt this moment, if two tools expose the same command name, the tool will add a\nnumber to its name. In the future, we may decide to either chain them under a\nsingle name or allow some tools to shadow others and avoid duplicates.\n\n## What are the main benefits\n\nOne of the benefits of `mk` is that it should reduce the amount of\nhow-to-contribute documentation the author needs to write.\n\nA considerable amount of maintainer effort can go into producing documentation\nthat makes it easier for someone to contribute.\n\nSome projects are less affected than others. That is usually related to how well\nthe potential contributors know the practices used by the project. Still, if\nyour project has a wide range of uses, you will quickly discover that newbie\ncontributors may hit a knowledge wall. Such a barrier will likely prevent most\nof them from becoming active contributors. The remaining ones will flood the\nproject with questions, distracting other maintainers from doing more advanced\ntasks.\n\nUnless you want to deter contributions, you should plan to make it as easy as\npossible for people to contribute. That is one area where `mk` aims to help.\n\n## Aliases\n\nSimilar to [git aliases](https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases),\n`mk` allows typing as little as possible by automatically aliasing commands. For\nexample, you can run `mk lint` just by typing `mk l` as long there is no other\ncommand starting with the same letter. Aliases are available for one, two and\nthree letters prefixes.\n\n## Using mk to propose changes to projects\n\nInstead of writing a long list of tasks to follow, we can use a tool that tells\nhim what to do next. For example, `mk` has a built-in command named `up(load)`\nthat aims to ease preparing a local change from being proposed to the project.\n\nThis command detects if it should use GitHub workflow or Gerrit and will run the\nappropriate commands for opening or updating a CR/PR. Users will be allowed to\nupload a change only after passing the minimal set of local tests, preventing\nnoisy mistakes or clog CI/CD pipelines.\n\nIn addition to linting, it will also check that the repository is not in dirty\nstatus or that the testing did not leave untracked files.\n\n## Planned features\n\n- A persistent state of each command run - This means that it will know if a\n  specific command was run and if it failed or not. The state would be linked to\n  the repository state, so modifying a tracked file would reset the state to be\n  unknown. (#20)\n- Configuration file where additional actions can be added. (#21)\n- Dependencies between commands. While some tools support dependencies, many do\n  not. You should be able to declare that a specific command will run only after\n  another one already passed. (#22)\n- Ability to generate CI/CD pipelines so the user would spend less time writing\n  non-portable configurations. (#23)\n\n[make]: https://www.gnu.org/software/make/\n[nox]: https://nox.thea.codes/en/stable/\n[npm]: https://www.npmjs.com/\n[pre-commit]: https://pre-commit.com/\n[taskfile]: https://taskfile.dev/#/\n[tox]: https://github.com/tox-dev/tox/\n[waf]: https://waf.io/\n[yarn]: https://yarnpkg.com/\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "mk",
    "version": "2.7.0",
    "project_urls": {
        "changelog": "https://github.com/pycontribs/mk/releases",
        "documentation": "https://mk.readthedocs.io/",
        "homepage": "https://github.com/pycontribs/mk",
        "repository": "https://github.com/pycontribs/mk"
    },
    "split_keywords": [
        "mk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55cab9845c652d8c4416dca9eb8aee50d469bde004ff38da4335632471c68731",
                "md5": "7a9e8f9a07e54b84f60f2ca22e1d1517",
                "sha256": "1c8723302dc8e814f941c1e8e07c0914c67ae3a1ab35e66c2c52938ceca7e785"
            },
            "downloads": -1,
            "filename": "mk-2.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7a9e8f9a07e54b84f60f2ca22e1d1517",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 25908,
            "upload_time": "2024-09-25T16:35:38",
            "upload_time_iso_8601": "2024-09-25T16:35:38.220390Z",
            "url": "https://files.pythonhosted.org/packages/55/ca/b9845c652d8c4416dca9eb8aee50d469bde004ff38da4335632471c68731/mk-2.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb209c4f75b2fdcfd4f3269f32bb8a59288390c2234a369f744a6699a19dd3bd",
                "md5": "f184efb0c5b2fcf2cdfe30f4db183c77",
                "sha256": "38841955dc8bb710a60758de4b6cb309ffba3e1d15f294764d5d8ae474f88109"
            },
            "downloads": -1,
            "filename": "mk-2.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f184efb0c5b2fcf2cdfe30f4db183c77",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 221056,
            "upload_time": "2024-09-25T16:35:39",
            "upload_time_iso_8601": "2024-09-25T16:35:39.554953Z",
            "url": "https://files.pythonhosted.org/packages/bb/20/9c4f75b2fdcfd4f3269f32bb8a59288390c2234a369f744a6699a19dd3bd/mk-2.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-25 16:35:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pycontribs",
    "github_project": "mk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "mk"
}
        
Elapsed time: 0.33013s