Skip to content

Changelog

The format of this changelog is based on Keep a Changelog. The project adheres to Semantic Versioning

Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

Unreleased

0.34.2 - May 08, 2024

  • Add dependabot as a default bypasser for the CHANGELOG.md check.

0.34.1 - May 08, 2024

  • Provide another way to bypass the check for CHANGELOG.md when creating a pull request. We can add changelog_bypassers in the m configuration to a list of github usernames that are allowed to bypass the check. this is useful for bots like dependabot.

0.34.0 - May 06, 2024

  • We may provide platforms in the m configuration. This is helpful when we do not have access to different architectures. In this case the architecture flag is still needed but they can be build in the same runner. When platform is provided we can specify linux/arm64 in there.

0.33.1 - March 27, 2024

  • use_buildx is set to true by default. This flag will go away in the future and the buildx command will be used by default.

0.33.0 - March 26, 2024

  • Add use_buildx flag to m configuration to try use a buildx command when creating multi-arch manifests. See https://docs.docker.com/reference/cli/docker/buildx/imagetools/create/ Defaults to false. In the future it may be set to true by default or removed completely if the buildx command replaces the old way.
  • The m ci env command will fail if pull requests do not modify the CHANGELOG.md file. This is to ensure that we are keeping track of the changes that are being made to the project. If we need to bypass it we can set require_pr_changelog to false in the m configuration. NOTE: Pull requests with more than 100 file changes will not be checked.

0.32.1 - March 17, 2024

  • Revert docker/login-action@v4. There is no such version.
  • When using container we expect the developer to specify the environment variables, in particular make sure to specify ARCH: ${{ matrix.arch }}.

0.32.0 - March 16, 2024

  • Allow branches to be prefixed with release and hotfix. We are still not checking for the pattern release/x.y.z but we should now be able to name a branch release-* or hotfix-ticket#.
  • The m configuration allows the declaration of other inputs for a Github workflow. This can be added by declaring workflow_inputs.
  • The m configuration allows the use of a container to use to build the image for the workflow. This can be added by declaring container. This is needed in cases where the runner may be missing other tools that are needed in the extra steps.
  • m end_release performs git pull at the end of the process. This is to ensure that the latest changes are in the default branch.
  • m blueprints uses latest github actions (v4).

0.31.1 - November 14, 2023

  • Compatibility with pydantic 2.5.
  • Devtools: Set mypy to 1.6.1 since newest version complains about some annotations. To be worked out in the next version.

0.31.0 - November 13, 2023

  • Add run_if field to RunStep and UsesStep. This field allows us to specify a condition that must be met in order to execute the step.

0.30.0 - November 09, 2023

  • Update text for autogenerated files
  • Switch to mkdocs.
  • Add env_var_or_empty and env_var argparse validators. These are necessary so that we can avoid displaying the current value of the environment variable when generating the documentation. This can be consider a breaking change in the CLI since it will no longer display the value of the environment.
  • Add github actions utilities to help us maintain Github actions.
  • Add validate_file_exists argparse validator.

0.29.4 - September 27, 2023

0.29.3 - September 26, 2023

  • Pydantic 2.4.1 no longer passes json_schema_extra in Field as is. Instead it gets json serialized. The end result is that we cannot have functions in it. The internal implementation in m has been changed so that we may continue passing validators in that field. This should be better since we now bypass a serialization step to find out the model schemas on the CLI.

0.29.2 - September 25, 2023

  • Manifests jobs for multi-architecture builds may fail if there are too many of them running at once. To avoid this we can specify max_parallel_manifests in the docker configuration so that it will add it to the github workflow. see more info at https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#defining-the-maximum-number-of-concurrent-jobs

0.29.1 - September 25, 2023

  • compute proper architecture when running locally. We may need to add other entries to the arch map.

0.29.0 - September 25, 2023

  • add m blueprints. This command combined with the docker_config field in the m file will create a set of shell scripts that can be used to create, tag, and push docker images. See tests/blueprints for examples on m/m.yaml files and the scripts it creates in their respective fixtures directories.

0.28.0 - September 14, 2023

  • Add --major-only option to m git tag_release. This option allows us to only update the major version tag.
  • This project is switching to only moving the major tag and drops the minor version tag.

0.27.3 - September 13, 2023

  • Typo on code. I hope this is the last hotfix for m git tag_release.

