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.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_tags
no 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_tags
requires the--branch
option. When we tag aslatest
we also need to provide the name of the branch in which we are building the package. The env var$M_BRANCH
should be passed to the option. -
Fix missing docker tag creation. When creating the
latest
tag we were also missing the default branch tag.
0.35.0 - June 13, 2024¶
- Update
npm_tags
to semi-match output withdocker_tags
. - Allow simple bash steps to be inserted into Github actions. This may be
necessary if we need to run
pip
commands 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_release
andm review_release
.
0.34.3 - May 23, 2024¶
- Use
--load
withdocker buildx build
. See https://github.com/docker/buildx/issues/59#issuecomment-1168619521
0.34.2 - May 08, 2024¶
- Add
dependabot
as a default bypasser for theCHANGELOG.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 addchangelog_bypassers
in them
configuration 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
platforms
in them
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 specifylinux/arm64
in there.
0.33.1 - March 27, 2024¶
use_buildx
is set totrue
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 tom
configuration 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 totrue
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 theCHANGELOG.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 setrequire_pr_changelog
tofalse
in them
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 specifyARCH: ${{ matrix.arch }}
.
0.32.0 - March 16, 2024¶
- Allow branches to be prefixed with
release
andhotfix
. We are still not checking for the patternrelease/x.y.z
but we should now be able to name a branchrelease-*
orhotfix-ticket#
. - The
m
configuration allows the declaration of other inputs for a Github workflow. This can be added by declaringworkflow_inputs
. - The
m
configuration 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_release
performsgit 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 toRunStep
andUsesStep
. 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
andenv_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¶
- 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_extra
inField
as is. Instead it gets json serialized. The end result is that we cannot have functions in it. The internal implementation inm
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 thedocker_config
field in them
file will create a set of shell scripts that can be used to create, tag, and push docker images. Seetests/blueprints
for examples onm/m.yaml
files and the scripts it creates in their respectivefixtures
directories.
0.28.0 - September 14, 2023¶
- Add
--major-only
option tom 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
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 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 formx.y.z
.
0.26.0 - September 09, 2023¶
- Add
--section
tom devcontainer bashrc
so that we may specify a bashrc snippet that we want to print. - Add
--bashrc
tom 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 tom
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 thepostStartCommand
section of a devcontainer file.pnpm_setup
: to be used in thepostStartCommand
to setup all the the necessary symlinks forpnpm
to be efficient in all docker containers regardless of the host.pnpm
: a wrapper aroundpnpm
to perform thepnpm
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
tom.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 useexec_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 theadd_arg
parameter then define theadd_arguments
function at the root of the command modules. Seem/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 theexec_cli
function. - Add
cli_commands
,command_group
andsubcommands
tom.cli
. These are functions to help generate cli commands to be used inexec_cli
. - Add
merge_cli_commands
tom.cli
. This function allows us to merge cli commands from different modules to create a single cli command. - Deprecate use of
name
parameter incommand
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 tom ci celt
command.
- Added
m.cli.Arg
andm.cli.ArgProxy
. These are replacements for pydantic'sField
since this function no longer supports theextra
keyword 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
exception
method and other wrappers to theLogger
class. - Added
parse_model
andload_model
tom.pydantic
. These utilities allow us to parse and load a data from files. - Deprecated
add_arg
. Instead of
we can write
OneOf
is no longer a base class forBad
andGood
. Instead we useUnion[Bad, Good]
to define aOneOf
. Since python does not support type narrowing in the negative case we have to rely onisinstance
to check if an object isGood
orBad
and be able to access thevalue
without having to cast. See https://github.com/python/typing/discussions/1013.- Deprecated
is_good
andis_bad
. Instead useisinstance
to check if an object isGood
orBad
. 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
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 theFoo.BAR
member 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
typescript
processor 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 init
createsm.yaml
.- release tools handle
m.yaml
files as well asm.json
files.
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
m
configuration validation to pydantic. m.cli.validate_json_payload
handlesyaml
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 sincereviewRelease
is is not aware ofm.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 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_release
fails when a project has not done any releases. Command now does an exception for the case when the latest release is0.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
andstartHotfix
. These two bash scripts have been rewritten in python. Instead use can usem start_release
andm 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 varNO_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 thecolor
function to format any message with color.
0.13.0 - February 18, 2023¶
- Moved
ciTools
to them.log
module. From here onprint
statements will be substituted bylogger.info
. run_main
renamed parameters, useresult_handler
andissue_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
, usingcommand
and pydantic model instead. Issue.data
replaced 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.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 ofclean_tag
subcommand. - Remove deprecated function
call_main
, userun_main
.
0.9.0 - June 21, 2022¶
- Add
build_tag_with_version
tom
configuration: 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
m
mypy
comptabible - Linting and tests added.
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 incelt
removes error allownances that are set to zero.
0.5.0 - September 11, 2021¶
- Breaking Change: Renamed
m ci lint
tom 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 matchesold
fornew
. 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
andstartHotfix.sh
authenticating to github by using thelatest_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
andstartHotfix.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
tom 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
: userun_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.