Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][REF] Atualização do repositório (copier update) #3345

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

antoniospneto
Copy link
Contributor

@antoniospneto antoniospneto commented Sep 7, 2024

Atualização do repositório com o "copier update"

@OCA-git-bot
Copy link
Contributor

Hi @felipemotter, @mileo, @felipezago, @ygcarvalh, @hendixcosta, @renatonlima, @AndreMarcos, @rvalyi, @DiegoParadeda, @lfdivino, @luismalta, @mbcosta, @marcelsavegnago, @gabrielcardoso21,
some modules you are maintaining are being modified, check this out!

@antoniospneto antoniospneto changed the title [14.0] Atualização de repositório [14.0] Atualização do repositório Sep 7, 2024
@antoniospneto antoniospneto force-pushed the 14.0-copier-update branch 4 times, most recently from c3c9077 to 2eb71af Compare September 7, 2024 21:07
@rvalyi
Copy link
Member

rvalyi commented Sep 7, 2024

Na v16, tem algumas dessas regras novas que eu acabei burlando para conseguir migrar e sem dar muito diff com a v14. Se vc arrumar agora na v14, vai valer a pena repercutir esses refatores na v16 tb. Por exemplo o merge das classes de ncm (sendo arquivos pequenos eu acho tudo bem fazer esse merge). Segue a lista das exeçoes que fizemos na v16 com a branch 16.0 atual:

❯ grep -r "pylint:" . | grep -v file-not-used

./l10n_br_account/models/account_move_line.py:# pylint: disable=api-one-deprecated
./l10n_br_fiscal_dfe/tests/test_dfe.py:# pylint: disable=line-too-long
./l10n_br_sale/models/sale_order.py:    # pylint: disable=except-pass
./l10n_br_coa_generic/data/l10n_br_coa_generic_template_post.xml:<!-- pylint:disable=duplicate-xml-record-id -->
./l10n_br_fiscal/models/tax_definition_company.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_fiscal/models/tax_definition_benefit.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_fiscal/models/ncm_cest.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_fiscal/models/ncm_nbm.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_fiscal/models/ncm_tax_pis_cofins.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_fiscal/models/tax_definition_cfop.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_fiscal/models/tax_definition_icms.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_fiscal/models/tax_definition_operation_line.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_fiscal/models/tax_definition_partner_profile.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_coa_simple/data/l10n_br_coa_simple_template_post.xml:<!-- pylint:disable=duplicate-xml-record-id -->
./l10n_br_nfe/models/document.py:                        self.env.cr.commit()  # pylint: disable=invalid-commit
./l10n_br_nfe/tests/test_nfe_dfe.py:# pylint: disable=line-too-long
./l10n_br_nfe/tests/test_nfe_mde.py:# pylint: disable=line-too-long
./l10n_br_cnpj_search/models/serpro_webservice.py:# pylint: disable=R8180
./l10n_br_ie_search/models/sefaz_webservice.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_ie_search/models/sintegra_webservice.py:# pylint: disable=consider-merging-classes-inherited
./l10n_br_cnab_structure/__manifest__.py:# pylint: disable=pointless-statement
./l10n_br_nfse_focus/models/document.py:            response = requests.request(  # pylint: disable=external-request-timeout

@antoniospneto antoniospneto force-pushed the 14.0-copier-update branch 6 times, most recently from 2e51560 to 1139014 Compare September 8, 2024 04:26
@antoniospneto
Copy link
Contributor Author

antoniospneto commented Sep 8, 2024

Pessoal deixei a PR bem simples, agora não tá mais as alterações nos arquivos README.
é apenas os lint no código python, maior parte fiz backport da 16.

@antoniospneto
Copy link
Contributor Author

Observação importante.

Na configuração do pre-commit estou forçando a permitr apenas a versão do python 3.11
Pois a nova versão do python 3.12 é imcompativel com a versão de algumas ferramentas usadas aqui.
Porém isso vai obrigar o desenvolvedor a ter instalado o python 3.11 em sua maquina local.
Quanto ao CI é tranquilo pois já está travado para usar o python 3.11.

.pre-commit-config.yaml:

...
default_language_version:
  python: python3.11
...

Pra quem precisar instalar o python 3.11: https://gist.github.com/antoniospneto/ee1b6a55748ceba77968e5c6ce3f9ea0

@antoniospneto antoniospneto force-pushed the 14.0-copier-update branch 2 times, most recently from c02206f to 9290e7a Compare September 8, 2024 19:25
@antoniospneto
Copy link
Contributor Author

antoniospneto commented Sep 8, 2024

Separei os commits em dois, para facilitar a revisão e tbm o port:

O primeiro contém apenas os arquivos de configuração alterado pelo "copier update"
O segundo é as alteraçõoes para passar no pre-commit.

Aproveitei e já fiz o port de umas coisas que estavam berrando no pre-commit da v.15.0

@antoniospneto antoniospneto changed the title [14.0] Atualização do repositório [14.0][REF] Atualização do repositório (copier update) Sep 8, 2024
@antoniospneto antoniospneto marked this pull request as ready for review September 8, 2024 20:07
Copy link
Member

@rvalyi rvalyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rvalyi rvalyi added blocked and removed blocked labels Sep 9, 2024
@rvalyi
Copy link
Member

rvalyi commented Sep 11, 2024

@antoniospneto rola um rebase? Agora que entrou pelo menos o refator do CNAB code eu tirei o blocked, ja ta mais suave entrar....

@antoniospneto antoniospneto force-pushed the 14.0-copier-update branch 2 times, most recently from eafe978 to 4c6a3da Compare September 17, 2024 01:37
@antoniospneto
Copy link
Contributor Author

@antoniospneto rola um rebase? Agora que entrou pelo menos o refator do CNAB code eu tirei o blocked, ja ta mais suave entrar....

feito!

Copy link
Member

@marcelsavegnago marcelsavegnago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rvalyi
Copy link
Member

rvalyi commented Sep 17, 2024

dei um merge de #3243, se puder dar rebase...

@antoniospneto
Copy link
Contributor Author

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-3345-by-antoniospneto-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 42ab4eb into OCA:14.0 Sep 18, 2024
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 4ea379c. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants