Package: acsoo
This is a set of command-line utilities to facilitate
the Odoo development workflow at Acsone.It assumes the project is a setuptools-based python package
that can be packaged and installed with pip.ContentsInstallationWhat we have hereInitialize a new projectacsoo pr-statusacsoo tagacsoo tag-requirementsacsoo checklogDeprecated commandsacsoo addonsacsoo freezeacsoo wheelacsoo releaseacsoo flake8acsoo pylintacsoo.cfgUseful linksMaintainerChanges3.1.0 (2021-01-04)3.0.2 (2020-10-14)3.0.1 (2020-07-29)3.0.0 (2020-07-01)2.1.0 (2020-05-25)2.0.0 (2020-01-15)1.9.0 (2019-02-28)1.8.3 (2019-01-22)1.8.2 (2018-11-05)1.8.1 (2018-10-30)1.8.0 (2018-10-29)1.7.1 (2018-07-15)1.7.0 (2018-06-04)1.6.0 (2018-02-16)1.5.0 (2017-09-19)1.4.3 (2017-06-16)1.4.2 (2017-06-16)1.4.1 (2017-06-14)1.4.0 (2017-06-13)1.3.0 (2017-06-04)1.2.2 (2017-05-30)1.2.1 (2017-05-27)1.1.0 (2017-05-25)1.0.1 (2017-05-21)Criteria for tools to be included here:being small wrappers around standard commands (git,pip, etc)yet being sufficiently non-trivial to be error-prone or time consuming when
done manuallybeing used across several Acsone Odoo projectsInstallationpipinstall--useracsooorpipxinstallacsooNoteSinceacsoohas a lot of dependencies that are not required at runtime,
for your application, it is not recommanded to install it in the same
virtualenv as your project.To enable bash completion, add this line in your.bashrc:eval"$(_ACSOO_COMPLETE=sourceacsoo)"What we have hereBelow, the list of available commands with a few examples.Useacsoo--helporacsoo <command>--helpfor more information.Initialize a new projectmrbobacsoo:templates/projectcd{projectname}mkvirtualenv{projectname}-a.acsoo pr-statusLook for git references of the formrefs/pull/NNN/headin requirement
files and print the corresponding GitHub pull request status.acsoo tagTag the current project after ensuring everything has been commited to git.acsoo tag-requirementsTag all VCS requirements found inrequirements.txt, so
the referenced commits are not lost in case of VCS garbage collection.acsoo checklogCheck if an odoo log file contains error, with the possibility to ignore some
errors based on regular expressions.acsoochecklogodoo.logodoo-dmydb-ibase--stop-after-init|acsoochecklogacsoochecklog--ignore"WARNING.*blah"odoo.logDeprecated commandsacsoo addonsacsoo addons is deprecated: use `manifestoo
<https://pypi.org/project/manifestoo>`_ instead: it is more robust and has
better test coverage.A set of commands to print addons lists, useful when running tests.acsooaddonslistacsooaddonslist-dependsacsoo freezeDeprecated: use `pip-deepfreeze <https://pypi.org/project/pip-deepfreeze>`_
instead.Just like pip freeze, except it outputs only dependencies of the provided
distribution name.acsoo wheelThis command is deprecated, use pip >= 20.1 and do not use editable VCS
dependencies. `pip wheel -e . -r requirements.txt –wheel-dir=release` will
then give the same result, including caching of pinned VCS dependencies.Build wheels for all dependencies found inrequirements.txt,
plus the project in the current directory.The main advantage of this command (compared to a regularpip wheel -r requirements.txt -e . –wheel_dir=release –src src),
was that it maintains a cache of git dependencies that are pinned with
a sha1.acsoo releaseThis command is deprecated. Releasing is automated via .gitlab-ci. See
the `build` stage in the project template.Performacsoo tag,acsoo tag_requirementsandacsoo wheelin one command.acsoo flake8This command is deprecated, use a .flake8 file in your project,
in combination with pre-commit. See the project template for a reasonable default.Runflake8with sensible default for Odoo code.It is possible to pass additional options to theflake8command, eg:acsooflake8----ignoreE24,W504acsoo pylintThis command is deprecated, use a .pylintrc file in your project,
in combination with pre-commit. See the project template for a reasonable default.Runpylinton detected Odoo addons in odoo/addons,
odoo_addons or the current directory.
It automatically uses thepylint-odooplugin and
runs with a reasonable configuration, including an opinionated set of disabled message.It is possible to pass additional options to thepylintcommand, eg:acsoopylint----disablemissing-final-newlineThis command returns an non-zero exit code if any message is reported.
It is however possibly to display messages while reporting success, eg:acsoopylint--expectedapi-one-deprecated:2,line-too-longThe above command succeeds despite having exactly 2api-one-deprecatedor
any number ofline-too-longmessages being reported.It is also possible to force failure on messages that areexpectedin the
default configuration, eg to fail onfixmeerrors, just expect 0fixmemessages, like this:acsoopylint--expectedfixme:0acsoo.cfgA file namedacsoo.cfgat the project root helps you set sensible defaults.Here is a minimal example:[acsoo]trigram=xyzseries=10.0version=1.5.0And a more elaborate example:[acsoo]trigram=xyzseries=11.0version=1.5.2pushable=github.com:acsonegithub.com:mozaik[checklog]ignore=WARNING .* module .*:description is empty !WARNING:unable to set column .* of table account_analytic_account not nullUseful linkspypi page:https://pypi.python.org/pypi/acsonecode repository:https://github.com/acsone/acsooreport issues at:https://github.com/acsone/acsoo/issuesMaintainerThis project is maintained by ACSONE SA/NV.Changes3.1.0 (2021-01-04)pr-status: detect PR status from github pull requests URLs found in requirement files;
useful to detect them in commentsVarious improvements to the project template (in gitlab-ci.yml, and
pre-commit config, mostly)#75,#77.In acsoo tag, do not complain about empty directories#76.Deprecateacsoo freezein favor ofpip-deepfreeze.Deprecateacsoo addonsin favor ofmanifestoo.Add license and development status check to project template.Remove bumpversion from acsoo dependencies. This project is now replaced by
bump2versions, and it’s better to install it separately with pipx.3.0.2 (2020-10-14)Lift setuptools version restriction.
It has https issues with pypi.org since 2020-10-14.
his means odoo-autodiscover>=2 must be used
on Odoo<=10 projects.
See alsohttps://github.com/acsone/setuptools-odoo/issues/10.3.0.1 (2020-07-29)[REM] Remove mrbob dependency as pip >= 20.2 make install crash3.0.0 (2020-07-01)[DEL] drop python 2 support (previous versions of acsoo are still available
on PyPI, and for regular use, the python 3 version works for Odoo 8, 9, 10
projects too)[ADD] acsoo freeze to limit pip freeze output to dependencies of a given
distribution[ADD] acsoo pr-status to print the status of GitHub pull requests
found in requirement files with revision of the form refs/pull/NNN/head[DEL] deprecateacsoo wheel(now supported by pip natively) andacsoo release(which is automated in GitLab CI)[IMP] project template: ci.skip when pushing translation updates2.1.0 (2020-05-25)[IMP] project template: better and simpler isort config[IMP] project template: merge request templates[IMP] support non-editable VCS requirements in tag_requirements command[DEL] remove –force option of tag_requirements command
as it does nothing useful, since all we want of this command
is to make sure that a tag is present[MNT] declarative setuptools configuration[IMP] pin flake8 to version 3.7.9 (reminder: acsoo flake8 is deprecated,
use pre-commit instead)[IMP] pin pylint-odoo to version 3.1.0 (reminder: acsoo pylint is deprecated,
use pre-commit instead)2.0.0 (2020-01-15)[IMP] project template: publish html coverage in gitlab-ci[IMP] project template: branch coverage in gitlab-ci[IMP] project template: pre-commit cache in gitlab-ci[DEL] deprecate acsoo pylint in favor of pre-commit and per project .pylintrc[IMP] Odoo 13 support[IMP] project template: rename requirements-dev.txt to requirements.txt.in,
better reflecting that these are input requirements and not requirements
for the development environment[IMP] project template: update copyright year[IMP] project template: remove module_auto_update, use click-odoo-update instead1.9.0 (2019-02-28)[IMP] project template: use pre-commit (black, isort, flake8)[FIX] project template: fail on click-odoo-update error[FIX] project template: fix deploy log file[FIX] acsoo pylint: compatibility with pylint 21.8.3 (2019-01-22)[FIX] acsoo pylint: Adapt config to also work with pytlint-odoo 2.0.1[IMP] project template: use click-odoo-update1.8.2 (2018-11-05)[IMP] project template: better way to declare python version
in .gitlab-ci.ymlFix acsoo tag for Odoo 121.8.1 (2018-10-30)[IMP] ignore pylint C0303 (https://github.com/PyCQA/pylint/issues/289)1.8.0 (2018-10-29)[IMP] acsoo wheel: add –no-deps, so we can build requirements.txt without
fetching dependencies, and later install the project with –no-index and
–find-links=release/ so as to detect missing dependencies (#38)[IMP] acsoo wheel: add –exclude-project option (to build requirements.txt
without the current project), in preparation of #44[IMP] acsoo wheel: use a cache of editable git dependencies[IMP] acsoo wheel: use pip wheel -e . to build project instead of
setup.py bdist_wheel, since the reason we were doing that has apparently
been resolved in recent pip version (pip issue 3499 referred in a comment
is apparently unrelated unfortunately, so I’m not sure why we were
doing that exactly, probablyhttps://github.com/pypa/pip/issues/3500)[IMP] flake8: ignore W503 and W504 by default (line break around logical
operators)[IMP] project template: Odoo 12 support[IMP] project template: pin acsoo version[IMP] project template: acsoo wheel –no-deps, so, combined with
pip install –no-index in the test stage, it verifies that all dependencies
are included in requirements.txt1.7.1 (2018-07-15)[IMP] project template: add makepot in .gitlab-ci.yml[IMP] pylint: whitelist lxml c library1.7.0 (2018-06-04)[IMP] more python 3 and Odoo 11 support[IMP] project template: build stage in gitlab-ci[IMP] project template: new style deploy / upgrade
(using checksum upgrades and click-odoo-upgrade script)[IMP] project template: enforce odoo-autodiscover>=2 and do not use it
for Odoo >= 11[IMP] add –dry-run option to acsoo tag and tag_requirements[IMP] make the list of places where tag_requirements can push
configurable[IMP] project template: on demand installation of acsoo and ssh-agent[IMP] project template: use click-odoo-initdb in gitlab-ci1.6.0 (2018-02-16)[IMP] checklog: add –no-err-if-empty option[IMP] python 3 support[IMP] preliminary Odoo 11 support[IMP] project template: various improvements[IMP] refactoring of get_installable_addons() method for better reusability1.5.0 (2017-09-19)[IMP] tag_requirements: fetch more aggressively; this solves the errors
trying to write ref with non existent object[IMP] tag: always tag requirements when doing acsoo tag[IMP] tag: tag requirements before tagging project, so if something fails
when tagging the requirements the project is not tagged and the release
build is not triggered.[ADD] addons: add –separator option (and fix tests that were not testing much)[IMP] addons: consider current dir as addons dir candidate[IMP] pylint: look for module to test in current dir by default, using the
same algorithm asaddons list[IMP] pylint: support python 3 style odoo/addons namespace (without __init__.py)1.4.3 (2017-06-16)[IMP] checklog: consider ignore lines starting with # as comments[FIX] checklog: the previous release broke checklog color output1.4.2 (2017-06-16)[IMP] checklog: fail if no log record found in input[IMP] checklog: echo with click to be less sensitive to unicode issues1.4.1 (2017-06-14)[FIX] regression in acsoo release1.4.0 (2017-06-13)[IMP] colored logging[IMP] major change to acsoo tag and tag_editable_requirements. These changes
make it easier to work with a CI-driven release process that is triggered on
new tags. The usual manualacsoo releaseprocess should be mostly unimpacted by
these changes.tag_editable_requirementsis nowtag_requirements.the tags structure has changed from{series}-{trigram}_{version}to{series}-{trigram}-{req_sha}-{egg}, where{req_sha}is the sha of the
last change torequirements.txt.tag_requirementsincludes the egg name in the tag so different commits
in the same repo can be tagged (before, all addons in a given dependency repo had
to be on the same commit).when a tag for the given series, trigram and egg already exists on the
dependency commit,tag_requirementsdoes not attempt to create another
tag (this avoids creating useless tags or forced tags) and
this is sufficient because the sole purpose of these dependency tags is
to avoid commits to be garbage collected.acsoo tagnow invokestag_requirements. In most cases however this
will not place additional tags on dependencies, because the normal workflow
is to invoketag_requirementsas soon asrequirements.txtis updated.tag_requirementsautomatically transforms http(s) urls into ssh urls
for the purpose of pushing tags. This allows to maximize the use of http(s)
urls in requirements so CI and scripts do not require ssh access
to the public dependencies. This currently only works for the acsone organization
on github but the mechanism is easy to extend, should the need arise.1.3.0 (2017-06-04)[IMP] flake8: read additionalflake8-optionsin acsoo configuration file.[IMP] template: series-dependent odoo command in.gitlab.ci.yml.[IMP] template: createdb in.gitlab-ci.ymlbecause Odoo 8 does not do it by
itself.[ADD] addons list-depends:--excludeoption1.2.2 (2017-05-30)[FIX] regression intag,tag_editable_requirementsandreleasecommands.1.2.1 (2017-05-27)[IMP] add possibility to provide main config file as option.[IMP] checklog: read default options from[checklog]section of config file.[IMP] pylint: read default options from[pylint]section of config file.[IMP] pylint: the module or package to lint may be provided with-m.[IMP] flake8: read default options from[flake8]section of config file.
The only option so far isconfigto provide an alternate flake8
configuration file. This is useful so developer only need to typeacsoo flake8locally, even when a specific configuration is needed,
so it’s trivial to run locally with the same config as in CI.1.1.0 (2017-05-25)[IMP] pylint: BREAKING the package to test must be provided explicitly,
as soon as additional pylint options are provided,
so as to enable easy local testing of a subset of a project. Examples:acsoo pylint---dsome-messageodoo,acsoo pylint--odoo.addons.xyz;[IMP] pylint: disable more code complexity errors:too-many-nested-blocks,too-many-return-statements.[IMP] pylint: display messages causing failure last, so emails from CI.
that show the last lines of the log are more relevant.[IMP] pylint: display summary of messages that did not cause failure, also
when there is no failure.[ADD]acsoo addons listandacsoo addonslist-depends.[ADD]acsoo checklog.1.0.1 (2017-05-21)First public release.