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.36.1 - January 02, 2025¶
- Github cannot retrieve the associated pull request. For now we'll rely on the commit message but we may lose the pull request number and other information. This should be reverted once Github address the issue.
0.36.0 - August 15, 2024¶
- Do not create image names with the architecture in it. Instead the architecture should be added as a tag.
0.35.2 - June 18, 2024¶
- Add missing docker tag. There was other parts of the code that were missing the default branch tag.
0.35.1 - June 17, 2024¶
m npm add_tagsno longer attempts to tagv#.#since these are npm sem versions.
Tags that can be interpreted as valid semver ranges will be rejected. For example, v1.4 cannot be used as a tag, because it is interpreted by semver as >=1.4.0 <1.5.0. See https://github.com/npm/npm/issues/6082.
-
m npm add_tagsrequires the--branchoption. When we tag aslatestwe also need to provide the name of the branch in which we are building the package. The env var$M_BRANCHshould be passed to the option. -
Fix missing docker tag creation. When creating the
latesttag we were also missing the default branch tag.
0.35.0 - June 13, 2024¶
- Update
npm_tagsto semi-match output withdocker_tags. - Allow simple bash steps to be inserted into Github actions. This may be
necessary if we need to run
pipcommands or any other setup steps before the main python action. - Fix: when using Github actions we need to specify the path relative to the root of the project. In this case when we specify an action file we need to find out the number of parent directories to be able to obtain the root.
- feat: Add
m npm add_tags. This command allows us to add tags to a package in the npm registry. This is useful when we want to add tags to a package that has already been published. Note that this will add docker tags generated based on the published version. - Add next step instructions to
m start_releaseandm review_release.
0.34.3 - May 23, 2024¶
- Use
--loadwithdocker buildx build. See https://github.com/docker/buildx/issues/59#issuecomment-1168619521
0.34.2 - May 08, 2024¶
- Add
dependabotas a default bypasser for theCHANGELOG.mdcheck.
0.34.1 - May 08, 2024¶
- Provide another way to bypass the check for
CHANGELOG.mdwhen creating a pull request. We can addchangelog_bypassersin themconfiguration to a list of github usernames that are allowed to bypass the check. this is useful for bots likedependabot.
0.34.0 - May 06, 2024¶
- We may provide
platformsin themconfiguration. 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 specifylinux/arm64in there.
0.33.1 - March 27, 2024¶
use_buildxis set totrueby 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_buildxflag tomconfiguration to try use a buildx command when creating multi-arch manifests. See https://docs.docker.com/reference/cli/docker/buildx/imagetools/create/ Defaults tofalse. In the future it may be set totrueby default or removed completely if the buildx command replaces the old way. - The
m ci envcommand will fail if pull requests do not modify theCHANGELOG.mdfile. 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 setrequire_pr_changelogtofalsein themconfiguration. 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
containerwe expect the developer to specify the environment variables, in particular make sure to specifyARCH: ${{ matrix.arch }}.
0.32.0 - March 16, 2024¶
- Allow branches to be prefixed with
releaseandhotfix. We are still not checking for the patternrelease/x.y.zbut we should now be able to name a branchrelease-*orhotfix-ticket#. - The
mconfiguration allows the declaration of other inputs for a Github workflow. This can be added by declaringworkflow_inputs. - The
mconfiguration allows the use of a container to use to build the image for the workflow. This can be added by declaringcontainer. This is needed in cases where the runner may be missing other tools that are needed in the extra steps. m end_releaseperformsgit pullat the end of the process. This is to ensure that the latest changes are in the default branch.m blueprintsuses latest github actions (v4).
0.31.1 - November 14, 2023¶
- Compatibility with
pydantic2.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_iffield toRunStepandUsesStep. 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_emptyandenv_varargparse 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_existsargparse validator.
0.29.4 - September 27, 2023¶
- Wraps colors around
\[and\]for colors in$PS1. See https://unix.stackexchange.com/a/157884
0.29.3 - September 26, 2023¶
- Pydantic 2.4.1 no longer passes
json_schema_extrainFieldas is. Instead it gets json serialized. The end result is that we cannot have functions in it. The internal implementation inmhas 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_manifestsin 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 thedocker_configfield in themfile will create a set of shell scripts that can be used to create, tag, and push docker images. Seetests/blueprintsfor examples onm/m.yamlfiles and the scripts it creates in their respectivefixturesdirectories.
0.28.0 - September 14, 2023¶
- Add
--major-onlyoption tom git tag_release. This option allows us to only update the major version tag. - This project is switching to only moving the
majortag 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_releasewhen 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_releaseworks in github workflows. Please note that if you are running in a container you will need to add
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 afterm github releaseto 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 formx.y.z.
0.26.0 - September 09, 2023¶
- Add
--sectiontom devcontainer bashrcso that we may specify a bashrc snippet that we want to print. - Add
--bashrctom ci envto print a bashrc snippet.
0.25.2 - September 06, 2023¶
bashrccode snippet avoids alias declaration in a CI environment.
0.25.1 - September 05, 2023¶
- Fix issues with
pnpm_setupnot creating a directory as well as virtual environment for a project.
0.25.0 - September 05, 2023¶
- Add
devcontainercommand group tomcli. It includes bashrc: used to print a snippet that should be source on a.bashrcfile.greet: displays a message with devcontainer information. To be used in thepostStartCommandsection of a devcontainer file.pnpm_setup: to be used in thepostStartCommandto setup all the the necessary symlinks forpnpmto be efficient in all docker containers regardless of the host.pnpm: a wrapper aroundpnpmto perform thepnpmcommand 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
RemainderArgstom.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__.pyfile to define the cli commands. - Deprecated
run_cliusage. Instead useexec_cli. This was done so that we can delegate the responsibility of coming up with cli commands to other functions. - If
run_cliwas using theadd_argparameter then define theadd_argumentsfunction at the root of the command modules. Seem/cli/commands/__init__.pyas an example. - Add
import_cli_commands. This function allows us to import cli commands from a module and use them in theexec_clifunction. - Add
cli_commands,command_groupandsubcommandstom.cli. These are functions to help generate cli commands to be used inexec_cli. - Add
merge_cli_commandstom.cli. This function allows us to merge cli commands from different modules to create a single cli command. - Deprecate use of
nameparameter incommanddecorator. 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
Metato help define information about a group of cli commands.
0.23.0 - August 21, 2023¶
- Migrated to pydantic v2.
- Add
ruffsupport tom ci celtcommand.
- Added
m.cli.Argandm.cli.ArgProxy. These are replacements for pydantic'sFieldsince this function no longer supports theextrakeyword arguments. - Added
m.core.hone. Helps avoid writing a lambda when trying to handle anIssue. Instead of
we can write
- Added
m.core.Res. This is an alias forOneOf[Issue, G]so that we only have to specify the type of the "Result" or "Response". - Added
exceptionmethod and other wrappers to theLoggerclass. - Added
parse_modelandload_modeltom.pydantic. These utilities allow us to parse and load a data from files. - Deprecated
add_arg. Instead of
we can write
OneOfis no longer a base class forBadandGood. Instead we useUnion[Bad, Good]to define aOneOf. Since python does not support type narrowing in the negative case we have to rely onisinstanceto check if an object isGoodorBadand be able to access thevaluewithout having to cast. See https://github.com/python/typing/discussions/1013.- Deprecated
is_goodandis_bad. Instead useisinstanceto check if an object isGoodorBad. Doing so will prevent having to cast the object to be able to extract the value when usingOneOf.
0.22.1 - July 27, 2023¶
- Add
argcompleteas 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
mcli #86.
0.21.0 - April 27, 2023¶
- The
build_tag_with_versionbumps 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.yamlis missing. - no longer publishing to npmjs or github
- improved devcontainer
- all files are formatted with prettier
0.19.3 - April 14, 2023¶
review_releaseignores previously closed prs.
0.19.2 - April 10, 2023¶
- Support python 3.11.
Foo.BARin 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 theFoo.BARmember class. - See https://blog.pecar.me/python-enum. For now the fix involves overriding the
magic method
__str__but should consider usingStrEnum.
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
typescriptprocessor tom 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 initcreatesm.yaml.- release tools handle
m.yamlfiles as well asm.jsonfiles.
0.17.0 - March 14, 2023¶
- Deprecate
reviewRelease. Instead usem 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
mconfiguration validation to pydantic. m.cli.validate_json_payloadhandlesyamlfiles. Commands that use this validator can now handle.json,.yamland.ymlextensions.mconfiguration file is expected to have extension.yaml,.ymlor.json. Projects should continue using.jsonextension for now sincereviewReleaseis is not aware ofm.yaml.- Removed bash test files - everything is covered via
pytest.
0.16.1 - March 13, 2023¶
end_releasefails because default branch already exists.
0.16.0 - March 13, 2023¶
- Deprecate
endRelease. Instead we can usem 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_releasefails when a project has not done any releases. Command now does an exception for the case when the latest release is0.0.0and 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
startReleaseandstartHotfix. These two bash scripts have been rewritten in python. Instead use can usem start_releaseandm start_hotfix. m release_setuphas been switched to use a logger.yamloutput has been introduced as well as colors. Currently the only way to disable colors is by using the env varNO_COLOR=true.- All cli errors default to
yamlformat.
0.14.0 - February 20, 2023¶
- Update
m initto provide information on what it does - Logger formatter defaults to using colors. May be disabled with
NO_COLOR=trueenv var. m.log.colorsprovides thecolorfunction to format any message with color.
0.13.0 - February 18, 2023¶
- Moved
ciToolsto them.logmodule. From here onprintstatements will be substituted bylogger.info. run_mainrenamed parameters, useresult_handlerandissue_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, usingcommandand pydantic model instead. Issue.datareplaced byIssue.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 version999.0.0-would not target pre-releases so using0.0.0is 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_responsehas 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
npmcli command which allows the use ofclean_tagsubcommand. - Remove deprecated function
call_main, userun_main.
0.9.0 - June 21, 2022¶
- Add
build_tag_with_versiontomconfiguration: Allows build tags to use the current version instead of0.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¶
- Make
mmypycomptabible - Linting and tests added.
0.7.1 - March 07, 2022¶
- Require
typing_extensionson 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 celthas-ioption 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 celtaccepts-1as a valid value for the-moption. This will print all the errors instead of partially showing them.-soption inceltremoves error allownances that are set to zero.
0.5.0 - September 11, 2021¶
- Breaking Change: Renamed
m ci linttom ci celt. celtcli 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 matchesoldfornew. 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_releaseto check the latest version of a github repo. - Fix issues with
startRelease.shandstartHotfix.shauthenticating to github by using thelatest_releasecommand.
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.shandstartHotfix.sh.
Features:
- Add
reviewRelease.shto quickly commit the changes and open up a PR. - Add
endRelease.shto merge the PR.
0.2.0 - August 25, 2021¶
- Add
-m, --max-linestom ci lintcommand. 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_mainand 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 lintbased 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_secondsfunction. - Deprecate
call_main: userun_main run_mainallows us to handle the results and issues.-
m ci lintsupports 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.