0.27.2 - September 13, 2023

  • Fix m git tag_release when executing on github actions. Need to first fetch the tag that needs to be deleted.

0.27.1 - September 13, 2023

  • No changes to library. This release is to verify that m git tag_release works in github workflows. Please note that if you are running in a container you will need to add
git config --global --add safe.directory "$GITHUB_WORKSPACE"

before running m git tag_release.

0.27.0 - September 13, 2023

  • Add m git tag_release. This command allows us to tag a release. It is meant to be used after m github release to create git tags that keep track of the major and minor versions of a project. It assumes that the version provided is a valid semver of the form x.y.z.

0.26.0 - September 09, 2023

  • Add --section to m devcontainer bashrc so that we may specify a bashrc snippet that we want to print.
  • Add --bashrc to m ci env to print a bashrc snippet.

0.25.2 - September 06, 2023

  • bashrc code snippet avoids alias declaration in a CI environment.

0.25.1 - September 05, 2023

  • Fix issues with pnpm_setup not creating a directory as well as virtual environment for a project.

0.25.0 - September 05, 2023

  • Add devcontainer command group to m cli. It includes
  • bashrc: used to print a snippet that should be source on a .bashrc file.
  • greet: displays a message with devcontainer information. To be used in the postStartCommand section of a devcontainer file.
  • pnpm_setup: to be used in the postStartCommand to setup all the the necessary symlinks for pnpm to be efficient in all docker containers regardless of the host.
  • pnpm: a wrapper around pnpm to perform the pnpm command in a mounted volume.
  • prompter: a command line prompt that can be used in bash to display the current git status.
  • require_env_vars: meant to stop a bash script if the specified env vars are not defined.
  • Add RemainderArgs to m.cli. This is helpful to specify that we want to obtain the rest of the arguments so that we may pass it to another process.

0.24.0 - September 03, 2023

  • Any module can be used as a cli command. If the module is a package then we can use the __main__.py file to define the cli commands.
  • Deprecated run_cli usage. Instead use exec_cli. This was done so that we can delegate the responsibility of coming up with cli commands to other functions.
  • If run_cli was using the add_arg parameter then define the add_arguments function at the root of the command modules. See m/cli/commands/__init__.py as an example.
  • Add import_cli_commands. This function allows us to import cli commands from a module and use them in the exec_cli function.
  • Add cli_commands, command_group and subcommands to m.cli. These are functions to help generate cli commands to be used in exec_cli.
  • Add merge_cli_commands to m.cli. This function allows us to merge cli commands from different modules to create a single cli command.
  • Deprecate use of name parameter in command decorator. This is no longer needed since we can use the module name as the command name or any other name if manually defining the cli.
  • Add Meta to help define information about a group of cli commands.

0.23.0 - August 21, 2023

  • Migrated to pydantic v2.
  • Add ruff support to m ci celt command.
m ci celt -t ruff -c @config.json < <(ruff check --format json [dir])
  • Added m.cli.Arg and m.cli.ArgProxy. These are replacements for pydantic's Field since this function no longer supports the extra keyword arguments.
  • Added m.core.hone. Helps avoid writing a lambda when trying to handle an Issue. Instead of
res.flat_map_bad(lambda err: issue('new error message', cause=err, context=context))

we can write

res.flat_map_bad(hone('git stash failure', context=context))
  • Added m.core.Res. This is an alias for OneOf[Issue, G] so that we only have to specify the type of the "Result" or "Response".
  • Added exception method and other wrappers to the Logger class.
  • Added parse_model and load_model to m.pydantic. These utilities allow us to parse and load a data from files.
  • Deprecated add_arg. Instead of
  prop: str = Field(
      json_schema_extra={
          'proxy': add_arg(
              '--opt',
              help='help description',
          ),
      },
  )

we can write

  prop: str = ArgProxy(
    '--opt',
    help='help description',
  )
  • OneOf is no longer a base class for Bad and Good. Instead we use Union[Bad, Good] to define a OneOf. Since python does not support type narrowing in the negative case we have to rely on isinstance to check if an object is Good or Bad and be able to access the value without having to cast. See https://github.com/python/typing/discussions/1013.
  • Deprecated is_good and is_bad. Instead use isinstance to check if an object is Good or Bad. Doing so will prevent having to cast the object to be able to extract the value when using OneOf.

0.22.1 - July 27, 2023

  • Add argcomplete as a dependency.

0.22.0 - July 27, 2023

  • Fix circular import bug. python -c 'from m.core.io import env' should not fail.
  • Completions for the m cli #86.

0.21.0 - April 27, 2023

  • The build_tag_with_version bumps the current version to the next minor version and uses it when generating the m tag.

0.20.2 - April 27, 2023

  • no changes once again.

0.20.1 - April 27, 2023

  • no changes, making sure the release process works.

0.20.0 - April 27, 2023

  • update error message explaining m.yaml is missing.
  • no longer publishing to npmjs or github
  • improved devcontainer
  • all files are formatted with prettier

0.19.3 - April 14, 2023

  • review_release ignores previously closed prs.

0.19.2 - April 10, 2023

  • Support python 3.11. Foo.BAR in Python 3.11 no longer returns the member value "bar" when used in the format() function or f-strings the way that prior Python versions used to. Instead, it returns the Foo.BAR member class.
  • See https://blog.pecar.me/python-enum. For now the fix involves overriding the magic method __str__ but should consider using StrEnum.

0.19.1 - March 29, 2023

  • Prevent failure when pull requests are done by accounts that may not have an email.

0.19.0 - March 21, 2023

  • Add typescript processor to m ci celt.

0.18.1 - March 15, 2023

  • Fix pull request description for the git flow (bad comparison link).
  • Yaml dumper handles string enums.

0.18.0 - March 15, 2023

  • m init creates m.yaml.
  • release tools handle m.yaml files as well as m.json files.

0.17.0 - March 14, 2023

  • Deprecate reviewRelease. Instead use m review_release.
  • Add m review_release. It creates the backport pull request first so that the logs point to the build with actual contents (for git flow projects).
  • Delegate m configuration validation to pydantic.
  • m.cli.validate_json_payload handles yaml files. Commands that use this validator can now handle .json, .yaml and .yml extensions.
  • m configuration file is expected to have extension .yaml, .yml or .json. Projects should continue using .json extension for now since reviewRelease is is not aware of m.yaml.
  • Removed bash test files - everything is covered via pytest.

0.16.1 - March 13, 2023

  • end_release fails because default branch already exists.

0.16.0 - March 13, 2023

  • Deprecate endRelease. Instead we can use m end_release.
  • When ending a release it switches to the default branch.
  • Previously a release could only be finished by the user who started it. This can now be done by any user as long as they switch to the release/hotfix branch and execute m end_release.

0.15.2 - March 04, 2023

  • m start_release fails when a project has not done any releases. Command now does an exception for the case when the latest release is 0.0.0 and avoids checking for commits.

0.15.1 - February 25, 2023

  • Require pygments >= 2.14.0 and python >= 3.10.

0.15.0 - February 24, 2023

  • Deprecate startRelease and startHotfix. These two bash scripts have been rewritten in python. Instead use can use m start_release and m start_hotfix.
  • m release_setup has been switched to use a logger.
  • yaml output has been introduced as well as colors. Currently the only way to disable colors is by using the env var NO_COLOR=true.
  • All cli errors default to yaml format.

0.14.0 - February 20, 2023

  • Update m init to provide information on what it does
  • Logger formatter defaults to using colors. May be disabled with NO_COLOR=true env var.
  • m.log.colors provides the color function to format any message with color.

0.13.0 - February 18, 2023

  • Moved ciTools to the m.log module. From here on print statements will be substituted by logger.info.
  • run_main renamed parameters, use result_handler and issue_handler.
  • Introducing environment variables DEBUG_M_[INSERT_SOMETHING_HERE]. More on that later in the docs. These are meant to make things a bit more verbose in a local environment.

0.12.2 - February 09, 2023

  • Fix m ci npm_tag: Versions with multiple digits not being properly matched.

0.12.1 - February 02, 2023

  • skip release to npmjs - previous job did not publish to pypi.

0.12.0 - February 01, 2023

  • Using a devcontainer for local development and pipelines.
  • 100% python test coverage.

Breaking Changes:

  • cli utilities no longer use add_parser, using command and pydantic model instead.
  • Issue.data replaced by Issue.context.

0.11.2 - October 13, 2022

  • Github graphql changed the order of releases. This hotfix is explicit about the order in which we want them to obtain the latest release.

0.11.1 - September 30, 2022

  • Revert version prefix. To specify prereleases in npm we need to do >0.0.0-b <0.0.1. Using version 999.0.0- would not target pre-releases so using 0.0.0 is a shorter string.

0.11.0 - September 30, 2022

  • Version prefix for non releases are now 999.0.0-. This is done so that the semver may work when installing pull request builds.
  • fetch_response has been added so that we may have access to the response object as well. This is helpful when we need to inspect response headers.

0.10.1 - September 12, 2022

  • Add python 3.7 as a supported version.

0.10.0 - August 01, 2022

  • Add npm cli command which allows the use of clean_tag subcommand.
  • Remove deprecated function call_main, use run_main.

0.9.0 - June 21, 2022

  • Add build_tag_with_version to m configuration: Allows build tags to use the current version instead of 0.0.0.
  • Docusaurus have been introduced. There is no docs yet but the static site can be accessed at https://jmlopez-rod.github.io/m/

0.8.0 - March 15, 2022

0.7.1 - March 07, 2022

  • Require typing_extensions on python installations.

0.7.0 - March 06, 2022

fixes: m ci celt fails when project has no errors 669bc54

changes: Trying not to use Popen to make bash calls 6babc6be

features: Publishing to npmjs and pypi. Only releases are published to the public registries. In github we can access the package from prs and the latest on the master branch.

0.6.0 - September 14, 2021

  • m ci celt has -i option to ignore error allowance. This is helpful when working on single files or the whole project and we want to see all the errors without having to edit the configuration.
  • m ci celt accepts -1 as a valid value for the -m option. This will print all the errors instead of partially showing them.
  • -s option in celt removes error allownances that are set to zero.

0.5.0 - September 11, 2021

  • Breaking Change: Renamed m ci lint to m ci celt.
  • celt cli command adds the following options:
  • --full-message: Display the whole error message (useful with pylint)
  • --file-regex: When provided it only displays errors of files matching it.
  • --file-prefix: A string of the form [old]:[new]. It modifies a file prefix that matches old for new. Useful to display file paths when running in docker.
  • --stats-only: Displays the current number of violations for each rule.

0.4.0 - September 02, 2021

  • Add m github latest_release to check the latest version of a github repo.
  • Fix issues with startRelease.sh and startHotfix.sh authenticating to github by using the latest_release command.

0.3.1 - September 02, 2021

  • Fix startRelease and startHotfix scripts. When starting a release, the script cannot detect the latest version by fetching the tags when using the git-flow because the latest tag is in the master branch not develop.

0.3.0 - September 01, 2021

Breaking Changes:

  • releaseFrom field is no longer used in the m configuration.
  • To continue releasing versions we need to specify a "workflow":
  • free_flow: No version, only tags.
  • m_flow: Uses versions but only the master branch is needed.
  • git_flow: Users versions and it uses master and develop branch.
  • Removed releaseSetup.sh. Instead we should use:
  • startRelease.sh and startHotfix.sh.

Features:

  • Add reviewRelease.sh to quickly commit the changes and open up a PR.
  • Add endRelease.sh to merge the PR.

0.2.0 - August 25, 2021

  • Add -m, --max-lines to m ci lint command. It allows us to specify the maximum lines that the command should display per error. It defaults to 5.
  • Fix releaseSetup.sh output. With the deprecation of call_main and a previous change that was done to it, the releaseSetup and other commands display 0 after a successful run.

0.1.0 - August 21, 2021

  • Order results from m ci lint based on the number of errors found.
  • Add command line option to specify branch when creating a github release.

0.0.3 - August 14, 2021

  • Issue objects can hide the traceback from displaying
  • Add format_seconds function.
  • Deprecate call_main: use run_main
  • run_main allows us to handle the results and issues.
  • m ci lint supports the output of

  • eslint

  • pycodestyle
  • pylint

The tool allows us to make the linters continue with the ci process as long as we do not introduce any more errors. See more details by checking the help options m ci lint -h.

0.0.2 - July 28, 2021

  • Adds github release command.
  • releaseSetup.sh allows creation of release from any branch.
  • Fixes issues with http module that may arise when a response is 500.

0.0.1 - July 05, 2021

  • Provides basic utilities to create a CI/CD flow via the m cli.
  • As a library, it facilities the creation of clis similar to m.