From 5d3e4a39f27ba1edcfbcf75150caa03e6dc72485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 16 Dec 2022 23:16:08 +0100 Subject: [PATCH] Prepare migration to monorepo --- modules/account/.flake8 => .flake8 | 0 .gitlab-ci.yml | 30 +++ .../bower_allow_root.sh | 0 .gitlab-scripts/generate-ci.py | 169 +++++++++++++++++ .gitlab-scripts/generate-doc.sh | 24 +++ .gitlab-scripts/generate-packages.sh | 9 + .gitlab-scripts/gitlab-ci.yml | 174 ++++++++++++++++++ .gitlab-scripts/trigger-readthedocs.py | 45 +++++ .hgignore | 12 ++ .hooks/link_modules | 30 +++ .hooks/update_requirements | 79 ++++++++ modules/account/.isort.cfg => .isort.cfg | 0 README.rst | 23 +++ modules/account/.drone.yml | 78 -------- modules/account/doc/conf.py | 16 +- modules/account/setup.py | 23 --- modules/account/tox.ini | 6 +- modules/account_asset/.drone.yml | 70 ------- modules/account_asset/.flake8 | 2 - modules/account_asset/.isort.cfg | 3 - modules/account_asset/doc/conf.py | 69 +++++++ modules/account_asset/setup.py | 24 --- modules/account_asset/tox.ini | 6 +- modules/account_be/.drone.yml | 70 ------- modules/account_be/.flake8 | 2 - modules/account_be/.isort.cfg | 3 - modules/account_be/doc/conf.py | 69 +++++++ modules/account_be/setup.py | 24 --- modules/account_be/tox.ini | 6 +- modules/account_budget/.drone.yml | 78 -------- modules/account_budget/.flake8 | 2 - modules/account_budget/.isort.cfg | 3 - modules/account_budget/doc/conf.py | 16 +- modules/account_budget/setup.py | 24 --- modules/account_budget/tox.ini | 6 +- modules/account_cash_rounding/.drone.yml | 70 ------- modules/account_cash_rounding/.flake8 | 2 - modules/account_cash_rounding/.isort.cfg | 3 - modules/account_cash_rounding/doc/conf.py | 69 +++++++ modules/account_cash_rounding/setup.py | 23 --- modules/account_cash_rounding/tox.ini | 6 +- modules/account_consolidation/.drone.yml | 78 -------- modules/account_consolidation/.flake8 | 2 - modules/account_consolidation/.isort.cfg | 3 - modules/account_consolidation/doc/conf.py | 16 +- modules/account_consolidation/setup.py | 24 --- modules/account_consolidation/tox.ini | 6 +- modules/account_credit_limit/.drone.yml | 70 ------- modules/account_credit_limit/.flake8 | 2 - modules/account_credit_limit/.isort.cfg | 3 - modules/account_credit_limit/doc/conf.py | 69 +++++++ modules/account_credit_limit/setup.py | 23 --- modules/account_credit_limit/tox.ini | 6 +- modules/account_de_skr03/.drone.yml | 70 ------- modules/account_de_skr03/.flake8 | 2 - modules/account_de_skr03/.isort.cfg | 3 - modules/account_de_skr03/doc/conf.py | 69 +++++++ modules/account_de_skr03/setup.py | 24 --- modules/account_de_skr03/tox.ini | 6 +- modules/account_deposit/.drone.yml | 70 ------- modules/account_deposit/.flake8 | 2 - modules/account_deposit/.isort.cfg | 3 - modules/account_deposit/doc/conf.py | 69 +++++++ modules/account_deposit/setup.py | 23 --- modules/account_deposit/tox.ini | 6 +- modules/account_dunning/.drone.yml | 70 ------- modules/account_dunning/.flake8 | 2 - modules/account_dunning/.isort.cfg | 3 - modules/account_dunning/doc/conf.py | 69 +++++++ modules/account_dunning/setup.py | 23 --- modules/account_dunning/tox.ini | 6 +- modules/account_dunning_email/.drone.yml | 70 ------- modules/account_dunning_email/.flake8 | 2 - modules/account_dunning_email/.isort.cfg | 3 - modules/account_dunning_email/doc/conf.py | 69 +++++++ modules/account_dunning_email/setup.py | 23 --- modules/account_dunning_email/tox.ini | 6 +- modules/account_dunning_fee/.drone.yml | 70 ------- modules/account_dunning_fee/.flake8 | 2 - modules/account_dunning_fee/.isort.cfg | 3 - modules/account_dunning_fee/doc/conf.py | 69 +++++++ modules/account_dunning_fee/setup.py | 23 --- modules/account_dunning_fee/tox.ini | 6 +- modules/account_dunning_letter/.drone.yml | 70 ------- modules/account_dunning_letter/.flake8 | 2 - modules/account_dunning_letter/.isort.cfg | 3 - modules/account_dunning_letter/doc/conf.py | 69 +++++++ modules/account_dunning_letter/setup.py | 23 --- modules/account_dunning_letter/tox.ini | 6 +- modules/account_es/.drone.yml | 70 ------- modules/account_es/.flake8 | 2 - modules/account_es/.isort.cfg | 3 - modules/account_es/doc/conf.py | 69 +++++++ modules/account_es/setup.py | 23 --- modules/account_es/tox.ini | 6 +- modules/account_es_sii/.drone.yml | 78 -------- modules/account_es_sii/.flake8 | 2 - modules/account_es_sii/.isort.cfg | 3 - modules/account_es_sii/doc/conf.py | 16 +- modules/account_es_sii/setup.py | 23 --- modules/account_es_sii/tox.ini | 6 +- modules/account_eu/.drone.yml | 70 ------- modules/account_eu/.flake8 | 2 - modules/account_eu/.isort.cfg | 3 - modules/account_eu/doc/conf.py | 69 +++++++ modules/account_eu/setup.py | 23 --- modules/account_eu/tox.ini | 6 +- modules/account_fr/.drone.yml | 70 ------- modules/account_fr/.flake8 | 2 - modules/account_fr/.isort.cfg | 3 - modules/account_fr/doc/conf.py | 69 +++++++ modules/account_fr/setup.py | 23 --- modules/account_fr/tox.ini | 6 +- modules/account_fr_chorus/.drone.yml | 70 ------- modules/account_fr_chorus/.flake8 | 2 - modules/account_fr_chorus/.isort.cfg | 3 - modules/account_fr_chorus/doc/conf.py | 69 +++++++ modules/account_fr_chorus/setup.py | 23 --- modules/account_fr_chorus/tox.ini | 6 +- modules/account_invoice/.drone.yml | 78 -------- modules/account_invoice/.flake8 | 2 - modules/account_invoice/.isort.cfg | 3 - modules/account_invoice/doc/conf.py | 16 +- modules/account_invoice/setup.py | 23 --- modules/account_invoice/tox.ini | 6 +- modules/account_invoice_correction/.drone.yml | 70 ------- modules/account_invoice_correction/.flake8 | 2 - modules/account_invoice_correction/.isort.cfg | 3 - .../account_invoice_correction/doc/conf.py | 69 +++++++ modules/account_invoice_correction/setup.py | 23 --- modules/account_invoice_correction/tox.ini | 6 +- modules/account_invoice_defer/.drone.yml | 78 -------- modules/account_invoice_defer/.flake8 | 2 - modules/account_invoice_defer/.isort.cfg | 3 - modules/account_invoice_defer/doc/conf.py | 16 +- modules/account_invoice_defer/setup.py | 24 --- modules/account_invoice_defer/tox.ini | 6 +- modules/account_invoice_history/.drone.yml | 70 ------- modules/account_invoice_history/.flake8 | 2 - modules/account_invoice_history/.isort.cfg | 3 - modules/account_invoice_history/doc/conf.py | 69 +++++++ modules/account_invoice_history/setup.py | 24 --- modules/account_invoice_history/tox.ini | 6 +- .../.drone.yml | 70 ------- .../account_invoice_line_standalone/.flake8 | 2 - .../.isort.cfg | 3 - .../doc/conf.py | 69 +++++++ .../account_invoice_line_standalone/setup.py | 24 --- .../account_invoice_line_standalone/tox.ini | 6 +- .../account_invoice_secondary_unit/.drone.yml | 70 ------- .../account_invoice_secondary_unit/.flake8 | 2 - .../account_invoice_secondary_unit/.isort.cfg | 3 - .../doc/conf.py | 69 +++++++ .../account_invoice_secondary_unit/setup.py | 23 --- .../account_invoice_secondary_unit/tox.ini | 6 +- modules/account_invoice_stock/.drone.yml | 78 -------- modules/account_invoice_stock/.flake8 | 2 - modules/account_invoice_stock/.isort.cfg | 3 - modules/account_invoice_stock/doc/conf.py | 16 +- modules/account_invoice_stock/setup.py | 23 --- modules/account_invoice_stock/tox.ini | 6 +- modules/account_invoice_watermark/.drone.yml | 78 -------- modules/account_invoice_watermark/.flake8 | 2 - modules/account_invoice_watermark/.isort.cfg | 3 - modules/account_invoice_watermark/doc/conf.py | 16 +- modules/account_invoice_watermark/setup.py | 24 --- modules/account_invoice_watermark/tox.ini | 6 +- modules/account_move_line_grouping/.drone.yml | 78 -------- modules/account_move_line_grouping/.flake8 | 2 - modules/account_move_line_grouping/.isort.cfg | 3 - .../account_move_line_grouping/doc/conf.py | 16 +- modules/account_move_line_grouping/setup.py | 24 --- modules/account_move_line_grouping/tox.ini | 6 +- modules/account_payment/.drone.yml | 70 ------- modules/account_payment/.flake8 | 2 - modules/account_payment/.isort.cfg | 3 - modules/account_payment/doc/conf.py | 69 +++++++ modules/account_payment/setup.py | 23 --- modules/account_payment/tox.ini | 6 +- modules/account_payment_braintree/.drone.yml | 71 ------- modules/account_payment_braintree/.flake8 | 2 - modules/account_payment_braintree/.isort.cfg | 3 - modules/account_payment_braintree/doc/conf.py | 69 +++++++ modules/account_payment_braintree/setup.py | 23 --- modules/account_payment_braintree/tox.ini | 6 +- modules/account_payment_clearing/.drone.yml | 70 ------- modules/account_payment_clearing/.flake8 | 2 - modules/account_payment_clearing/.isort.cfg | 3 - modules/account_payment_clearing/doc/conf.py | 69 +++++++ modules/account_payment_clearing/setup.py | 23 --- modules/account_payment_clearing/tox.ini | 6 +- modules/account_payment_sepa/.drone.yml | 70 ------- modules/account_payment_sepa/.flake8 | 2 - modules/account_payment_sepa/.isort.cfg | 3 - modules/account_payment_sepa/doc/conf.py | 69 +++++++ modules/account_payment_sepa/setup.py | 24 --- modules/account_payment_sepa/tox.ini | 6 +- modules/account_payment_sepa_cfonb/.drone.yml | 70 ------- modules/account_payment_sepa_cfonb/.flake8 | 2 - modules/account_payment_sepa_cfonb/.isort.cfg | 3 - .../account_payment_sepa_cfonb/doc/conf.py | 69 +++++++ modules/account_payment_sepa_cfonb/setup.py | 23 --- modules/account_payment_sepa_cfonb/tox.ini | 6 +- modules/account_payment_stripe/.drone.yml | 71 ------- modules/account_payment_stripe/.flake8 | 2 - modules/account_payment_stripe/.isort.cfg | 3 - modules/account_payment_stripe/doc/conf.py | 69 +++++++ modules/account_payment_stripe/setup.py | 23 --- modules/account_payment_stripe/tox.ini | 6 +- modules/account_product/.drone.yml | 78 -------- modules/account_product/.flake8 | 2 - modules/account_product/.isort.cfg | 3 - modules/account_product/doc/conf.py | 16 +- modules/account_product/setup.py | 23 --- modules/account_product/tox.ini | 6 +- modules/account_receivable_rule/.drone.yml | 78 -------- modules/account_receivable_rule/.flake8 | 2 - modules/account_receivable_rule/.isort.cfg | 3 - modules/account_receivable_rule/doc/conf.py | 16 +- modules/account_receivable_rule/setup.py | 24 --- modules/account_receivable_rule/tox.ini | 6 +- modules/account_rule/.drone.yml | 78 -------- modules/account_rule/.flake8 | 2 - modules/account_rule/.isort.cfg | 3 - modules/account_rule/doc/conf.py | 16 +- modules/account_rule/setup.py | 24 --- modules/account_rule/tox.ini | 6 +- modules/account_statement/.drone.yml | 70 ------- modules/account_statement/.flake8 | 2 - modules/account_statement/.isort.cfg | 3 - modules/account_statement/doc/conf.py | 69 +++++++ modules/account_statement/setup.py | 23 --- modules/account_statement/tox.ini | 6 +- modules/account_statement_aeb43/.drone.yml | 70 ------- modules/account_statement_aeb43/.flake8 | 2 - modules/account_statement_aeb43/.isort.cfg | 3 - modules/account_statement_aeb43/doc/conf.py | 69 +++++++ modules/account_statement_aeb43/setup.py | 23 --- modules/account_statement_aeb43/tox.ini | 6 +- modules/account_statement_coda/.drone.yml | 70 ------- modules/account_statement_coda/.flake8 | 2 - modules/account_statement_coda/.isort.cfg | 3 - modules/account_statement_coda/doc/conf.py | 69 +++++++ modules/account_statement_coda/setup.py | 23 --- modules/account_statement_coda/tox.ini | 6 +- modules/account_statement_ofx/.drone.yml | 70 ------- modules/account_statement_ofx/.flake8 | 2 - modules/account_statement_ofx/.isort.cfg | 3 - modules/account_statement_ofx/doc/conf.py | 69 +++++++ modules/account_statement_ofx/setup.py | 23 --- modules/account_statement_ofx/tox.ini | 6 +- modules/account_statement_rule/.drone.yml | 70 ------- modules/account_statement_rule/.flake8 | 2 - modules/account_statement_rule/.isort.cfg | 3 - modules/account_statement_rule/doc/conf.py | 69 +++++++ modules/account_statement_rule/setup.py | 23 --- modules/account_statement_rule/tox.ini | 6 +- modules/account_statement_sepa/.drone.yml | 78 -------- modules/account_statement_sepa/.flake8 | 2 - modules/account_statement_sepa/.isort.cfg | 3 - modules/account_statement_sepa/doc/conf.py | 16 +- modules/account_statement_sepa/setup.py | 24 --- modules/account_statement_sepa/tox.ini | 6 +- modules/account_stock_anglo_saxon/.drone.yml | 70 ------- modules/account_stock_anglo_saxon/.flake8 | 2 - modules/account_stock_anglo_saxon/.isort.cfg | 3 - modules/account_stock_anglo_saxon/doc/conf.py | 69 +++++++ modules/account_stock_anglo_saxon/setup.py | 23 --- modules/account_stock_anglo_saxon/tox.ini | 6 +- modules/account_stock_continental/.drone.yml | 70 ------- modules/account_stock_continental/.flake8 | 2 - modules/account_stock_continental/.isort.cfg | 3 - modules/account_stock_continental/doc/conf.py | 69 +++++++ modules/account_stock_continental/setup.py | 23 --- modules/account_stock_continental/tox.ini | 6 +- modules/account_stock_landed_cost/.drone.yml | 70 ------- modules/account_stock_landed_cost/.flake8 | 2 - modules/account_stock_landed_cost/.isort.cfg | 3 - modules/account_stock_landed_cost/doc/conf.py | 69 +++++++ modules/account_stock_landed_cost/setup.py | 23 --- modules/account_stock_landed_cost/tox.ini | 6 +- .../.drone.yml | 70 ------- .../account_stock_landed_cost_weight/.flake8 | 2 - .../.isort.cfg | 3 - .../doc/conf.py | 69 +++++++ .../account_stock_landed_cost_weight/setup.py | 23 --- .../account_stock_landed_cost_weight/tox.ini | 6 +- .../account_stock_shipment_cost/.drone.yml | 78 -------- modules/account_stock_shipment_cost/.flake8 | 2 - .../account_stock_shipment_cost/.isort.cfg | 3 - .../account_stock_shipment_cost/doc/conf.py | 16 +- modules/account_stock_shipment_cost/setup.py | 24 --- modules/account_stock_shipment_cost/tox.ini | 6 +- .../.drone.yml | 78 -------- .../.flake8 | 2 - .../.isort.cfg | 3 - .../doc/conf.py | 16 +- .../setup.py | 24 --- .../tox.ini | 6 +- modules/account_tax_cash/.drone.yml | 70 ------- modules/account_tax_cash/.flake8 | 2 - modules/account_tax_cash/.isort.cfg | 3 - modules/account_tax_cash/doc/conf.py | 69 +++++++ modules/account_tax_cash/setup.py | 23 --- modules/account_tax_cash/tox.ini | 6 +- modules/account_tax_non_deductible/.drone.yml | 78 -------- modules/account_tax_non_deductible/.flake8 | 2 - modules/account_tax_non_deductible/.isort.cfg | 3 - .../account_tax_non_deductible/doc/conf.py | 16 +- modules/account_tax_non_deductible/setup.py | 24 --- modules/account_tax_non_deductible/tox.ini | 6 +- modules/account_tax_rule_country/.drone.yml | 70 ------- modules/account_tax_rule_country/.flake8 | 2 - modules/account_tax_rule_country/.isort.cfg | 3 - modules/account_tax_rule_country/doc/conf.py | 69 +++++++ modules/account_tax_rule_country/setup.py | 23 --- modules/account_tax_rule_country/tox.ini | 6 +- modules/analytic_account/.drone.yml | 70 ------- modules/analytic_account/.flake8 | 2 - modules/analytic_account/.isort.cfg | 3 - modules/analytic_account/doc/conf.py | 69 +++++++ modules/analytic_account/setup.py | 23 --- modules/analytic_account/tox.ini | 6 +- modules/analytic_budget/.drone.yml | 78 -------- modules/analytic_budget/.flake8 | 2 - modules/analytic_budget/.isort.cfg | 3 - modules/analytic_budget/doc/conf.py | 16 +- modules/analytic_budget/setup.py | 24 --- modules/analytic_budget/tox.ini | 6 +- modules/analytic_invoice/.drone.yml | 70 ------- modules/analytic_invoice/.flake8 | 2 - modules/analytic_invoice/.isort.cfg | 3 - modules/analytic_invoice/doc/conf.py | 69 +++++++ modules/analytic_invoice/setup.py | 23 --- modules/analytic_invoice/tox.ini | 6 +- modules/analytic_purchase/.drone.yml | 70 ------- modules/analytic_purchase/.flake8 | 2 - modules/analytic_purchase/.isort.cfg | 3 - modules/analytic_purchase/doc/conf.py | 69 +++++++ modules/analytic_purchase/setup.py | 23 --- modules/analytic_purchase/tox.ini | 6 +- modules/analytic_sale/.drone.yml | 70 ------- modules/analytic_sale/.flake8 | 2 - modules/analytic_sale/.isort.cfg | 3 - modules/analytic_sale/doc/conf.py | 69 +++++++ modules/analytic_sale/setup.py | 23 --- modules/analytic_sale/tox.ini | 6 +- modules/attendance/.drone.yml | 70 ------- modules/attendance/.flake8 | 2 - modules/attendance/.isort.cfg | 3 - modules/attendance/doc/conf.py | 69 +++++++ modules/attendance/setup.py | 23 --- modules/attendance/tox.ini | 6 +- modules/authentication_saml/.drone.yml | 78 -------- modules/authentication_saml/.flake8 | 2 - modules/authentication_saml/.isort.cfg | 3 - modules/authentication_saml/doc/conf.py | 16 +- modules/authentication_saml/setup.py | 24 --- modules/authentication_saml/tox.ini | 6 +- modules/authentication_sms/.drone.yml | 70 ------- modules/authentication_sms/.flake8 | 2 - modules/authentication_sms/.isort.cfg | 3 - modules/authentication_sms/doc/conf.py | 69 +++++++ modules/authentication_sms/setup.py | 23 --- modules/authentication_sms/tox.ini | 6 +- modules/bank/.drone.yml | 70 ------- modules/bank/.flake8 | 2 - modules/bank/.isort.cfg | 3 - modules/bank/doc/conf.py | 69 +++++++ modules/bank/setup.py | 23 --- modules/bank/tox.ini | 6 +- modules/carrier/.drone.yml | 70 ------- modules/carrier/.flake8 | 2 - modules/carrier/.isort.cfg | 3 - modules/carrier/doc/conf.py | 69 +++++++ modules/carrier/setup.py | 24 --- modules/carrier/tox.ini | 6 +- modules/carrier_carriage/.drone.yml | 78 -------- modules/carrier_carriage/.flake8 | 2 - modules/carrier_carriage/.isort.cfg | 3 - modules/carrier_carriage/doc/conf.py | 16 +- modules/carrier_carriage/setup.py | 24 --- modules/carrier_carriage/tox.ini | 6 +- modules/carrier_percentage/.drone.yml | 70 ------- modules/carrier_percentage/.flake8 | 2 - modules/carrier_percentage/.isort.cfg | 3 - modules/carrier_percentage/doc/conf.py | 69 +++++++ modules/carrier_percentage/setup.py | 23 --- modules/carrier_percentage/tox.ini | 6 +- modules/carrier_subdivision/.drone.yml | 70 ------- modules/carrier_subdivision/.flake8 | 2 - modules/carrier_subdivision/.isort.cfg | 3 - modules/carrier_subdivision/doc/conf.py | 69 +++++++ modules/carrier_subdivision/setup.py | 23 --- modules/carrier_subdivision/tox.ini | 6 +- modules/carrier_weight/.drone.yml | 70 ------- modules/carrier_weight/.flake8 | 2 - modules/carrier_weight/.isort.cfg | 3 - modules/carrier_weight/doc/conf.py | 69 +++++++ modules/carrier_weight/setup.py | 23 --- modules/carrier_weight/tox.ini | 6 +- modules/commission/.drone.yml | 78 -------- modules/commission/.flake8 | 2 - modules/commission/.isort.cfg | 3 - modules/commission/doc/conf.py | 16 +- modules/commission/setup.py | 23 --- modules/commission/tox.ini | 6 +- modules/commission_waiting/.drone.yml | 70 ------- modules/commission_waiting/.flake8 | 2 - modules/commission_waiting/.isort.cfg | 3 - modules/commission_waiting/doc/conf.py | 69 +++++++ modules/commission_waiting/setup.py | 23 --- modules/commission_waiting/tox.ini | 6 +- modules/company/.drone.yml | 78 -------- modules/company/.flake8 | 2 - modules/company/.isort.cfg | 3 - modules/company/doc/conf.py | 16 +- modules/company/setup.py | 24 --- modules/company/tox.ini | 6 +- modules/company_work_time/.drone.yml | 70 ------- modules/company_work_time/.flake8 | 2 - modules/company_work_time/.isort.cfg | 3 - modules/company_work_time/doc/conf.py | 69 +++++++ modules/company_work_time/setup.py | 24 --- modules/company_work_time/tox.ini | 6 +- modules/country/.drone.yml | 78 -------- modules/country/.flake8 | 2 - modules/country/.isort.cfg | 3 - modules/country/doc/conf.py | 16 +- modules/country/setup.py | 23 --- modules/country/tox.ini | 6 +- modules/currency/.drone.yml | 78 -------- modules/currency/.flake8 | 2 - modules/currency/.isort.cfg | 3 - modules/currency/doc/conf.py | 16 +- modules/currency/setup.py | 23 --- modules/currency/tox.ini | 6 +- modules/currency_ro/.drone.yml | 78 -------- modules/currency_ro/.flake8 | 2 - modules/currency_ro/.isort.cfg | 3 - modules/currency_ro/doc/conf.py | 16 +- modules/currency_ro/setup.py | 24 --- modules/currency_ro/tox.ini | 6 +- modules/currency_rs/.drone.yml | 79 -------- modules/currency_rs/.flake8 | 2 - modules/currency_rs/.isort.cfg | 3 - modules/currency_rs/doc/conf.py | 16 +- modules/currency_rs/setup.py | 24 --- modules/currency_rs/tox.ini | 6 +- modules/customs/.drone.yml | 70 ------- modules/customs/.flake8 | 2 - modules/customs/.isort.cfg | 3 - modules/customs/doc/conf.py | 69 +++++++ modules/customs/setup.py | 24 --- modules/customs/tox.ini | 6 +- modules/dashboard/.drone.yml | 70 ------- modules/dashboard/.flake8 | 2 - modules/dashboard/.isort.cfg | 3 - modules/dashboard/doc/conf.py | 69 +++++++ modules/dashboard/setup.py | 24 --- modules/dashboard/tox.ini | 6 +- modules/edocument_uncefact/.drone.yml | 70 ------- modules/edocument_uncefact/.flake8 | 2 - modules/edocument_uncefact/.isort.cfg | 3 - modules/edocument_uncefact/doc/conf.py | 69 +++++++ modules/edocument_uncefact/setup.py | 23 --- modules/edocument_uncefact/tox.ini | 6 +- modules/edocument_unece/.drone.yml | 70 ------- modules/edocument_unece/.flake8 | 2 - modules/edocument_unece/.isort.cfg | 3 - modules/edocument_unece/doc/conf.py | 69 +++++++ modules/edocument_unece/setup.py | 23 --- modules/edocument_unece/tox.ini | 6 +- modules/google_maps/.drone.yml | 70 ------- modules/google_maps/.flake8 | 2 - modules/google_maps/.isort.cfg | 3 - modules/google_maps/doc/conf.py | 69 +++++++ modules/google_maps/setup.py | 24 --- modules/google_maps/tox.ini | 6 +- modules/incoterm/.drone.yml | 78 -------- modules/incoterm/.flake8 | 2 - modules/incoterm/.isort.cfg | 3 - modules/incoterm/doc/conf.py | 16 +- modules/incoterm/setup.py | 24 --- modules/incoterm/tox.ini | 6 +- modules/ldap_authentication/.drone.yml | 70 ------- modules/ldap_authentication/.flake8 | 2 - modules/ldap_authentication/.isort.cfg | 3 - modules/ldap_authentication/doc/conf.py | 69 +++++++ modules/ldap_authentication/setup.py | 23 --- modules/ldap_authentication/tox.ini | 6 +- modules/marketing/.drone.yml | 70 ------- modules/marketing/.flake8 | 2 - modules/marketing/.isort.cfg | 3 - modules/marketing/doc/conf.py | 69 +++++++ modules/marketing/setup.py | 23 --- modules/marketing/tox.ini | 6 +- modules/marketing_automation/.drone.yml | 70 ------- modules/marketing_automation/.flake8 | 2 - modules/marketing_automation/.isort.cfg | 3 - modules/marketing_automation/doc/conf.py | 69 +++++++ modules/marketing_automation/setup.py | 23 --- modules/marketing_automation/tox.ini | 6 +- modules/marketing_campaign/.drone.yml | 78 -------- modules/marketing_campaign/.flake8 | 2 - modules/marketing_campaign/.isort.cfg | 3 - modules/marketing_campaign/doc/conf.py | 16 +- modules/marketing_campaign/setup.py | 24 --- modules/marketing_campaign/tox.ini | 6 +- modules/marketing_email/.drone.yml | 70 ------- modules/marketing_email/.flake8 | 2 - modules/marketing_email/.isort.cfg | 3 - modules/marketing_email/doc/conf.py | 69 +++++++ modules/marketing_email/setup.py | 23 --- modules/marketing_email/tox.ini | 6 +- modules/notification_email/.drone.yml | 70 ------- modules/notification_email/.flake8 | 2 - modules/notification_email/.isort.cfg | 3 - modules/notification_email/doc/conf.py | 69 +++++++ modules/notification_email/setup.py | 23 --- modules/notification_email/tox.ini | 6 +- modules/party/.drone.yml | 78 -------- modules/party/.flake8 | 2 - modules/party/.isort.cfg | 3 - modules/party/doc/conf.py | 16 +- modules/party/setup.py | 23 --- modules/party/tox.ini | 6 +- modules/party_avatar/.drone.yml | 78 -------- modules/party_avatar/.flake8 | 2 - modules/party_avatar/.isort.cfg | 3 - modules/party_avatar/doc/conf.py | 16 +- modules/party_avatar/setup.py | 24 --- modules/party_avatar/tox.ini | 6 +- modules/party_relationship/.drone.yml | 70 ------- modules/party_relationship/.flake8 | 2 - modules/party_relationship/.isort.cfg | 3 - modules/party_relationship/doc/conf.py | 69 +++++++ modules/party_relationship/setup.py | 23 --- modules/party_relationship/tox.ini | 6 +- modules/party_siret/.drone.yml | 70 ------- modules/party_siret/.flake8 | 2 - modules/party_siret/.isort.cfg | 3 - modules/party_siret/doc/conf.py | 69 +++++++ modules/party_siret/setup.py | 24 --- modules/party_siret/tox.ini | 6 +- modules/product/.drone.yml | 78 -------- modules/product/.flake8 | 2 - modules/product/.isort.cfg | 3 - modules/product/doc/conf.py | 16 +- modules/product/setup.py | 23 --- modules/product/tox.ini | 6 +- modules/product_attribute/.drone.yml | 70 ------- modules/product_attribute/.flake8 | 2 - modules/product_attribute/.isort.cfg | 3 - modules/product_attribute/doc/conf.py | 69 +++++++ modules/product_attribute/setup.py | 24 --- modules/product_attribute/tox.ini | 6 +- modules/product_classification/.drone.yml | 70 ------- modules/product_classification/.flake8 | 2 - modules/product_classification/.isort.cfg | 3 - modules/product_classification/doc/conf.py | 69 +++++++ modules/product_classification/setup.py | 24 --- modules/product_classification/tox.ini | 6 +- .../.drone.yml | 70 ------- .../product_classification_taxonomic/.flake8 | 2 - .../.isort.cfg | 3 - .../doc/conf.py | 69 +++++++ .../product_classification_taxonomic/setup.py | 24 --- .../product_classification_taxonomic/tox.ini | 6 +- modules/product_cost_fifo/.drone.yml | 70 ------- modules/product_cost_fifo/.flake8 | 2 - modules/product_cost_fifo/.isort.cfg | 3 - modules/product_cost_fifo/doc/conf.py | 69 +++++++ modules/product_cost_fifo/setup.py | 23 --- modules/product_cost_fifo/tox.ini | 6 +- modules/product_cost_history/.drone.yml | 70 ------- modules/product_cost_history/.flake8 | 2 - modules/product_cost_history/.isort.cfg | 3 - modules/product_cost_history/doc/conf.py | 69 +++++++ modules/product_cost_history/setup.py | 23 --- modules/product_cost_history/tox.ini | 6 +- modules/product_cost_warehouse/.drone.yml | 78 -------- modules/product_cost_warehouse/.flake8 | 2 - modules/product_cost_warehouse/.isort.cfg | 3 - modules/product_cost_warehouse/doc/conf.py | 16 +- modules/product_cost_warehouse/setup.py | 23 --- modules/product_cost_warehouse/tox.ini | 6 +- modules/product_image/.drone.yml | 78 -------- modules/product_image/.flake8 | 2 - modules/product_image/.isort.cfg | 3 - modules/product_image/doc/conf.py | 16 +- modules/product_image/setup.py | 24 --- modules/product_image/tox.ini | 6 +- modules/product_image_attribute/.drone.yml | 78 -------- modules/product_image_attribute/.flake8 | 2 - modules/product_image_attribute/.isort.cfg | 3 - modules/product_image_attribute/doc/conf.py | 16 +- modules/product_image_attribute/setup.py | 24 --- modules/product_image_attribute/tox.ini | 6 +- modules/product_kit/.drone.yml | 78 -------- modules/product_kit/.flake8 | 2 - modules/product_kit/.isort.cfg | 3 - modules/product_kit/doc/conf.py | 16 +- modules/product_kit/setup.py | 23 --- modules/product_kit/tox.ini | 6 +- modules/product_measurements/.drone.yml | 70 ------- modules/product_measurements/.flake8 | 2 - modules/product_measurements/.isort.cfg | 3 - modules/product_measurements/doc/conf.py | 69 +++++++ modules/product_measurements/setup.py | 24 --- modules/product_measurements/tox.ini | 6 +- modules/product_price_list/.drone.yml | 70 ------- modules/product_price_list/.flake8 | 2 - modules/product_price_list/.isort.cfg | 3 - modules/product_price_list/doc/conf.py | 69 +++++++ modules/product_price_list/setup.py | 24 --- modules/product_price_list/tox.ini | 6 +- modules/product_price_list_dates/.drone.yml | 70 ------- modules/product_price_list_dates/.flake8 | 2 - modules/product_price_list_dates/.isort.cfg | 3 - modules/product_price_list_dates/doc/conf.py | 69 +++++++ modules/product_price_list_dates/setup.py | 23 --- modules/product_price_list_dates/tox.ini | 6 +- modules/product_price_list_parent/.drone.yml | 70 ------- modules/product_price_list_parent/.flake8 | 2 - modules/product_price_list_parent/.isort.cfg | 3 - modules/product_price_list_parent/doc/conf.py | 69 +++++++ modules/product_price_list_parent/setup.py | 23 --- modules/product_price_list_parent/tox.ini | 6 +- modules/production/.drone.yml | 70 ------- modules/production/.flake8 | 2 - modules/production/.isort.cfg | 3 - modules/production/doc/conf.py | 69 +++++++ modules/production/setup.py | 23 --- modules/production/tox.ini | 6 +- modules/production_outsourcing/.drone.yml | 70 ------- modules/production_outsourcing/.flake8 | 2 - modules/production_outsourcing/.isort.cfg | 3 - modules/production_outsourcing/doc/conf.py | 69 +++++++ modules/production_outsourcing/setup.py | 23 --- modules/production_outsourcing/tox.ini | 6 +- modules/production_routing/.drone.yml | 70 ------- modules/production_routing/.flake8 | 2 - modules/production_routing/.isort.cfg | 3 - modules/production_routing/doc/conf.py | 69 +++++++ modules/production_routing/setup.py | 23 --- modules/production_routing/tox.ini | 6 +- modules/production_split/.drone.yml | 70 ------- modules/production_split/.flake8 | 2 - modules/production_split/.isort.cfg | 3 - modules/production_split/doc/conf.py | 69 +++++++ modules/production_split/setup.py | 23 --- modules/production_split/tox.ini | 6 +- modules/production_work/.drone.yml | 70 ------- modules/production_work/.flake8 | 2 - modules/production_work/.isort.cfg | 3 - modules/production_work/doc/conf.py | 69 +++++++ modules/production_work/setup.py | 23 --- modules/production_work/tox.ini | 6 +- modules/production_work_timesheet/.drone.yml | 70 ------- modules/production_work_timesheet/.flake8 | 2 - modules/production_work_timesheet/.isort.cfg | 3 - modules/production_work_timesheet/doc/conf.py | 69 +++++++ modules/production_work_timesheet/setup.py | 23 --- modules/production_work_timesheet/tox.ini | 6 +- modules/project/.drone.yml | 78 -------- modules/project/.flake8 | 2 - modules/project/.isort.cfg | 3 - modules/project/doc/conf.py | 16 +- modules/project/setup.py | 23 --- modules/project/tox.ini | 6 +- modules/project_invoice/.drone.yml | 70 ------- modules/project_invoice/.flake8 | 2 - modules/project_invoice/.isort.cfg | 3 - modules/project_invoice/doc/conf.py | 69 +++++++ modules/project_invoice/setup.py | 23 --- modules/project_invoice/tox.ini | 6 +- modules/project_plan/.drone.yml | 70 ------- modules/project_plan/.flake8 | 2 - modules/project_plan/.isort.cfg | 3 - modules/project_plan/doc/conf.py | 69 +++++++ modules/project_plan/setup.py | 24 --- modules/project_plan/tox.ini | 6 +- modules/project_revenue/.drone.yml | 70 ------- modules/project_revenue/.flake8 | 2 - modules/project_revenue/.isort.cfg | 3 - modules/project_revenue/doc/conf.py | 69 +++++++ modules/project_revenue/setup.py | 23 --- modules/project_revenue/tox.ini | 6 +- modules/purchase/.drone.yml | 78 -------- modules/purchase/.flake8 | 2 - modules/purchase/.isort.cfg | 3 - modules/purchase/doc/conf.py | 16 +- modules/purchase/setup.py | 23 --- modules/purchase/tox.ini | 6 +- modules/purchase_amendment/.drone.yml | 70 ------- modules/purchase_amendment/.flake8 | 2 - modules/purchase_amendment/.isort.cfg | 3 - modules/purchase_amendment/doc/conf.py | 69 +++++++ modules/purchase_amendment/setup.py | 23 --- modules/purchase_amendment/tox.ini | 6 +- modules/purchase_blanket_agreement/.drone.yml | 76 -------- modules/purchase_blanket_agreement/.flake8 | 2 - modules/purchase_blanket_agreement/.isort.cfg | 3 - .../purchase_blanket_agreement/doc/conf.py | 16 +- modules/purchase_blanket_agreement/setup.py | 24 --- modules/purchase_blanket_agreement/tox.ini | 6 +- modules/purchase_history/.drone.yml | 70 ------- modules/purchase_history/.flake8 | 2 - modules/purchase_history/.isort.cfg | 3 - modules/purchase_history/doc/conf.py | 69 +++++++ modules/purchase_history/setup.py | 23 --- modules/purchase_history/tox.ini | 6 +- .../.drone.yml | 70 ------- .../purchase_invoice_line_standalone/.flake8 | 2 - .../.isort.cfg | 3 - .../doc/conf.py | 69 +++++++ .../purchase_invoice_line_standalone/setup.py | 23 --- .../purchase_invoice_line_standalone/tox.ini | 6 +- modules/purchase_price_list/.drone.yml | 78 -------- modules/purchase_price_list/.flake8 | 2 - modules/purchase_price_list/.isort.cfg | 3 - modules/purchase_price_list/doc/conf.py | 16 +- modules/purchase_price_list/setup.py | 24 --- modules/purchase_price_list/tox.ini | 6 +- modules/purchase_product_quantity/.drone.yml | 78 -------- modules/purchase_product_quantity/.flake8 | 2 - modules/purchase_product_quantity/.isort.cfg | 3 - modules/purchase_product_quantity/doc/conf.py | 16 +- modules/purchase_product_quantity/setup.py | 24 --- modules/purchase_product_quantity/tox.ini | 6 +- modules/purchase_request/.drone.yml | 70 ------- modules/purchase_request/.flake8 | 2 - modules/purchase_request/.isort.cfg | 3 - modules/purchase_request/doc/conf.py | 69 +++++++ modules/purchase_request/setup.py | 23 --- modules/purchase_request/tox.ini | 6 +- modules/purchase_request_quotation/.drone.yml | 70 ------- modules/purchase_request_quotation/.flake8 | 2 - modules/purchase_request_quotation/.isort.cfg | 3 - .../purchase_request_quotation/doc/conf.py | 69 +++++++ modules/purchase_request_quotation/setup.py | 23 --- modules/purchase_request_quotation/tox.ini | 6 +- modules/purchase_requisition/.drone.yml | 70 ------- modules/purchase_requisition/.flake8 | 2 - modules/purchase_requisition/.isort.cfg | 3 - modules/purchase_requisition/doc/conf.py | 69 +++++++ modules/purchase_requisition/setup.py | 23 --- modules/purchase_requisition/tox.ini | 6 +- modules/purchase_secondary_unit/.drone.yml | 70 ------- modules/purchase_secondary_unit/.flake8 | 2 - modules/purchase_secondary_unit/.isort.cfg | 3 - modules/purchase_secondary_unit/doc/conf.py | 69 +++++++ modules/purchase_secondary_unit/setup.py | 23 --- modules/purchase_secondary_unit/tox.ini | 6 +- modules/purchase_shipment_cost/.drone.yml | 70 ------- modules/purchase_shipment_cost/.flake8 | 2 - modules/purchase_shipment_cost/.isort.cfg | 3 - modules/purchase_shipment_cost/doc/conf.py | 69 +++++++ modules/purchase_shipment_cost/setup.py | 33 +--- modules/purchase_shipment_cost/tox.ini | 6 +- modules/sale/.drone.yml | 78 -------- modules/sale/.flake8 | 2 - modules/sale/.isort.cfg | 3 - modules/sale/doc/conf.py | 16 +- modules/sale/setup.py | 23 --- modules/sale/tox.ini | 6 +- modules/sale_advance_payment/.drone.yml | 70 ------- modules/sale_advance_payment/.flake8 | 2 - modules/sale_advance_payment/.isort.cfg | 3 - modules/sale_advance_payment/doc/conf.py | 69 +++++++ modules/sale_advance_payment/setup.py | 23 --- modules/sale_advance_payment/tox.ini | 6 +- modules/sale_amendment/.drone.yml | 70 ------- modules/sale_amendment/.flake8 | 2 - modules/sale_amendment/.isort.cfg | 3 - modules/sale_amendment/doc/conf.py | 69 +++++++ modules/sale_amendment/setup.py | 23 --- modules/sale_amendment/tox.ini | 6 +- modules/sale_blanket_agreement/.drone.yml | 76 -------- modules/sale_blanket_agreement/.flake8 | 2 - modules/sale_blanket_agreement/.isort.cfg | 3 - modules/sale_blanket_agreement/doc/conf.py | 16 +- modules/sale_blanket_agreement/setup.py | 24 --- modules/sale_blanket_agreement/tox.ini | 6 +- modules/sale_complaint/.drone.yml | 70 ------- modules/sale_complaint/.flake8 | 2 - modules/sale_complaint/.isort.cfg | 3 - modules/sale_complaint/doc/conf.py | 69 +++++++ modules/sale_complaint/setup.py | 23 --- modules/sale_complaint/tox.ini | 6 +- modules/sale_credit_limit/.drone.yml | 70 ------- modules/sale_credit_limit/.flake8 | 2 - modules/sale_credit_limit/.isort.cfg | 3 - modules/sale_credit_limit/doc/conf.py | 69 +++++++ modules/sale_credit_limit/setup.py | 24 --- modules/sale_credit_limit/tox.ini | 6 +- modules/sale_discount/.drone.yml | 70 ------- modules/sale_discount/.flake8 | 2 - modules/sale_discount/.isort.cfg | 3 - modules/sale_discount/doc/conf.py | 69 +++++++ modules/sale_discount/setup.py | 23 --- modules/sale_discount/tox.ini | 6 +- modules/sale_extra/.drone.yml | 70 ------- modules/sale_extra/.flake8 | 2 - modules/sale_extra/.isort.cfg | 3 - modules/sale_extra/doc/conf.py | 69 +++++++ modules/sale_extra/setup.py | 23 --- modules/sale_extra/tox.ini | 6 +- modules/sale_gift_card/.drone.yml | 78 -------- modules/sale_gift_card/.flake8 | 2 - modules/sale_gift_card/.isort.cfg | 3 - modules/sale_gift_card/doc/conf.py | 16 +- modules/sale_gift_card/setup.py | 23 --- modules/sale_gift_card/tox.ini | 6 +- modules/sale_history/.drone.yml | 70 ------- modules/sale_history/.flake8 | 2 - modules/sale_history/.isort.cfg | 3 - modules/sale_history/doc/conf.py | 69 +++++++ modules/sale_history/setup.py | 23 --- modules/sale_history/tox.ini | 6 +- modules/sale_invoice_date/.drone.yml | 78 -------- modules/sale_invoice_date/.flake8 | 2 - modules/sale_invoice_date/.isort.cfg | 3 - modules/sale_invoice_date/doc/conf.py | 16 +- modules/sale_invoice_date/setup.py | 24 --- modules/sale_invoice_date/tox.ini | 6 +- modules/sale_invoice_grouping/.drone.yml | 70 ------- modules/sale_invoice_grouping/.flake8 | 2 - modules/sale_invoice_grouping/.isort.cfg | 3 - modules/sale_invoice_grouping/doc/conf.py | 69 +++++++ modules/sale_invoice_grouping/setup.py | 23 --- modules/sale_invoice_grouping/tox.ini | 6 +- modules/sale_opportunity/.drone.yml | 70 ------- modules/sale_opportunity/.flake8 | 2 - modules/sale_opportunity/.isort.cfg | 3 - modules/sale_opportunity/doc/conf.py | 69 +++++++ modules/sale_opportunity/setup.py | 23 --- modules/sale_opportunity/tox.ini | 6 +- modules/sale_payment/.drone.yml | 70 ------- modules/sale_payment/.flake8 | 2 - modules/sale_payment/.isort.cfg | 3 - modules/sale_payment/doc/conf.py | 69 +++++++ modules/sale_payment/setup.py | 23 --- modules/sale_payment/tox.ini | 6 +- modules/sale_point/.drone.yml | 78 -------- modules/sale_point/.flake8 | 2 - modules/sale_point/.isort.cfg | 3 - modules/sale_point/doc/conf.py | 16 +- modules/sale_point/setup.py | 23 --- modules/sale_point/tox.ini | 6 +- modules/sale_price_list/.drone.yml | 70 ------- modules/sale_price_list/.flake8 | 2 - modules/sale_price_list/.isort.cfg | 3 - modules/sale_price_list/doc/conf.py | 69 +++++++ modules/sale_price_list/setup.py | 23 --- modules/sale_price_list/tox.ini | 6 +- modules/sale_product_customer/.drone.yml | 70 ------- modules/sale_product_customer/.flake8 | 2 - modules/sale_product_customer/.isort.cfg | 3 - modules/sale_product_customer/doc/conf.py | 69 +++++++ modules/sale_product_customer/setup.py | 23 --- modules/sale_product_customer/tox.ini | 6 +- modules/sale_product_quantity/.drone.yml | 78 -------- modules/sale_product_quantity/.flake8 | 2 - modules/sale_product_quantity/.isort.cfg | 3 - modules/sale_product_quantity/doc/conf.py | 16 +- modules/sale_product_quantity/setup.py | 24 --- modules/sale_product_quantity/tox.ini | 6 +- .../sale_product_recommendation/.drone.yml | 78 -------- modules/sale_product_recommendation/.flake8 | 2 - .../sale_product_recommendation/.isort.cfg | 3 - .../sale_product_recommendation/doc/conf.py | 16 +- modules/sale_product_recommendation/setup.py | 24 --- modules/sale_product_recommendation/tox.ini | 6 +- .../.drone.yml | 78 -------- .../.flake8 | 2 - .../.isort.cfg | 3 - .../doc/conf.py | 16 +- .../setup.py | 24 --- .../tox.ini | 6 +- modules/sale_promotion/.drone.yml | 70 ------- modules/sale_promotion/.flake8 | 2 - modules/sale_promotion/.isort.cfg | 3 - modules/sale_promotion/doc/conf.py | 69 +++++++ modules/sale_promotion/setup.py | 23 --- modules/sale_promotion/tox.ini | 6 +- modules/sale_promotion_coupon/.drone.yml | 70 ------- modules/sale_promotion_coupon/.flake8 | 2 - modules/sale_promotion_coupon/.isort.cfg | 3 - modules/sale_promotion_coupon/doc/conf.py | 69 +++++++ modules/sale_promotion_coupon/setup.py | 23 --- modules/sale_promotion_coupon/tox.ini | 6 +- .../sale_promotion_coupon_payment/.drone.yml | 78 -------- modules/sale_promotion_coupon_payment/.flake8 | 2 - .../sale_promotion_coupon_payment/.isort.cfg | 3 - .../sale_promotion_coupon_payment/doc/conf.py | 16 +- .../sale_promotion_coupon_payment/setup.py | 24 --- modules/sale_promotion_coupon_payment/tox.ini | 5 +- modules/sale_secondary_unit/.drone.yml | 70 ------- modules/sale_secondary_unit/.flake8 | 2 - modules/sale_secondary_unit/.isort.cfg | 3 - modules/sale_secondary_unit/doc/conf.py | 69 +++++++ modules/sale_secondary_unit/setup.py | 23 --- modules/sale_secondary_unit/tox.ini | 6 +- modules/sale_shipment_cost/.drone.yml | 70 ------- modules/sale_shipment_cost/.flake8 | 2 - modules/sale_shipment_cost/.isort.cfg | 3 - modules/sale_shipment_cost/doc/conf.py | 69 +++++++ modules/sale_shipment_cost/setup.py | 23 --- modules/sale_shipment_cost/tox.ini | 6 +- modules/sale_shipment_grouping/.drone.yml | 70 ------- modules/sale_shipment_grouping/.flake8 | 2 - modules/sale_shipment_grouping/.isort.cfg | 3 - modules/sale_shipment_grouping/doc/conf.py | 69 +++++++ modules/sale_shipment_grouping/setup.py | 23 --- modules/sale_shipment_grouping/tox.ini | 6 +- modules/sale_shipment_tolerance/.drone.yml | 70 ------- modules/sale_shipment_tolerance/.flake8 | 2 - modules/sale_shipment_tolerance/.isort.cfg | 3 - modules/sale_shipment_tolerance/doc/conf.py | 69 +++++++ modules/sale_shipment_tolerance/setup.py | 23 --- modules/sale_shipment_tolerance/tox.ini | 6 +- modules/sale_stock_quantity/.drone.yml | 70 ------- modules/sale_stock_quantity/.flake8 | 2 - modules/sale_stock_quantity/.isort.cfg | 3 - modules/sale_stock_quantity/doc/conf.py | 69 +++++++ modules/sale_stock_quantity/setup.py | 23 --- modules/sale_stock_quantity/tox.ini | 6 +- modules/sale_subscription/.drone.yml | 70 ------- modules/sale_subscription/.flake8 | 2 - modules/sale_subscription/.isort.cfg | 3 - modules/sale_subscription/doc/conf.py | 69 +++++++ modules/sale_subscription/setup.py | 23 --- modules/sale_subscription/tox.ini | 6 +- modules/sale_subscription_asset/.drone.yml | 70 ------- modules/sale_subscription_asset/.flake8 | 2 - modules/sale_subscription_asset/.isort.cfg | 3 - modules/sale_subscription_asset/doc/conf.py | 69 +++++++ modules/sale_subscription_asset/setup.py | 23 --- modules/sale_subscription_asset/tox.ini | 6 +- modules/sale_supply/.drone.yml | 70 ------- modules/sale_supply/.flake8 | 2 - modules/sale_supply/.isort.cfg | 3 - modules/sale_supply/doc/conf.py | 69 +++++++ modules/sale_supply/setup.py | 23 --- modules/sale_supply/tox.ini | 6 +- modules/sale_supply_drop_shipment/.drone.yml | 70 ------- modules/sale_supply_drop_shipment/.flake8 | 2 - modules/sale_supply_drop_shipment/.isort.cfg | 3 - modules/sale_supply_drop_shipment/doc/conf.py | 69 +++++++ modules/sale_supply_drop_shipment/setup.py | 23 --- modules/sale_supply_drop_shipment/tox.ini | 6 +- modules/sale_supply_production/.drone.yml | 70 ------- modules/sale_supply_production/.flake8 | 2 - modules/sale_supply_production/.isort.cfg | 3 - modules/sale_supply_production/doc/conf.py | 69 +++++++ modules/sale_supply_production/setup.py | 23 --- modules/sale_supply_production/tox.ini | 6 +- modules/stock/.drone.yml | 78 -------- modules/stock/.flake8 | 2 - modules/stock/.isort.cfg | 3 - modules/stock/doc/conf.py | 16 +- modules/stock/setup.py | 23 --- modules/stock/tox.ini | 6 +- modules/stock_assign_manual/.drone.yml | 70 ------- modules/stock_assign_manual/.flake8 | 2 - modules/stock_assign_manual/.isort.cfg | 3 - modules/stock_assign_manual/doc/conf.py | 69 +++++++ modules/stock_assign_manual/setup.py | 23 --- modules/stock_assign_manual/tox.ini | 6 +- modules/stock_consignment/.drone.yml | 70 ------- modules/stock_consignment/.flake8 | 2 - modules/stock_consignment/.isort.cfg | 3 - modules/stock_consignment/doc/conf.py | 69 +++++++ modules/stock_consignment/setup.py | 23 --- modules/stock_consignment/tox.ini | 6 +- modules/stock_forecast/.drone.yml | 70 ------- modules/stock_forecast/.flake8 | 2 - modules/stock_forecast/.isort.cfg | 3 - modules/stock_forecast/doc/conf.py | 69 +++++++ modules/stock_forecast/setup.py | 24 --- modules/stock_forecast/tox.ini | 6 +- modules/stock_inventory_location/.drone.yml | 70 ------- modules/stock_inventory_location/.flake8 | 2 - modules/stock_inventory_location/.isort.cfg | 3 - modules/stock_inventory_location/doc/conf.py | 69 +++++++ modules/stock_inventory_location/setup.py | 23 --- modules/stock_inventory_location/tox.ini | 6 +- modules/stock_location_move/.drone.yml | 70 ------- modules/stock_location_move/.flake8 | 2 - modules/stock_location_move/.isort.cfg | 3 - modules/stock_location_move/doc/conf.py | 69 +++++++ modules/stock_location_move/setup.py | 23 --- modules/stock_location_move/tox.ini | 6 +- modules/stock_location_sequence/.drone.yml | 70 ------- modules/stock_location_sequence/.flake8 | 2 - modules/stock_location_sequence/.isort.cfg | 3 - modules/stock_location_sequence/doc/conf.py | 69 +++++++ modules/stock_location_sequence/setup.py | 24 --- modules/stock_location_sequence/tox.ini | 6 +- modules/stock_lot/.drone.yml | 70 ------- modules/stock_lot/.flake8 | 2 - modules/stock_lot/.isort.cfg | 3 - modules/stock_lot/doc/conf.py | 69 +++++++ modules/stock_lot/setup.py | 23 --- modules/stock_lot/tox.ini | 6 +- modules/stock_lot_sled/.drone.yml | 70 ------- modules/stock_lot_sled/.flake8 | 2 - modules/stock_lot_sled/.isort.cfg | 3 - modules/stock_lot_sled/doc/conf.py | 69 +++++++ modules/stock_lot_sled/setup.py | 24 +-- modules/stock_lot_sled/tox.ini | 6 +- modules/stock_lot_unit/.drone.yml | 70 ------- modules/stock_lot_unit/.flake8 | 2 - modules/stock_lot_unit/.isort.cfg | 3 - modules/stock_lot_unit/doc/conf.py | 69 +++++++ modules/stock_lot_unit/setup.py | 23 --- modules/stock_lot_unit/tox.ini | 6 +- modules/stock_package/.drone.yml | 70 ------- modules/stock_package/.flake8 | 2 - modules/stock_package/.isort.cfg | 3 - modules/stock_package/doc/conf.py | 69 +++++++ modules/stock_package/setup.py | 23 --- modules/stock_package/tox.ini | 6 +- modules/stock_package_shipping/.drone.yml | 78 -------- modules/stock_package_shipping/.flake8 | 2 - modules/stock_package_shipping/.isort.cfg | 3 - modules/stock_package_shipping/doc/conf.py | 16 +- modules/stock_package_shipping/setup.py | 23 --- modules/stock_package_shipping/tox.ini | 6 +- modules/stock_package_shipping_dpd/.drone.yml | 71 ------- modules/stock_package_shipping_dpd/.flake8 | 2 - modules/stock_package_shipping_dpd/.isort.cfg | 3 - .../stock_package_shipping_dpd/doc/conf.py | 69 +++++++ modules/stock_package_shipping_dpd/setup.py | 23 --- modules/stock_package_shipping_dpd/tox.ini | 6 +- .../stock_package_shipping_mygls/.drone.yml | 79 -------- modules/stock_package_shipping_mygls/.flake8 | 2 - .../stock_package_shipping_mygls/.isort.cfg | 3 - .../stock_package_shipping_mygls/doc/conf.py | 16 +- modules/stock_package_shipping_mygls/setup.py | 24 --- modules/stock_package_shipping_mygls/tox.ini | 6 +- .../.drone.yml | 79 -------- .../stock_package_shipping_sendcloud/.flake8 | 2 - .../.isort.cfg | 3 - .../doc/conf.py | 16 +- .../stock_package_shipping_sendcloud/setup.py | 24 --- .../stock_package_shipping_sendcloud/tox.ini | 6 +- modules/stock_package_shipping_ups/.drone.yml | 71 ------- modules/stock_package_shipping_ups/.flake8 | 2 - modules/stock_package_shipping_ups/.isort.cfg | 3 - .../stock_package_shipping_ups/doc/conf.py | 69 +++++++ modules/stock_package_shipping_ups/setup.py | 23 --- modules/stock_package_shipping_ups/tox.ini | 6 +- modules/stock_product_location/.drone.yml | 70 ------- modules/stock_product_location/.flake8 | 2 - modules/stock_product_location/.isort.cfg | 3 - modules/stock_product_location/doc/conf.py | 69 +++++++ modules/stock_product_location/setup.py | 23 --- modules/stock_product_location/tox.ini | 6 +- .../stock_quantity_early_planning/.drone.yml | 78 -------- modules/stock_quantity_early_planning/.flake8 | 2 - .../stock_quantity_early_planning/.isort.cfg | 3 - .../stock_quantity_early_planning/doc/conf.py | 16 +- .../stock_quantity_early_planning/setup.py | 24 --- modules/stock_quantity_early_planning/tox.ini | 6 +- modules/stock_quantity_issue/.drone.yml | 78 -------- modules/stock_quantity_issue/.flake8 | 2 - modules/stock_quantity_issue/.isort.cfg | 3 - modules/stock_quantity_issue/doc/conf.py | 16 +- modules/stock_quantity_issue/setup.py | 23 --- modules/stock_quantity_issue/tox.ini | 6 +- modules/stock_secondary_unit/.drone.yml | 70 ------- modules/stock_secondary_unit/.flake8 | 2 - modules/stock_secondary_unit/.isort.cfg | 3 - modules/stock_secondary_unit/doc/conf.py | 69 +++++++ modules/stock_secondary_unit/setup.py | 23 --- modules/stock_secondary_unit/tox.ini | 6 +- modules/stock_shipment_cost/.drone.yml | 70 ------- modules/stock_shipment_cost/.flake8 | 2 - modules/stock_shipment_cost/.isort.cfg | 3 - modules/stock_shipment_cost/doc/conf.py | 69 +++++++ modules/stock_shipment_cost/setup.py | 23 --- modules/stock_shipment_cost/tox.ini | 6 +- modules/stock_shipment_cost_weight/.drone.yml | 78 -------- modules/stock_shipment_cost_weight/.flake8 | 2 - modules/stock_shipment_cost_weight/.isort.cfg | 3 - .../stock_shipment_cost_weight/doc/conf.py | 16 +- modules/stock_shipment_cost_weight/setup.py | 24 --- modules/stock_shipment_cost_weight/tox.ini | 6 +- .../stock_shipment_measurements/.drone.yml | 70 ------- modules/stock_shipment_measurements/.flake8 | 2 - .../stock_shipment_measurements/.isort.cfg | 3 - .../stock_shipment_measurements/doc/conf.py | 69 +++++++ modules/stock_shipment_measurements/setup.py | 23 --- modules/stock_shipment_measurements/tox.ini | 6 +- modules/stock_split/.drone.yml | 70 ------- modules/stock_split/.flake8 | 2 - modules/stock_split/.isort.cfg | 3 - modules/stock_split/doc/conf.py | 69 +++++++ modules/stock_split/setup.py | 23 --- modules/stock_split/tox.ini | 6 +- modules/stock_supply/.drone.yml | 70 ------- modules/stock_supply/.flake8 | 2 - modules/stock_supply/.isort.cfg | 3 - modules/stock_supply/doc/conf.py | 69 +++++++ modules/stock_supply/setup.py | 23 --- modules/stock_supply/tox.ini | 6 +- modules/stock_supply_day/.drone.yml | 70 ------- modules/stock_supply_day/.flake8 | 2 - modules/stock_supply_day/.isort.cfg | 3 - modules/stock_supply_day/doc/conf.py | 69 +++++++ modules/stock_supply_day/setup.py | 24 --- modules/stock_supply_day/tox.ini | 6 +- modules/stock_supply_forecast/.drone.yml | 70 ------- modules/stock_supply_forecast/.flake8 | 2 - modules/stock_supply_forecast/.isort.cfg | 3 - modules/stock_supply_forecast/doc/conf.py | 69 +++++++ modules/stock_supply_forecast/setup.py | 23 --- modules/stock_supply_forecast/tox.ini | 6 +- modules/stock_supply_production/.drone.yml | 70 ------- modules/stock_supply_production/.flake8 | 2 - modules/stock_supply_production/.isort.cfg | 3 - modules/stock_supply_production/doc/conf.py | 69 +++++++ modules/stock_supply_production/setup.py | 23 --- modules/stock_supply_production/tox.ini | 6 +- modules/timesheet/.drone.yml | 70 ------- modules/timesheet/.flake8 | 2 - modules/timesheet/.isort.cfg | 3 - modules/timesheet/doc/conf.py | 69 +++++++ modules/timesheet/setup.py | 24 --- modules/timesheet/tox.ini | 6 +- modules/timesheet_cost/.drone.yml | 70 ------- modules/timesheet_cost/.flake8 | 2 - modules/timesheet_cost/.isort.cfg | 3 - modules/timesheet_cost/doc/conf.py | 69 +++++++ modules/timesheet_cost/setup.py | 24 --- modules/timesheet_cost/tox.ini | 6 +- modules/user_role/.drone.yml | 70 ------- modules/user_role/.flake8 | 2 - modules/user_role/.isort.cfg | 3 - modules/user_role/doc/conf.py | 69 +++++++ modules/user_role/setup.py | 23 --- modules/user_role/tox.ini | 6 +- modules/web_shop/.drone.yml | 70 ------- modules/web_shop/.flake8 | 2 - modules/web_shop/.isort.cfg | 3 - modules/web_shop/doc/conf.py | 69 +++++++ modules/web_shop/setup.py | 23 --- modules/web_shop/tox.ini | 6 +- modules/web_shop_shopify/.drone.yml | 79 -------- modules/web_shop_shopify/.flake8 | 2 - modules/web_shop_shopify/.isort.cfg | 3 - modules/web_shop_shopify/doc/conf.py | 16 +- modules/web_shop_shopify/setup.py | 24 --- modules/web_shop_shopify/tox.ini | 6 +- modules/web_shop_vue_storefront/.drone.yml | 70 ------- modules/web_shop_vue_storefront/.flake8 | 2 - modules/web_shop_vue_storefront/.isort.cfg | 3 - modules/web_shop_vue_storefront/doc/conf.py | 69 +++++++ modules/web_shop_vue_storefront/setup.py | 23 --- modules/web_shop_vue_storefront/tox.ini | 6 +- .../web_shop_vue_storefront_stripe/.drone.yml | 70 ------- .../web_shop_vue_storefront_stripe/.flake8 | 2 - .../web_shop_vue_storefront_stripe/.isort.cfg | 3 - .../doc/conf.py | 69 +++++++ .../web_shop_vue_storefront_stripe/setup.py | 23 --- .../web_shop_vue_storefront_stripe/tox.ini | 6 +- modules/web_shortener/.drone.yml | 70 ------- modules/web_shortener/.flake8 | 2 - modules/web_shortener/.isort.cfg | 3 - modules/web_shortener/doc/conf.py | 69 +++++++ modules/web_shortener/setup.py | 23 --- modules/web_shortener/tox.ini | 6 +- modules/web_user/.drone.yml | 70 ------- modules/web_user/.flake8 | 2 - modules/web_user/.isort.cfg | 3 - modules/web_user/doc/conf.py | 69 +++++++ modules/web_user/setup.py | 23 --- modules/web_user/tox.ini | 6 +- proteus/.drone.yml | 50 ----- proteus/.flake8 | 2 - proteus/.isort.cfg | 3 - proteus/doc/conf.py | 22 ++- proteus/setup.py | 23 --- proteus/tox.ini | 2 +- readthedocs/conf.py | 8 + sao/.drone.yml | 17 -- tryton/.drone.yml | 46 ----- tryton/.flake8 | 2 - tryton/.isort.cfg | 3 - tryton/doc/conf.py | 22 ++- tryton/setup.py | 23 --- tryton/tox.ini | 2 +- trytond-gis/.drone.yml | 59 ------ trytond-gis/.flake8 | 2 - trytond-gis/.isort.cfg | 3 - trytond-gis/doc/conf.py | 17 +- trytond-gis/setup.py | 24 --- trytond-gis/tox.ini | 4 +- trytond/.drone.yml | 78 -------- trytond/.flake8 | 2 - trytond/.isort.cfg | 3 - trytond/doc/conf.py | 16 +- trytond/setup.py | 23 --- trytond/tox.ini | 6 +- 1207 files changed, 11522 insertions(+), 20819 deletions(-) rename modules/account/.flake8 => .flake8 (100%) create mode 100644 .gitlab-ci.yml rename sao/.bower_allow_root.sh => .gitlab-scripts/bower_allow_root.sh (100%) create mode 100755 .gitlab-scripts/generate-ci.py create mode 100755 .gitlab-scripts/generate-doc.sh create mode 100755 .gitlab-scripts/generate-packages.sh create mode 100644 .gitlab-scripts/gitlab-ci.yml create mode 100755 .gitlab-scripts/trigger-readthedocs.py create mode 100644 .hgignore create mode 100755 .hooks/link_modules create mode 100755 .hooks/update_requirements rename modules/account/.isort.cfg => .isort.cfg (100%) create mode 100644 README.rst delete mode 100644 modules/account/.drone.yml delete mode 100644 modules/account_asset/.drone.yml delete mode 100644 modules/account_asset/.flake8 delete mode 100644 modules/account_asset/.isort.cfg create mode 100644 modules/account_asset/doc/conf.py delete mode 100644 modules/account_be/.drone.yml delete mode 100644 modules/account_be/.flake8 delete mode 100644 modules/account_be/.isort.cfg create mode 100644 modules/account_be/doc/conf.py delete mode 100644 modules/account_budget/.drone.yml delete mode 100644 modules/account_budget/.flake8 delete mode 100644 modules/account_budget/.isort.cfg delete mode 100644 modules/account_cash_rounding/.drone.yml delete mode 100644 modules/account_cash_rounding/.flake8 delete mode 100644 modules/account_cash_rounding/.isort.cfg create mode 100644 modules/account_cash_rounding/doc/conf.py delete mode 100644 modules/account_consolidation/.drone.yml delete mode 100644 modules/account_consolidation/.flake8 delete mode 100644 modules/account_consolidation/.isort.cfg delete mode 100644 modules/account_credit_limit/.drone.yml delete mode 100644 modules/account_credit_limit/.flake8 delete mode 100644 modules/account_credit_limit/.isort.cfg create mode 100644 modules/account_credit_limit/doc/conf.py delete mode 100644 modules/account_de_skr03/.drone.yml delete mode 100644 modules/account_de_skr03/.flake8 delete mode 100644 modules/account_de_skr03/.isort.cfg create mode 100644 modules/account_de_skr03/doc/conf.py delete mode 100644 modules/account_deposit/.drone.yml delete mode 100644 modules/account_deposit/.flake8 delete mode 100644 modules/account_deposit/.isort.cfg create mode 100644 modules/account_deposit/doc/conf.py delete mode 100644 modules/account_dunning/.drone.yml delete mode 100644 modules/account_dunning/.flake8 delete mode 100644 modules/account_dunning/.isort.cfg create mode 100644 modules/account_dunning/doc/conf.py delete mode 100644 modules/account_dunning_email/.drone.yml delete mode 100644 modules/account_dunning_email/.flake8 delete mode 100644 modules/account_dunning_email/.isort.cfg create mode 100644 modules/account_dunning_email/doc/conf.py delete mode 100644 modules/account_dunning_fee/.drone.yml delete mode 100644 modules/account_dunning_fee/.flake8 delete mode 100644 modules/account_dunning_fee/.isort.cfg create mode 100644 modules/account_dunning_fee/doc/conf.py delete mode 100644 modules/account_dunning_letter/.drone.yml delete mode 100644 modules/account_dunning_letter/.flake8 delete mode 100644 modules/account_dunning_letter/.isort.cfg create mode 100644 modules/account_dunning_letter/doc/conf.py delete mode 100644 modules/account_es/.drone.yml delete mode 100644 modules/account_es/.flake8 delete mode 100644 modules/account_es/.isort.cfg create mode 100644 modules/account_es/doc/conf.py delete mode 100644 modules/account_es_sii/.drone.yml delete mode 100644 modules/account_es_sii/.flake8 delete mode 100644 modules/account_es_sii/.isort.cfg delete mode 100644 modules/account_eu/.drone.yml delete mode 100644 modules/account_eu/.flake8 delete mode 100644 modules/account_eu/.isort.cfg create mode 100644 modules/account_eu/doc/conf.py delete mode 100644 modules/account_fr/.drone.yml delete mode 100644 modules/account_fr/.flake8 delete mode 100644 modules/account_fr/.isort.cfg create mode 100644 modules/account_fr/doc/conf.py delete mode 100644 modules/account_fr_chorus/.drone.yml delete mode 100644 modules/account_fr_chorus/.flake8 delete mode 100644 modules/account_fr_chorus/.isort.cfg create mode 100644 modules/account_fr_chorus/doc/conf.py delete mode 100644 modules/account_invoice/.drone.yml delete mode 100644 modules/account_invoice/.flake8 delete mode 100644 modules/account_invoice/.isort.cfg delete mode 100644 modules/account_invoice_correction/.drone.yml delete mode 100644 modules/account_invoice_correction/.flake8 delete mode 100644 modules/account_invoice_correction/.isort.cfg create mode 100644 modules/account_invoice_correction/doc/conf.py delete mode 100644 modules/account_invoice_defer/.drone.yml delete mode 100644 modules/account_invoice_defer/.flake8 delete mode 100644 modules/account_invoice_defer/.isort.cfg delete mode 100644 modules/account_invoice_history/.drone.yml delete mode 100644 modules/account_invoice_history/.flake8 delete mode 100644 modules/account_invoice_history/.isort.cfg create mode 100644 modules/account_invoice_history/doc/conf.py delete mode 100644 modules/account_invoice_line_standalone/.drone.yml delete mode 100644 modules/account_invoice_line_standalone/.flake8 delete mode 100644 modules/account_invoice_line_standalone/.isort.cfg create mode 100644 modules/account_invoice_line_standalone/doc/conf.py delete mode 100644 modules/account_invoice_secondary_unit/.drone.yml delete mode 100644 modules/account_invoice_secondary_unit/.flake8 delete mode 100644 modules/account_invoice_secondary_unit/.isort.cfg create mode 100644 modules/account_invoice_secondary_unit/doc/conf.py delete mode 100644 modules/account_invoice_stock/.drone.yml delete mode 100644 modules/account_invoice_stock/.flake8 delete mode 100644 modules/account_invoice_stock/.isort.cfg delete mode 100644 modules/account_invoice_watermark/.drone.yml delete mode 100644 modules/account_invoice_watermark/.flake8 delete mode 100644 modules/account_invoice_watermark/.isort.cfg delete mode 100644 modules/account_move_line_grouping/.drone.yml delete mode 100644 modules/account_move_line_grouping/.flake8 delete mode 100644 modules/account_move_line_grouping/.isort.cfg delete mode 100644 modules/account_payment/.drone.yml delete mode 100644 modules/account_payment/.flake8 delete mode 100644 modules/account_payment/.isort.cfg create mode 100644 modules/account_payment/doc/conf.py delete mode 100644 modules/account_payment_braintree/.drone.yml delete mode 100644 modules/account_payment_braintree/.flake8 delete mode 100644 modules/account_payment_braintree/.isort.cfg create mode 100644 modules/account_payment_braintree/doc/conf.py delete mode 100644 modules/account_payment_clearing/.drone.yml delete mode 100644 modules/account_payment_clearing/.flake8 delete mode 100644 modules/account_payment_clearing/.isort.cfg create mode 100644 modules/account_payment_clearing/doc/conf.py delete mode 100644 modules/account_payment_sepa/.drone.yml delete mode 100644 modules/account_payment_sepa/.flake8 delete mode 100644 modules/account_payment_sepa/.isort.cfg create mode 100644 modules/account_payment_sepa/doc/conf.py delete mode 100644 modules/account_payment_sepa_cfonb/.drone.yml delete mode 100644 modules/account_payment_sepa_cfonb/.flake8 delete mode 100644 modules/account_payment_sepa_cfonb/.isort.cfg create mode 100644 modules/account_payment_sepa_cfonb/doc/conf.py delete mode 100644 modules/account_payment_stripe/.drone.yml delete mode 100644 modules/account_payment_stripe/.flake8 delete mode 100644 modules/account_payment_stripe/.isort.cfg create mode 100644 modules/account_payment_stripe/doc/conf.py delete mode 100644 modules/account_product/.drone.yml delete mode 100644 modules/account_product/.flake8 delete mode 100644 modules/account_product/.isort.cfg delete mode 100644 modules/account_receivable_rule/.drone.yml delete mode 100644 modules/account_receivable_rule/.flake8 delete mode 100644 modules/account_receivable_rule/.isort.cfg delete mode 100644 modules/account_rule/.drone.yml delete mode 100644 modules/account_rule/.flake8 delete mode 100644 modules/account_rule/.isort.cfg delete mode 100644 modules/account_statement/.drone.yml delete mode 100644 modules/account_statement/.flake8 delete mode 100644 modules/account_statement/.isort.cfg create mode 100644 modules/account_statement/doc/conf.py delete mode 100644 modules/account_statement_aeb43/.drone.yml delete mode 100644 modules/account_statement_aeb43/.flake8 delete mode 100644 modules/account_statement_aeb43/.isort.cfg create mode 100644 modules/account_statement_aeb43/doc/conf.py delete mode 100644 modules/account_statement_coda/.drone.yml delete mode 100644 modules/account_statement_coda/.flake8 delete mode 100644 modules/account_statement_coda/.isort.cfg create mode 100644 modules/account_statement_coda/doc/conf.py delete mode 100644 modules/account_statement_ofx/.drone.yml delete mode 100644 modules/account_statement_ofx/.flake8 delete mode 100644 modules/account_statement_ofx/.isort.cfg create mode 100644 modules/account_statement_ofx/doc/conf.py delete mode 100644 modules/account_statement_rule/.drone.yml delete mode 100644 modules/account_statement_rule/.flake8 delete mode 100644 modules/account_statement_rule/.isort.cfg create mode 100644 modules/account_statement_rule/doc/conf.py delete mode 100644 modules/account_statement_sepa/.drone.yml delete mode 100644 modules/account_statement_sepa/.flake8 delete mode 100644 modules/account_statement_sepa/.isort.cfg delete mode 100644 modules/account_stock_anglo_saxon/.drone.yml delete mode 100644 modules/account_stock_anglo_saxon/.flake8 delete mode 100644 modules/account_stock_anglo_saxon/.isort.cfg create mode 100644 modules/account_stock_anglo_saxon/doc/conf.py delete mode 100644 modules/account_stock_continental/.drone.yml delete mode 100644 modules/account_stock_continental/.flake8 delete mode 100644 modules/account_stock_continental/.isort.cfg create mode 100644 modules/account_stock_continental/doc/conf.py delete mode 100644 modules/account_stock_landed_cost/.drone.yml delete mode 100644 modules/account_stock_landed_cost/.flake8 delete mode 100644 modules/account_stock_landed_cost/.isort.cfg create mode 100644 modules/account_stock_landed_cost/doc/conf.py delete mode 100644 modules/account_stock_landed_cost_weight/.drone.yml delete mode 100644 modules/account_stock_landed_cost_weight/.flake8 delete mode 100644 modules/account_stock_landed_cost_weight/.isort.cfg create mode 100644 modules/account_stock_landed_cost_weight/doc/conf.py delete mode 100644 modules/account_stock_shipment_cost/.drone.yml delete mode 100644 modules/account_stock_shipment_cost/.flake8 delete mode 100644 modules/account_stock_shipment_cost/.isort.cfg delete mode 100644 modules/account_stock_shipment_cost_weight/.drone.yml delete mode 100644 modules/account_stock_shipment_cost_weight/.flake8 delete mode 100644 modules/account_stock_shipment_cost_weight/.isort.cfg delete mode 100644 modules/account_tax_cash/.drone.yml delete mode 100644 modules/account_tax_cash/.flake8 delete mode 100644 modules/account_tax_cash/.isort.cfg create mode 100644 modules/account_tax_cash/doc/conf.py delete mode 100644 modules/account_tax_non_deductible/.drone.yml delete mode 100644 modules/account_tax_non_deductible/.flake8 delete mode 100644 modules/account_tax_non_deductible/.isort.cfg delete mode 100644 modules/account_tax_rule_country/.drone.yml delete mode 100644 modules/account_tax_rule_country/.flake8 delete mode 100644 modules/account_tax_rule_country/.isort.cfg create mode 100644 modules/account_tax_rule_country/doc/conf.py delete mode 100644 modules/analytic_account/.drone.yml delete mode 100644 modules/analytic_account/.flake8 delete mode 100644 modules/analytic_account/.isort.cfg create mode 100644 modules/analytic_account/doc/conf.py delete mode 100644 modules/analytic_budget/.drone.yml delete mode 100644 modules/analytic_budget/.flake8 delete mode 100644 modules/analytic_budget/.isort.cfg delete mode 100644 modules/analytic_invoice/.drone.yml delete mode 100644 modules/analytic_invoice/.flake8 delete mode 100644 modules/analytic_invoice/.isort.cfg create mode 100644 modules/analytic_invoice/doc/conf.py delete mode 100644 modules/analytic_purchase/.drone.yml delete mode 100644 modules/analytic_purchase/.flake8 delete mode 100644 modules/analytic_purchase/.isort.cfg create mode 100644 modules/analytic_purchase/doc/conf.py delete mode 100644 modules/analytic_sale/.drone.yml delete mode 100644 modules/analytic_sale/.flake8 delete mode 100644 modules/analytic_sale/.isort.cfg create mode 100644 modules/analytic_sale/doc/conf.py delete mode 100644 modules/attendance/.drone.yml delete mode 100644 modules/attendance/.flake8 delete mode 100644 modules/attendance/.isort.cfg create mode 100644 modules/attendance/doc/conf.py delete mode 100644 modules/authentication_saml/.drone.yml delete mode 100644 modules/authentication_saml/.flake8 delete mode 100644 modules/authentication_saml/.isort.cfg delete mode 100644 modules/authentication_sms/.drone.yml delete mode 100644 modules/authentication_sms/.flake8 delete mode 100644 modules/authentication_sms/.isort.cfg create mode 100644 modules/authentication_sms/doc/conf.py delete mode 100644 modules/bank/.drone.yml delete mode 100644 modules/bank/.flake8 delete mode 100644 modules/bank/.isort.cfg create mode 100644 modules/bank/doc/conf.py delete mode 100644 modules/carrier/.drone.yml delete mode 100644 modules/carrier/.flake8 delete mode 100644 modules/carrier/.isort.cfg create mode 100644 modules/carrier/doc/conf.py delete mode 100644 modules/carrier_carriage/.drone.yml delete mode 100644 modules/carrier_carriage/.flake8 delete mode 100644 modules/carrier_carriage/.isort.cfg delete mode 100644 modules/carrier_percentage/.drone.yml delete mode 100644 modules/carrier_percentage/.flake8 delete mode 100644 modules/carrier_percentage/.isort.cfg create mode 100644 modules/carrier_percentage/doc/conf.py delete mode 100644 modules/carrier_subdivision/.drone.yml delete mode 100644 modules/carrier_subdivision/.flake8 delete mode 100644 modules/carrier_subdivision/.isort.cfg create mode 100644 modules/carrier_subdivision/doc/conf.py delete mode 100644 modules/carrier_weight/.drone.yml delete mode 100644 modules/carrier_weight/.flake8 delete mode 100644 modules/carrier_weight/.isort.cfg create mode 100644 modules/carrier_weight/doc/conf.py delete mode 100644 modules/commission/.drone.yml delete mode 100644 modules/commission/.flake8 delete mode 100644 modules/commission/.isort.cfg delete mode 100644 modules/commission_waiting/.drone.yml delete mode 100644 modules/commission_waiting/.flake8 delete mode 100644 modules/commission_waiting/.isort.cfg create mode 100644 modules/commission_waiting/doc/conf.py delete mode 100644 modules/company/.drone.yml delete mode 100644 modules/company/.flake8 delete mode 100644 modules/company/.isort.cfg delete mode 100644 modules/company_work_time/.drone.yml delete mode 100644 modules/company_work_time/.flake8 delete mode 100644 modules/company_work_time/.isort.cfg create mode 100644 modules/company_work_time/doc/conf.py delete mode 100644 modules/country/.drone.yml delete mode 100644 modules/country/.flake8 delete mode 100644 modules/country/.isort.cfg delete mode 100644 modules/currency/.drone.yml delete mode 100644 modules/currency/.flake8 delete mode 100644 modules/currency/.isort.cfg delete mode 100644 modules/currency_ro/.drone.yml delete mode 100644 modules/currency_ro/.flake8 delete mode 100644 modules/currency_ro/.isort.cfg delete mode 100644 modules/currency_rs/.drone.yml delete mode 100644 modules/currency_rs/.flake8 delete mode 100644 modules/currency_rs/.isort.cfg delete mode 100644 modules/customs/.drone.yml delete mode 100644 modules/customs/.flake8 delete mode 100644 modules/customs/.isort.cfg create mode 100644 modules/customs/doc/conf.py delete mode 100644 modules/dashboard/.drone.yml delete mode 100644 modules/dashboard/.flake8 delete mode 100644 modules/dashboard/.isort.cfg create mode 100644 modules/dashboard/doc/conf.py delete mode 100644 modules/edocument_uncefact/.drone.yml delete mode 100644 modules/edocument_uncefact/.flake8 delete mode 100644 modules/edocument_uncefact/.isort.cfg create mode 100644 modules/edocument_uncefact/doc/conf.py delete mode 100644 modules/edocument_unece/.drone.yml delete mode 100644 modules/edocument_unece/.flake8 delete mode 100644 modules/edocument_unece/.isort.cfg create mode 100644 modules/edocument_unece/doc/conf.py delete mode 100644 modules/google_maps/.drone.yml delete mode 100644 modules/google_maps/.flake8 delete mode 100644 modules/google_maps/.isort.cfg create mode 100644 modules/google_maps/doc/conf.py delete mode 100644 modules/incoterm/.drone.yml delete mode 100644 modules/incoterm/.flake8 delete mode 100644 modules/incoterm/.isort.cfg delete mode 100644 modules/ldap_authentication/.drone.yml delete mode 100644 modules/ldap_authentication/.flake8 delete mode 100644 modules/ldap_authentication/.isort.cfg create mode 100644 modules/ldap_authentication/doc/conf.py delete mode 100644 modules/marketing/.drone.yml delete mode 100644 modules/marketing/.flake8 delete mode 100644 modules/marketing/.isort.cfg create mode 100644 modules/marketing/doc/conf.py delete mode 100644 modules/marketing_automation/.drone.yml delete mode 100644 modules/marketing_automation/.flake8 delete mode 100644 modules/marketing_automation/.isort.cfg create mode 100644 modules/marketing_automation/doc/conf.py delete mode 100644 modules/marketing_campaign/.drone.yml delete mode 100644 modules/marketing_campaign/.flake8 delete mode 100644 modules/marketing_campaign/.isort.cfg delete mode 100644 modules/marketing_email/.drone.yml delete mode 100644 modules/marketing_email/.flake8 delete mode 100644 modules/marketing_email/.isort.cfg create mode 100644 modules/marketing_email/doc/conf.py delete mode 100644 modules/notification_email/.drone.yml delete mode 100644 modules/notification_email/.flake8 delete mode 100644 modules/notification_email/.isort.cfg create mode 100644 modules/notification_email/doc/conf.py delete mode 100644 modules/party/.drone.yml delete mode 100644 modules/party/.flake8 delete mode 100644 modules/party/.isort.cfg delete mode 100644 modules/party_avatar/.drone.yml delete mode 100644 modules/party_avatar/.flake8 delete mode 100644 modules/party_avatar/.isort.cfg delete mode 100644 modules/party_relationship/.drone.yml delete mode 100644 modules/party_relationship/.flake8 delete mode 100644 modules/party_relationship/.isort.cfg create mode 100644 modules/party_relationship/doc/conf.py delete mode 100644 modules/party_siret/.drone.yml delete mode 100644 modules/party_siret/.flake8 delete mode 100644 modules/party_siret/.isort.cfg create mode 100644 modules/party_siret/doc/conf.py delete mode 100644 modules/product/.drone.yml delete mode 100644 modules/product/.flake8 delete mode 100644 modules/product/.isort.cfg delete mode 100644 modules/product_attribute/.drone.yml delete mode 100644 modules/product_attribute/.flake8 delete mode 100644 modules/product_attribute/.isort.cfg create mode 100644 modules/product_attribute/doc/conf.py delete mode 100644 modules/product_classification/.drone.yml delete mode 100644 modules/product_classification/.flake8 delete mode 100644 modules/product_classification/.isort.cfg create mode 100644 modules/product_classification/doc/conf.py delete mode 100644 modules/product_classification_taxonomic/.drone.yml delete mode 100644 modules/product_classification_taxonomic/.flake8 delete mode 100644 modules/product_classification_taxonomic/.isort.cfg create mode 100644 modules/product_classification_taxonomic/doc/conf.py delete mode 100644 modules/product_cost_fifo/.drone.yml delete mode 100644 modules/product_cost_fifo/.flake8 delete mode 100644 modules/product_cost_fifo/.isort.cfg create mode 100644 modules/product_cost_fifo/doc/conf.py delete mode 100644 modules/product_cost_history/.drone.yml delete mode 100644 modules/product_cost_history/.flake8 delete mode 100644 modules/product_cost_history/.isort.cfg create mode 100644 modules/product_cost_history/doc/conf.py delete mode 100644 modules/product_cost_warehouse/.drone.yml delete mode 100644 modules/product_cost_warehouse/.flake8 delete mode 100644 modules/product_cost_warehouse/.isort.cfg delete mode 100644 modules/product_image/.drone.yml delete mode 100644 modules/product_image/.flake8 delete mode 100644 modules/product_image/.isort.cfg delete mode 100644 modules/product_image_attribute/.drone.yml delete mode 100644 modules/product_image_attribute/.flake8 delete mode 100644 modules/product_image_attribute/.isort.cfg delete mode 100644 modules/product_kit/.drone.yml delete mode 100644 modules/product_kit/.flake8 delete mode 100644 modules/product_kit/.isort.cfg delete mode 100644 modules/product_measurements/.drone.yml delete mode 100644 modules/product_measurements/.flake8 delete mode 100644 modules/product_measurements/.isort.cfg create mode 100644 modules/product_measurements/doc/conf.py delete mode 100644 modules/product_price_list/.drone.yml delete mode 100644 modules/product_price_list/.flake8 delete mode 100644 modules/product_price_list/.isort.cfg create mode 100644 modules/product_price_list/doc/conf.py delete mode 100644 modules/product_price_list_dates/.drone.yml delete mode 100644 modules/product_price_list_dates/.flake8 delete mode 100644 modules/product_price_list_dates/.isort.cfg create mode 100644 modules/product_price_list_dates/doc/conf.py delete mode 100644 modules/product_price_list_parent/.drone.yml delete mode 100644 modules/product_price_list_parent/.flake8 delete mode 100644 modules/product_price_list_parent/.isort.cfg create mode 100644 modules/product_price_list_parent/doc/conf.py delete mode 100644 modules/production/.drone.yml delete mode 100644 modules/production/.flake8 delete mode 100644 modules/production/.isort.cfg create mode 100644 modules/production/doc/conf.py delete mode 100644 modules/production_outsourcing/.drone.yml delete mode 100644 modules/production_outsourcing/.flake8 delete mode 100644 modules/production_outsourcing/.isort.cfg create mode 100644 modules/production_outsourcing/doc/conf.py delete mode 100644 modules/production_routing/.drone.yml delete mode 100644 modules/production_routing/.flake8 delete mode 100644 modules/production_routing/.isort.cfg create mode 100644 modules/production_routing/doc/conf.py delete mode 100644 modules/production_split/.drone.yml delete mode 100644 modules/production_split/.flake8 delete mode 100644 modules/production_split/.isort.cfg create mode 100644 modules/production_split/doc/conf.py delete mode 100644 modules/production_work/.drone.yml delete mode 100644 modules/production_work/.flake8 delete mode 100644 modules/production_work/.isort.cfg create mode 100644 modules/production_work/doc/conf.py delete mode 100644 modules/production_work_timesheet/.drone.yml delete mode 100644 modules/production_work_timesheet/.flake8 delete mode 100644 modules/production_work_timesheet/.isort.cfg create mode 100644 modules/production_work_timesheet/doc/conf.py delete mode 100644 modules/project/.drone.yml delete mode 100644 modules/project/.flake8 delete mode 100644 modules/project/.isort.cfg delete mode 100644 modules/project_invoice/.drone.yml delete mode 100644 modules/project_invoice/.flake8 delete mode 100644 modules/project_invoice/.isort.cfg create mode 100644 modules/project_invoice/doc/conf.py delete mode 100644 modules/project_plan/.drone.yml delete mode 100644 modules/project_plan/.flake8 delete mode 100644 modules/project_plan/.isort.cfg create mode 100644 modules/project_plan/doc/conf.py delete mode 100644 modules/project_revenue/.drone.yml delete mode 100644 modules/project_revenue/.flake8 delete mode 100644 modules/project_revenue/.isort.cfg create mode 100644 modules/project_revenue/doc/conf.py delete mode 100644 modules/purchase/.drone.yml delete mode 100644 modules/purchase/.flake8 delete mode 100644 modules/purchase/.isort.cfg delete mode 100644 modules/purchase_amendment/.drone.yml delete mode 100644 modules/purchase_amendment/.flake8 delete mode 100644 modules/purchase_amendment/.isort.cfg create mode 100644 modules/purchase_amendment/doc/conf.py delete mode 100644 modules/purchase_blanket_agreement/.drone.yml delete mode 100644 modules/purchase_blanket_agreement/.flake8 delete mode 100644 modules/purchase_blanket_agreement/.isort.cfg delete mode 100644 modules/purchase_history/.drone.yml delete mode 100644 modules/purchase_history/.flake8 delete mode 100644 modules/purchase_history/.isort.cfg create mode 100644 modules/purchase_history/doc/conf.py delete mode 100644 modules/purchase_invoice_line_standalone/.drone.yml delete mode 100644 modules/purchase_invoice_line_standalone/.flake8 delete mode 100644 modules/purchase_invoice_line_standalone/.isort.cfg create mode 100644 modules/purchase_invoice_line_standalone/doc/conf.py delete mode 100644 modules/purchase_price_list/.drone.yml delete mode 100644 modules/purchase_price_list/.flake8 delete mode 100644 modules/purchase_price_list/.isort.cfg delete mode 100644 modules/purchase_product_quantity/.drone.yml delete mode 100644 modules/purchase_product_quantity/.flake8 delete mode 100644 modules/purchase_product_quantity/.isort.cfg delete mode 100644 modules/purchase_request/.drone.yml delete mode 100644 modules/purchase_request/.flake8 delete mode 100644 modules/purchase_request/.isort.cfg create mode 100644 modules/purchase_request/doc/conf.py delete mode 100644 modules/purchase_request_quotation/.drone.yml delete mode 100644 modules/purchase_request_quotation/.flake8 delete mode 100644 modules/purchase_request_quotation/.isort.cfg create mode 100644 modules/purchase_request_quotation/doc/conf.py delete mode 100644 modules/purchase_requisition/.drone.yml delete mode 100644 modules/purchase_requisition/.flake8 delete mode 100644 modules/purchase_requisition/.isort.cfg create mode 100644 modules/purchase_requisition/doc/conf.py delete mode 100644 modules/purchase_secondary_unit/.drone.yml delete mode 100644 modules/purchase_secondary_unit/.flake8 delete mode 100644 modules/purchase_secondary_unit/.isort.cfg create mode 100644 modules/purchase_secondary_unit/doc/conf.py delete mode 100644 modules/purchase_shipment_cost/.drone.yml delete mode 100644 modules/purchase_shipment_cost/.flake8 delete mode 100644 modules/purchase_shipment_cost/.isort.cfg create mode 100644 modules/purchase_shipment_cost/doc/conf.py delete mode 100644 modules/sale/.drone.yml delete mode 100644 modules/sale/.flake8 delete mode 100644 modules/sale/.isort.cfg delete mode 100644 modules/sale_advance_payment/.drone.yml delete mode 100644 modules/sale_advance_payment/.flake8 delete mode 100644 modules/sale_advance_payment/.isort.cfg create mode 100644 modules/sale_advance_payment/doc/conf.py delete mode 100644 modules/sale_amendment/.drone.yml delete mode 100644 modules/sale_amendment/.flake8 delete mode 100644 modules/sale_amendment/.isort.cfg create mode 100644 modules/sale_amendment/doc/conf.py delete mode 100644 modules/sale_blanket_agreement/.drone.yml delete mode 100644 modules/sale_blanket_agreement/.flake8 delete mode 100644 modules/sale_blanket_agreement/.isort.cfg delete mode 100644 modules/sale_complaint/.drone.yml delete mode 100644 modules/sale_complaint/.flake8 delete mode 100644 modules/sale_complaint/.isort.cfg create mode 100644 modules/sale_complaint/doc/conf.py delete mode 100644 modules/sale_credit_limit/.drone.yml delete mode 100644 modules/sale_credit_limit/.flake8 delete mode 100644 modules/sale_credit_limit/.isort.cfg create mode 100644 modules/sale_credit_limit/doc/conf.py delete mode 100644 modules/sale_discount/.drone.yml delete mode 100644 modules/sale_discount/.flake8 delete mode 100644 modules/sale_discount/.isort.cfg create mode 100644 modules/sale_discount/doc/conf.py delete mode 100644 modules/sale_extra/.drone.yml delete mode 100644 modules/sale_extra/.flake8 delete mode 100644 modules/sale_extra/.isort.cfg create mode 100644 modules/sale_extra/doc/conf.py delete mode 100644 modules/sale_gift_card/.drone.yml delete mode 100644 modules/sale_gift_card/.flake8 delete mode 100644 modules/sale_gift_card/.isort.cfg delete mode 100644 modules/sale_history/.drone.yml delete mode 100644 modules/sale_history/.flake8 delete mode 100644 modules/sale_history/.isort.cfg create mode 100644 modules/sale_history/doc/conf.py delete mode 100644 modules/sale_invoice_date/.drone.yml delete mode 100644 modules/sale_invoice_date/.flake8 delete mode 100644 modules/sale_invoice_date/.isort.cfg delete mode 100644 modules/sale_invoice_grouping/.drone.yml delete mode 100644 modules/sale_invoice_grouping/.flake8 delete mode 100644 modules/sale_invoice_grouping/.isort.cfg create mode 100644 modules/sale_invoice_grouping/doc/conf.py delete mode 100644 modules/sale_opportunity/.drone.yml delete mode 100644 modules/sale_opportunity/.flake8 delete mode 100644 modules/sale_opportunity/.isort.cfg create mode 100644 modules/sale_opportunity/doc/conf.py delete mode 100644 modules/sale_payment/.drone.yml delete mode 100644 modules/sale_payment/.flake8 delete mode 100644 modules/sale_payment/.isort.cfg create mode 100644 modules/sale_payment/doc/conf.py delete mode 100644 modules/sale_point/.drone.yml delete mode 100644 modules/sale_point/.flake8 delete mode 100644 modules/sale_point/.isort.cfg delete mode 100644 modules/sale_price_list/.drone.yml delete mode 100644 modules/sale_price_list/.flake8 delete mode 100644 modules/sale_price_list/.isort.cfg create mode 100644 modules/sale_price_list/doc/conf.py delete mode 100644 modules/sale_product_customer/.drone.yml delete mode 100644 modules/sale_product_customer/.flake8 delete mode 100644 modules/sale_product_customer/.isort.cfg create mode 100644 modules/sale_product_customer/doc/conf.py delete mode 100644 modules/sale_product_quantity/.drone.yml delete mode 100644 modules/sale_product_quantity/.flake8 delete mode 100644 modules/sale_product_quantity/.isort.cfg delete mode 100644 modules/sale_product_recommendation/.drone.yml delete mode 100644 modules/sale_product_recommendation/.flake8 delete mode 100644 modules/sale_product_recommendation/.isort.cfg delete mode 100644 modules/sale_product_recommendation_association_rule/.drone.yml delete mode 100644 modules/sale_product_recommendation_association_rule/.flake8 delete mode 100644 modules/sale_product_recommendation_association_rule/.isort.cfg delete mode 100644 modules/sale_promotion/.drone.yml delete mode 100644 modules/sale_promotion/.flake8 delete mode 100644 modules/sale_promotion/.isort.cfg create mode 100644 modules/sale_promotion/doc/conf.py delete mode 100644 modules/sale_promotion_coupon/.drone.yml delete mode 100644 modules/sale_promotion_coupon/.flake8 delete mode 100644 modules/sale_promotion_coupon/.isort.cfg create mode 100644 modules/sale_promotion_coupon/doc/conf.py delete mode 100644 modules/sale_promotion_coupon_payment/.drone.yml delete mode 100644 modules/sale_promotion_coupon_payment/.flake8 delete mode 100644 modules/sale_promotion_coupon_payment/.isort.cfg delete mode 100644 modules/sale_secondary_unit/.drone.yml delete mode 100644 modules/sale_secondary_unit/.flake8 delete mode 100644 modules/sale_secondary_unit/.isort.cfg create mode 100644 modules/sale_secondary_unit/doc/conf.py delete mode 100644 modules/sale_shipment_cost/.drone.yml delete mode 100644 modules/sale_shipment_cost/.flake8 delete mode 100644 modules/sale_shipment_cost/.isort.cfg create mode 100644 modules/sale_shipment_cost/doc/conf.py delete mode 100644 modules/sale_shipment_grouping/.drone.yml delete mode 100644 modules/sale_shipment_grouping/.flake8 delete mode 100644 modules/sale_shipment_grouping/.isort.cfg create mode 100644 modules/sale_shipment_grouping/doc/conf.py delete mode 100644 modules/sale_shipment_tolerance/.drone.yml delete mode 100644 modules/sale_shipment_tolerance/.flake8 delete mode 100644 modules/sale_shipment_tolerance/.isort.cfg create mode 100644 modules/sale_shipment_tolerance/doc/conf.py delete mode 100644 modules/sale_stock_quantity/.drone.yml delete mode 100644 modules/sale_stock_quantity/.flake8 delete mode 100644 modules/sale_stock_quantity/.isort.cfg create mode 100644 modules/sale_stock_quantity/doc/conf.py delete mode 100644 modules/sale_subscription/.drone.yml delete mode 100644 modules/sale_subscription/.flake8 delete mode 100644 modules/sale_subscription/.isort.cfg create mode 100644 modules/sale_subscription/doc/conf.py delete mode 100644 modules/sale_subscription_asset/.drone.yml delete mode 100644 modules/sale_subscription_asset/.flake8 delete mode 100644 modules/sale_subscription_asset/.isort.cfg create mode 100644 modules/sale_subscription_asset/doc/conf.py delete mode 100644 modules/sale_supply/.drone.yml delete mode 100644 modules/sale_supply/.flake8 delete mode 100644 modules/sale_supply/.isort.cfg create mode 100644 modules/sale_supply/doc/conf.py delete mode 100644 modules/sale_supply_drop_shipment/.drone.yml delete mode 100644 modules/sale_supply_drop_shipment/.flake8 delete mode 100644 modules/sale_supply_drop_shipment/.isort.cfg create mode 100644 modules/sale_supply_drop_shipment/doc/conf.py delete mode 100644 modules/sale_supply_production/.drone.yml delete mode 100644 modules/sale_supply_production/.flake8 delete mode 100644 modules/sale_supply_production/.isort.cfg create mode 100644 modules/sale_supply_production/doc/conf.py delete mode 100644 modules/stock/.drone.yml delete mode 100644 modules/stock/.flake8 delete mode 100644 modules/stock/.isort.cfg delete mode 100644 modules/stock_assign_manual/.drone.yml delete mode 100644 modules/stock_assign_manual/.flake8 delete mode 100644 modules/stock_assign_manual/.isort.cfg create mode 100644 modules/stock_assign_manual/doc/conf.py delete mode 100644 modules/stock_consignment/.drone.yml delete mode 100644 modules/stock_consignment/.flake8 delete mode 100644 modules/stock_consignment/.isort.cfg create mode 100644 modules/stock_consignment/doc/conf.py delete mode 100644 modules/stock_forecast/.drone.yml delete mode 100644 modules/stock_forecast/.flake8 delete mode 100644 modules/stock_forecast/.isort.cfg create mode 100644 modules/stock_forecast/doc/conf.py delete mode 100644 modules/stock_inventory_location/.drone.yml delete mode 100644 modules/stock_inventory_location/.flake8 delete mode 100644 modules/stock_inventory_location/.isort.cfg create mode 100644 modules/stock_inventory_location/doc/conf.py delete mode 100644 modules/stock_location_move/.drone.yml delete mode 100644 modules/stock_location_move/.flake8 delete mode 100644 modules/stock_location_move/.isort.cfg create mode 100644 modules/stock_location_move/doc/conf.py delete mode 100644 modules/stock_location_sequence/.drone.yml delete mode 100644 modules/stock_location_sequence/.flake8 delete mode 100644 modules/stock_location_sequence/.isort.cfg create mode 100644 modules/stock_location_sequence/doc/conf.py delete mode 100644 modules/stock_lot/.drone.yml delete mode 100644 modules/stock_lot/.flake8 delete mode 100644 modules/stock_lot/.isort.cfg create mode 100644 modules/stock_lot/doc/conf.py delete mode 100644 modules/stock_lot_sled/.drone.yml delete mode 100644 modules/stock_lot_sled/.flake8 delete mode 100644 modules/stock_lot_sled/.isort.cfg create mode 100644 modules/stock_lot_sled/doc/conf.py delete mode 100644 modules/stock_lot_unit/.drone.yml delete mode 100644 modules/stock_lot_unit/.flake8 delete mode 100644 modules/stock_lot_unit/.isort.cfg create mode 100644 modules/stock_lot_unit/doc/conf.py delete mode 100644 modules/stock_package/.drone.yml delete mode 100644 modules/stock_package/.flake8 delete mode 100644 modules/stock_package/.isort.cfg create mode 100644 modules/stock_package/doc/conf.py delete mode 100644 modules/stock_package_shipping/.drone.yml delete mode 100644 modules/stock_package_shipping/.flake8 delete mode 100644 modules/stock_package_shipping/.isort.cfg delete mode 100644 modules/stock_package_shipping_dpd/.drone.yml delete mode 100644 modules/stock_package_shipping_dpd/.flake8 delete mode 100644 modules/stock_package_shipping_dpd/.isort.cfg create mode 100644 modules/stock_package_shipping_dpd/doc/conf.py delete mode 100644 modules/stock_package_shipping_mygls/.drone.yml delete mode 100644 modules/stock_package_shipping_mygls/.flake8 delete mode 100644 modules/stock_package_shipping_mygls/.isort.cfg delete mode 100644 modules/stock_package_shipping_sendcloud/.drone.yml delete mode 100644 modules/stock_package_shipping_sendcloud/.flake8 delete mode 100644 modules/stock_package_shipping_sendcloud/.isort.cfg delete mode 100644 modules/stock_package_shipping_ups/.drone.yml delete mode 100644 modules/stock_package_shipping_ups/.flake8 delete mode 100644 modules/stock_package_shipping_ups/.isort.cfg create mode 100644 modules/stock_package_shipping_ups/doc/conf.py delete mode 100644 modules/stock_product_location/.drone.yml delete mode 100644 modules/stock_product_location/.flake8 delete mode 100644 modules/stock_product_location/.isort.cfg create mode 100644 modules/stock_product_location/doc/conf.py delete mode 100644 modules/stock_quantity_early_planning/.drone.yml delete mode 100644 modules/stock_quantity_early_planning/.flake8 delete mode 100644 modules/stock_quantity_early_planning/.isort.cfg delete mode 100644 modules/stock_quantity_issue/.drone.yml delete mode 100644 modules/stock_quantity_issue/.flake8 delete mode 100644 modules/stock_quantity_issue/.isort.cfg delete mode 100644 modules/stock_secondary_unit/.drone.yml delete mode 100644 modules/stock_secondary_unit/.flake8 delete mode 100644 modules/stock_secondary_unit/.isort.cfg create mode 100644 modules/stock_secondary_unit/doc/conf.py delete mode 100644 modules/stock_shipment_cost/.drone.yml delete mode 100644 modules/stock_shipment_cost/.flake8 delete mode 100644 modules/stock_shipment_cost/.isort.cfg create mode 100644 modules/stock_shipment_cost/doc/conf.py delete mode 100644 modules/stock_shipment_cost_weight/.drone.yml delete mode 100644 modules/stock_shipment_cost_weight/.flake8 delete mode 100644 modules/stock_shipment_cost_weight/.isort.cfg delete mode 100644 modules/stock_shipment_measurements/.drone.yml delete mode 100644 modules/stock_shipment_measurements/.flake8 delete mode 100644 modules/stock_shipment_measurements/.isort.cfg create mode 100644 modules/stock_shipment_measurements/doc/conf.py delete mode 100644 modules/stock_split/.drone.yml delete mode 100644 modules/stock_split/.flake8 delete mode 100644 modules/stock_split/.isort.cfg create mode 100644 modules/stock_split/doc/conf.py delete mode 100644 modules/stock_supply/.drone.yml delete mode 100644 modules/stock_supply/.flake8 delete mode 100644 modules/stock_supply/.isort.cfg create mode 100644 modules/stock_supply/doc/conf.py delete mode 100644 modules/stock_supply_day/.drone.yml delete mode 100644 modules/stock_supply_day/.flake8 delete mode 100644 modules/stock_supply_day/.isort.cfg create mode 100644 modules/stock_supply_day/doc/conf.py delete mode 100644 modules/stock_supply_forecast/.drone.yml delete mode 100644 modules/stock_supply_forecast/.flake8 delete mode 100644 modules/stock_supply_forecast/.isort.cfg create mode 100644 modules/stock_supply_forecast/doc/conf.py delete mode 100644 modules/stock_supply_production/.drone.yml delete mode 100644 modules/stock_supply_production/.flake8 delete mode 100644 modules/stock_supply_production/.isort.cfg create mode 100644 modules/stock_supply_production/doc/conf.py delete mode 100644 modules/timesheet/.drone.yml delete mode 100644 modules/timesheet/.flake8 delete mode 100644 modules/timesheet/.isort.cfg create mode 100644 modules/timesheet/doc/conf.py delete mode 100644 modules/timesheet_cost/.drone.yml delete mode 100644 modules/timesheet_cost/.flake8 delete mode 100644 modules/timesheet_cost/.isort.cfg create mode 100644 modules/timesheet_cost/doc/conf.py delete mode 100644 modules/user_role/.drone.yml delete mode 100644 modules/user_role/.flake8 delete mode 100644 modules/user_role/.isort.cfg create mode 100644 modules/user_role/doc/conf.py delete mode 100644 modules/web_shop/.drone.yml delete mode 100644 modules/web_shop/.flake8 delete mode 100644 modules/web_shop/.isort.cfg create mode 100644 modules/web_shop/doc/conf.py delete mode 100644 modules/web_shop_shopify/.drone.yml delete mode 100644 modules/web_shop_shopify/.flake8 delete mode 100644 modules/web_shop_shopify/.isort.cfg delete mode 100644 modules/web_shop_vue_storefront/.drone.yml delete mode 100644 modules/web_shop_vue_storefront/.flake8 delete mode 100644 modules/web_shop_vue_storefront/.isort.cfg create mode 100644 modules/web_shop_vue_storefront/doc/conf.py delete mode 100644 modules/web_shop_vue_storefront_stripe/.drone.yml delete mode 100644 modules/web_shop_vue_storefront_stripe/.flake8 delete mode 100644 modules/web_shop_vue_storefront_stripe/.isort.cfg create mode 100644 modules/web_shop_vue_storefront_stripe/doc/conf.py delete mode 100644 modules/web_shortener/.drone.yml delete mode 100644 modules/web_shortener/.flake8 delete mode 100644 modules/web_shortener/.isort.cfg create mode 100644 modules/web_shortener/doc/conf.py delete mode 100644 modules/web_user/.drone.yml delete mode 100644 modules/web_user/.flake8 delete mode 100644 modules/web_user/.isort.cfg create mode 100644 modules/web_user/doc/conf.py delete mode 100644 proteus/.drone.yml delete mode 100644 proteus/.flake8 delete mode 100644 proteus/.isort.cfg create mode 100644 readthedocs/conf.py delete mode 100644 sao/.drone.yml delete mode 100644 tryton/.drone.yml delete mode 100644 tryton/.flake8 delete mode 100644 tryton/.isort.cfg delete mode 100644 trytond-gis/.drone.yml delete mode 100644 trytond-gis/.flake8 delete mode 100644 trytond-gis/.isort.cfg delete mode 100644 trytond/.drone.yml delete mode 100644 trytond/.flake8 delete mode 100644 trytond/.isort.cfg diff --git a/modules/account/.flake8 b/.flake8 similarity index 100% rename from modules/account/.flake8 rename to .flake8 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..0a7a524775 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,30 @@ +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == "trigger" + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS + when: never + - if: $CI_COMMIT_BRANCH =~ /^branch\/.*/ + +stages: + - preparation + - execution + +prepare-job: + stage: preparation + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci + script: + - python .gitlab-scripts/generate-ci.py gitlab-generated-ci.yml + artifacts: + paths: + - gitlab-generated-ci.yml + +trigger-job: + stage: execution + trigger: + forward: + pipeline_variables: true + strategy: depend + include: + - artifact: gitlab-generated-ci.yml + job: prepare-job diff --git a/sao/.bower_allow_root.sh b/.gitlab-scripts/bower_allow_root.sh similarity index 100% rename from sao/.bower_allow_root.sh rename to .gitlab-scripts/bower_allow_root.sh diff --git a/.gitlab-scripts/generate-ci.py b/.gitlab-scripts/generate-ci.py new file mode 100755 index 0000000000..2517adf285 --- /dev/null +++ b/.gitlab-scripts/generate-ci.py @@ -0,0 +1,169 @@ +#!/bin/env python +import glob +import os +import subprocess +import sys +from itertools import chain +from string import Template + +BASE_DIR = os.path.dirname(__file__) +TEMPLATE_DOC = Template(""" +check-doc-${name}: + extends: .check-doc + variables: + PACKAGE: ${package} + +trigger-doc-build-${name}: + extends: .trigger-doc-build + variables: + PACKAGE: ${package} + +""") + +TEMPLATE = Template(""" +test-${name}: + extends: .test-tox + variables: + PACKAGE: ${package} + ${stage} + ${when} + +""") + +TEMPLATE_IMAGE = Template(""" +test-${name}: + extends: .test-tox + image: $${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/${package}-test:$${PYTHON_VERSION} + variables: + PACKAGE: ${package} + ${stage} + ${when} + +""") # noqa: E501 + +TEMPLATE_DB = Template(""" +test-${name}-sqlite: + extends: .test-sqlite + variables: + PACKAGE: ${package} + ${stage} + ${when} + +test-${name}-postgresql: + extends: .test-postgresql + variables: + PACKAGE: ${package} + ${stage} + ${when} + +""") + +TEMPLATE_GIS = Template(""" +test-${name}-postgis: + extends: .test-postgis + variables: + PACKAGE: ${package} + ${stage} + ${when} + +""") + +TEMPLATE_NPM_IMAGE = Template(""" +test-${name}: + extends: .test-npm + image: $${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/${package}-test + variables: + PACKAGE: ${package} + ${stage} + ${when} + +""") + +STAGE_MANUAL = "stage: manual" +WHEN_MANUAL = """ + allow_failure: true + rules: + - when: manual +""" +NO_DB = {'proteus'} +CUSTOM_IMAGE = {'tryton'} +CUSTOM_NPM_IMAGE = {'sao'} +GIS = {'trytond-gis'} + + +def main(filename): + if filename == '-': + render(sys.stdout) + else: + with open(filename, 'w') as file: + render(file) + + +def render(file): + file.write(open(os.path.join(BASE_DIR, 'gitlab-ci.yml'), 'r').read()) + packages = list(all_packages()) + modified = set(modified_packages(packages)) + for package in packages: + mapping = { + 'name': package.replace('/', '-'), + 'package': package, + 'stage': STAGE_MANUAL if package not in modified else '', + 'when': WHEN_MANUAL if package not in modified else '', + } + if os.path.exists(os.path.join(package, 'doc')): + file.write(TEMPLATE_DOC.substitute(mapping)) + if package in NO_DB: + file.write(TEMPLATE.substitute(mapping)) + elif package in CUSTOM_IMAGE: + file.write(TEMPLATE_IMAGE.substitute(mapping)) + elif package in CUSTOM_NPM_IMAGE: + file.write(TEMPLATE_NPM_IMAGE.substitute(mapping)) + elif package in GIS: + file.write(TEMPLATE_GIS.substitute(mapping)) + else: + file.write(TEMPLATE_DB.substitute(mapping)) + + +def all_packages(): + root_dir = os.path.dirname(BASE_DIR) + for filename in chain( + glob.glob('**/setup.py', recursive=True, root_dir=root_dir), + glob.glob('**/package.json', recursive=True, root_dir=root_dir)): + yield os.path.dirname(filename) + + +def modified_packages(packages): + env = os.environ.copy() + env['HGPLAIN'] = '1' + if env.get('CI_COMMIT_TAG'): + tagged = env['CI_COMMIT_TAG'].split('-')[0] + for package in packages: + if tagged in package: + yield package + else: + if not subprocess.run( + ['hg', 'topic', '--current'], + env=env, stdout=subprocess.DEVNULL).returncode: + cmd = ['hg', 'status', '--rev', 's0', '--no-status'] + else: + cmd = ['hg', 'status', '--change', '.', '--no-status'] + proc = subprocess.run(cmd, env=env, stdout=subprocess.PIPE, text=True) + proc.check_returncode() + modified_files = proc.stdout.splitlines() + + modified = set() + for filename in modified_files: + parts = filename.split(os.sep) + modified.add(parts[0]) + modified.add(os.sep.join(parts[:2])) + for package in packages: + if package in modified: + yield package + + +if __name__ == '__main__': + try: + filename = sys.argv[1] + except IndexError: + filename = '-' + main(filename) diff --git a/.gitlab-scripts/generate-doc.sh b/.gitlab-scripts/generate-doc.sh new file mode 100755 index 0000000000..a9a2062d20 --- /dev/null +++ b/.gitlab-scripts/generate-doc.sh @@ -0,0 +1,24 @@ +#!/bin/sh +set -eu + +OUTPUTDIR=`realpath "${1}"` +mkdir -p "${OUTPUTDIR}" + +find . -path '*/doc/conf.py' | while read path; do + path=`dirname "${path}"` + path=`dirname "${path}"` + package=`basename "${path}"` + package=$(echo ${package} | sed "s/_/-/g") + if [ "${package}" = "trytond" ]; then + package="server" + elif [ "${package}" = "tryton" ]; then + package="client-desktop" + elif [ "${package}" = "proteus" ]; then + package="client-library" + elif [ "${package}" = "trytond-gis" ]; then + package="backend-gis" + else + package="modules-${package}" + fi + (cd "${path}" && python -m sphinx -T -E -b html doc "${OUTPUTDIR}/${package}") +done diff --git a/.gitlab-scripts/generate-packages.sh b/.gitlab-scripts/generate-packages.sh new file mode 100755 index 0000000000..2bda53316b --- /dev/null +++ b/.gitlab-scripts/generate-packages.sh @@ -0,0 +1,9 @@ +#!/bin/sh +set -eu + +PACKAGES=`realpath "${1}"` +mkdir -p "${PACKAGES}" + +find . -name setup.py | while read path; do + (cd "`dirname ${path}`" && python setup.py sdist && cp dist/* "${PACKAGES}") +done diff --git a/.gitlab-scripts/gitlab-ci.yml b/.gitlab-scripts/gitlab-ci.yml new file mode 100644 index 0000000000..8ed044cd87 --- /dev/null +++ b/.gitlab-scripts/gitlab-ci.yml @@ -0,0 +1,174 @@ +stages: + - preparation + - check + - test + - build + - manual + +packages: + stage: preparation + rules: + - when: always + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci + variables: + DOC_BASE_URL: ${CI_PROJECT_DIR}/docs + script: + - .gitlab-scripts/generate-packages.sh packages + artifacts: + paths: + - packages/ + expire_in: 1 week + +documentation: + stage: preparation + rules: + - when: always + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/sphinxdoc/sphinx + script: + - .gitlab-scripts/generate-doc.sh docs + artifacts: + paths: + - docs/ + expire_in: 1 week + +.check: + stage: check + rules: + - if: $CI_MERGE_REQUEST_ID != null + when: always + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci + +.check-doc: + extends: .check + needs: + - documentation + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/sphinxdoc/sphinx + variables: + DOC_BASE_URL: ${CI_PROJECT_DIR}/docs + DOC_DIR: doc + script: + - cd "${PACKAGE}" + - python -m sphinx -T -E -W -n -b html ${DOC_DIR} _build/html + - python -m sphinx -T -E -W -n -b linkcheck ${DOC_DIR} _build + rules: + - changes: + - ${PACKAGE}/${DOC_DIR}/**/* + - ${PACKAGE}/tryton.cfg + - ${PACKAGE}/CHANGELOG + +check-doc-readthedocs: + extends: .check-doc + variables: + PACKAGE: readthedocs + DOC_DIR: . + rules: + - changes: + - ${PACKAGE}/**/* + +check-flake8: + extends: .check + script: + - hg diff --rev s0 | flake8 --diff + +check-isort: + extends: .check + script: + - isort -m VERTICAL_GRID -p trytond -c `hg status --no-status --added --modified --rev s0` + +check-dist: + stage: check + needs: + - packages + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci + script: + - twine check packages/* + +.test: + stage: test + rules: + - when: always + +.test-tox: + extends: .test + needs: + - packages + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:${PYTHON_VERSION} + variables: + CFLAGS: -O0 + PIP_FIND_LINKS: file://${CI_PROJECT_DIR}/packages/ + before_script: + - pip install tox + script: + - tox -e "py${PYTHON_VERSION/./}" -c "${PACKAGE}" + parallel: + matrix: + - PYTHON_VERSION: ["3.7", "3.8", "3.9", "3.10"] + +.test-db: + extends: .test-tox + variables: + DB_CACHE: /tmp/cache + script: + - tox -e "py${PYTHON_VERSION/./}-${DATABASE}" -c "${PACKAGE}" + +.test-sqlite: + extends: .test-db + variables: + DATABASE: sqlite + +.test-postgresql: + extends: .test-db + variables: + DATABASE: postgresql + POSTGRESQL_URI: postgresql://postgres@postgresql:5432/ + POSTGRES_HOST_AUTH_METHOD: trust + services: + - name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/postgres + alias: postgresql + command: ["-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + +.test-postgis: + extends: .test-db + variables: + DATABASE: postgis + POSTGIS_URI: postgis://postgres@postgis:5432/ + POSTGRES_HOST_AUTH_METHOD: trust + script: + - tox -e "py${PYTHON_VERSION/./}" -c "${PACKAGE}" + services: + - name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/postgis/postgis + alias: postgis + command: ["-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + +.test-npm: + extends: .test + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/node + before_script: + - sh .gitlab-scripts/bower_allow_root.sh + script: + - cd "${PACKAGE}" + - npm -s install --unsafe-perm --legacy-peer-deps + - npm test + +.trigger-doc-build: + stage: build + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci + script: + - .gitlab-scripts/trigger-readthedocs.py -c "${RTD_CONFIG}" -p "${PACKAGE}" -b "${CI_COMMIT_BRANCH#branch/}" + rules: + - if: $CI_COMMIT_BRANCH =~ /^branch\/.*/ + changes: + - ${PACKAGE}/doc/**/* + - ${PACKAGE}/tryton.cfg + - ${PACKAGE}/CHANGELOG + allow_failure: true + +trigger-doc-build-readthedocs: + extends: .trigger-doc-build + variables: + PACKAGE: readthedocs + rules: + - if: $CI_COMMIT_BRANCH =~ /^branch\/.*/ + changes: + - ${PACKAGE}/**/* + allow_failure: true diff --git a/.gitlab-scripts/trigger-readthedocs.py b/.gitlab-scripts/trigger-readthedocs.py new file mode 100755 index 0000000000..b6c66ffcb4 --- /dev/null +++ b/.gitlab-scripts/trigger-readthedocs.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python +# +# Requires $RTD_CONFIG to point to a file providing the webhook data for each +# package. The file is in Python cfg file format. +# Each section defines on package. Example:: +# +# [modules/party] +# url: https://readthedocs.org/api/v2/webhook/modules-party/12345/ +# token: 93afe1ce2d1107597f69774009964990c0643dad + +import configparser +import sys +from argparse import ArgumentParser +from urllib import request +from urllib.parse import urlencode + +parser = ArgumentParser() +parser.add_argument('--config', '-c', required=True) +parser.add_argument('--package', '-p', required=True) +parser.add_argument('--branches', '-b', nargs='*') +args = parser.parse_args() + +cfg = configparser.ConfigParser() +cfg.read(args.config) + +url = cfg.get(args.package, 'url') +token = cfg.get(args.package, 'token') +if not url: + sys.exit(f"Missing url for {args.package!r}") +elif not token: + sys.exit(f"Missing token for {args.package!r}") + +data = [ + ('token', token), + *(('branches', branch) for branch in args.branches), + ] + +req = request.Request( + url, + data=urlencode(data).encode(), + headers={ + 'User-Agent': 'python-urllib/%s' % request.__version__, + }) +with request.urlopen(req) as resp: + print(resp.read()) diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000000..0f6ca8b98e --- /dev/null +++ b/.hgignore @@ -0,0 +1,12 @@ +syntax: glob +*.py[cdo] +*.egg-info +dist/ +build/ +node_modules/ +bower_components/ +.tox/ +requirements.txt +requirements-dev.txt +.hgignore-modules +include:.hgignore-modules diff --git a/.hooks/link_modules b/.hooks/link_modules new file mode 100755 index 0000000000..2f3f806202 --- /dev/null +++ b/.hooks/link_modules @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import glob +import io +import os + +root = os.path.dirname(os.path.dirname(__file__)) +source = os.path.join(root, 'modules') +destination = os.path.join(root, 'trytond', 'trytond', 'modules') + +modules = set() +for filename in glob.glob('modules/*/setup.py', root_dir=root): + modules.add(os.path.basename(os.path.dirname(filename))) + +for module in modules: + path = os.path.join(destination, module) + if not os.path.exists(path): + os.symlink( + os.path.relpath(os.path.join(source, module), destination), path) + +for module in os.listdir(destination): + path = os.path.join(destination, module) + if os.path.islink(path) and module not in modules: + os.unlink(path) + +with io.open(os.path.join(root, '.hgignore-modules'), 'w') as fp: + for module in modules: + fp.write(os.path.join('trytond', 'modules', module) + '\n') diff --git a/.hooks/update_requirements b/.hooks/update_requirements new file mode 100755 index 0000000000..b197414e77 --- /dev/null +++ b/.hooks/update_requirements @@ -0,0 +1,79 @@ +#!/usr/bin/env python +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import io +import os +import subprocess +from multiprocessing.dummy import Pool + +root = os.path.dirname(os.path.dirname(__file__)) +module_path = os.path.join(root, 'modules') + +dependencies = set() +development_dependencies = set() + +FNULL = open(os.devnull, 'w') + + +def add_dependencies(package, path): + egg_info_name = '%s.egg-info' % package + egg_info = os.path.join(path, egg_info_name) + if (not os.path.isdir(egg_info) + or (os.path.getmtime(os.path.join(path, 'setup.py')) + > os.path.getmtime(os.path.join(egg_info, 'requires.txt'))) + or (os.path.exists(os.path.join(path, 'tryton.cfg')) + and os.path.getmtime(os.path.join(path, 'tryton.cfg')) + > os.path.getmtime(os.path.join(egg_info, 'requires.txt')))): + subprocess.call( + ['./setup.py', 'egg_info'], + cwd=path, + stdout=FNULL, + stderr=FNULL) + with io.open(os.path.join(egg_info, 'requires.txt')) as f: + development = False + for dependency in f.readlines(): + dependency = dependency.strip('\n') + # Do not include trytond requirements as we have its source code + if (not dependency + or dependency.startswith('trytond') + or dependency.startswith('proteus')): + continue + # Always include optional dependencies as development + if dependency[0].startswith('['): + development = True + continue + # Remove version numbers + for char in ['>', '<', '=']: + dependency = dependency.split(char)[0] + if development: + development_dependencies.add(dependency) + else: + dependencies.add(dependency) + + +pool = Pool() +pool.apply_async(add_dependencies, + ('trytond', os.path.join(root, 'trytond'))) +pool.apply_async(add_dependencies, + ('tryton', os.path.join(root, 'tryton'))) +pool.apply_async(add_dependencies, + ('proteus', os.path.join(root, 'proteus'))) +pool.apply_async(add_dependencies, + ('trytond_gis', os.path.join(root, 'trytond-gis'))) + +for module in os.listdir(module_path): + path = os.path.join(module_path, module) + if not os.path.isdir(path): + continue + pool.apply_async( + add_dependencies, ('trytond_%s' % module, path)) + +pool.close() +pool.join() + +with io.open(os.path.join(root, 'requirements.txt'), 'w') as fp: + fp.writelines(map(lambda d: d + '\n', sorted(dependencies))) + +with io.open(os.path.join(root, 'requirements-dev.txt'), 'w') as fp: + fp.writelines(map(lambda d: d + '\n', sorted(development_dependencies))) diff --git a/modules/account/.isort.cfg b/.isort.cfg similarity index 100% rename from modules/account/.isort.cfg rename to .isort.cfg diff --git a/README.rst b/README.rst new file mode 100644 index 0000000000..42b17c5ff8 --- /dev/null +++ b/README.rst @@ -0,0 +1,23 @@ +This repository contains all the packages of Tryton. + +To have symlinks for modules created automatically on Mercurial update, add +the following line to the hooks section of your .hg/hgrc: + + update.modules = .hooks/link_modules + +To automatically generate requirements files on Mercurial update, add +the following line to the hooks section of your .hg/hgrc: + + update.requirements = .hooks/update_requirements + +.. warning:: + + The process of updating requirements files may take some time + +Then you can install the required dependencies with: + + pip install -r requirements.txt + +And you can also install the development dependencies with: + + pip install -r requirements-dev.txt diff --git a/modules/account/.drone.yml b/modules/account/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account/doc/conf.py b/modules/account/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account/doc/conf.py +++ b/modules/account/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account/setup.py b/modules/account/setup.py index 25e4017e43..6f19f062c9 100755 --- a/modules/account/setup.py +++ b/modules/account/setup.py @@ -43,23 +43,6 @@ name = 'trytond_account' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-dateutil', 'python-sql >= 0.7', 'simpleeval'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account/tox.ini b/modules/account/tox.ini index ecd3339b85..f1ef2a7e19 100644 --- a/modules/account/tox.ini +++ b/modules/account/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_asset/.drone.yml b/modules/account_asset/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_asset/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_asset/.flake8 b/modules/account_asset/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_asset/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_asset/.isort.cfg b/modules/account_asset/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_asset/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_asset/doc/conf.py b/modules/account_asset/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_asset/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_asset/setup.py b/modules/account_asset/setup.py index f4f31c41f7..d311db32d0 100755 --- a/modules/account_asset/setup.py +++ b/modules/account_asset/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_asset' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-dateutil', 'python-sql'] for dep in info.get('depends', []): @@ -66,12 +49,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), get_require_version('trytond_purchase')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, @@ -144,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_asset/tox.ini b/modules/account_asset/tox.ini index 5453d9e65c..7ba84788c5 100644 --- a/modules/account_asset/tox.ini +++ b/modules/account_asset/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_be/.drone.yml b/modules/account_be/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_be/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_be/.flake8 b/modules/account_be/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_be/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_be/.isort.cfg b/modules/account_be/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_be/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_be/doc/conf.py b/modules/account_be/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_be/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_be/setup.py b/modules/account_be/setup.py index 0912bdcaf6..ac75c87f61 100755 --- a/modules/account_be/setup.py +++ b/modules/account_be/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_be' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module with Belgian chart of accounts', @@ -118,7 +95,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_be/tox.ini b/modules/account_be/tox.ini index fef137e878..169c48a364 100644 --- a/modules/account_be/tox.ini +++ b/modules/account_be/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_budget/.drone.yml b/modules/account_budget/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_budget/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_budget/.flake8 b/modules/account_budget/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_budget/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_budget/.isort.cfg b/modules/account_budget/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_budget/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_budget/doc/conf.py b/modules/account_budget/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_budget/doc/conf.py +++ b/modules/account_budget/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_budget/setup.py b/modules/account_budget/setup.py index 7554a477e7..a6cfe3917d 100755 --- a/modules/account_budget/setup.py +++ b/modules/account_budget/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_budget' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -148,7 +125,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_budget/tox.ini b/modules/account_budget/tox.ini index 6ddd3d51b4..38274a14cf 100644 --- a/modules/account_budget/tox.ini +++ b/modules/account_budget/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_cash_rounding/.drone.yml b/modules/account_cash_rounding/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_cash_rounding/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_cash_rounding/.flake8 b/modules/account_cash_rounding/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_cash_rounding/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_cash_rounding/.isort.cfg b/modules/account_cash_rounding/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_cash_rounding/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_cash_rounding/doc/conf.py b/modules/account_cash_rounding/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_cash_rounding/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_cash_rounding/setup.py b/modules/account_cash_rounding/setup.py index 2530621515..510bd1bbb5 100755 --- a/modules/account_cash_rounding/setup.py +++ b/modules/account_cash_rounding/setup.py @@ -43,23 +43,6 @@ name = 'trytond_account_cash_rounding' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -70,11 +53,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] for extra in info.get('extras_depend', []): tests_require.append(get_require_version('trytond_%s' % extra)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -148,7 +126,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_cash_rounding/tox.ini b/modules/account_cash_rounding/tox.ini index 0b8b4296d1..d587ff72ab 100644 --- a/modules/account_cash_rounding/tox.ini +++ b/modules/account_cash_rounding/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_consolidation/.drone.yml b/modules/account_consolidation/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_consolidation/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_consolidation/.flake8 b/modules/account_consolidation/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_consolidation/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_consolidation/.isort.cfg b/modules/account_consolidation/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_consolidation/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_consolidation/doc/conf.py b/modules/account_consolidation/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_consolidation/doc/conf.py +++ b/modules/account_consolidation/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_consolidation/setup.py b/modules/account_consolidation/setup.py index 2934091887..6d400b48a0 100755 --- a/modules/account_consolidation/setup.py +++ b/modules/account_consolidation/setup.py @@ -43,23 +43,6 @@ name = 'trytond_account_consolidation' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -71,12 +54,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_account_invoice'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -151,7 +128,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_consolidation/tox.ini b/modules/account_consolidation/tox.ini index 0c2ce53814..340fbc3e8c 100644 --- a/modules/account_consolidation/tox.ini +++ b/modules/account_consolidation/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_credit_limit/.drone.yml b/modules/account_credit_limit/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_credit_limit/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_credit_limit/.flake8 b/modules/account_credit_limit/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_credit_limit/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_credit_limit/.isort.cfg b/modules/account_credit_limit/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_credit_limit/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_credit_limit/doc/conf.py b/modules/account_credit_limit/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_credit_limit/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_credit_limit/setup.py b/modules/account_credit_limit/setup.py index 2b68c8d56a..16a008e5d9 100755 --- a/modules/account_credit_limit/setup.py +++ b/modules/account_credit_limit/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_credit_limit' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('trytond_account_dunning')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_credit_limit/tox.ini b/modules/account_credit_limit/tox.ini index d5c80d22d2..30e9be2952 100644 --- a/modules/account_credit_limit/tox.ini +++ b/modules/account_credit_limit/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_de_skr03/.drone.yml b/modules/account_de_skr03/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_de_skr03/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_de_skr03/.flake8 b/modules/account_de_skr03/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_de_skr03/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_de_skr03/.isort.cfg b/modules/account_de_skr03/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_de_skr03/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_de_skr03/doc/conf.py b/modules/account_de_skr03/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_de_skr03/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_de_skr03/setup.py b/modules/account_de_skr03/setup.py index 80d59c1cc4..010ac57ea0 100755 --- a/modules/account_de_skr03/setup.py +++ b/modules/account_de_skr03/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_de_skr03' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module with German chart of accounts SKR03', @@ -118,7 +95,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_de_skr03/tox.ini b/modules/account_de_skr03/tox.ini index 5554670102..06cd71606e 100644 --- a/modules/account_de_skr03/tox.ini +++ b/modules/account_de_skr03/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_deposit/.drone.yml b/modules/account_deposit/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_deposit/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_deposit/.flake8 b/modules/account_deposit/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_deposit/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_deposit/.isort.cfg b/modules/account_deposit/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_deposit/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_deposit/doc/conf.py b/modules/account_deposit/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_deposit/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_deposit/setup.py b/modules/account_deposit/setup.py index 43e26c4256..3eba7a517e 100755 --- a/modules/account_deposit/setup.py +++ b/modules/account_deposit/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_deposit' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-dateutil', 'python-sql >= 0.4'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_deposit/tox.ini b/modules/account_deposit/tox.ini index 684130035e..256fbdae15 100644 --- a/modules/account_deposit/tox.ini +++ b/modules/account_deposit/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_dunning/.drone.yml b/modules/account_dunning/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_dunning/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_dunning/.flake8 b/modules/account_dunning/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_dunning/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_dunning/.isort.cfg b/modules/account_dunning/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_dunning/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_dunning/doc/conf.py b/modules/account_dunning/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_dunning/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_dunning/setup.py b/modules/account_dunning/setup.py index 96cc11d555..23bbbc6427 100755 --- a/modules/account_dunning/setup.py +++ b/modules/account_dunning/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_dunning' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_dunning/tox.ini b/modules/account_dunning/tox.ini index 32c58d9bb5..43899aa636 100644 --- a/modules/account_dunning/tox.ini +++ b/modules/account_dunning/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_dunning_email/.drone.yml b/modules/account_dunning_email/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_dunning_email/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_dunning_email/.flake8 b/modules/account_dunning_email/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_dunning_email/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_dunning_email/.isort.cfg b/modules/account_dunning_email/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_dunning_email/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_dunning_email/doc/conf.py b/modules/account_dunning_email/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_dunning_email/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_dunning_email/setup.py b/modules/account_dunning_email/setup.py index b0bba34730..d901439c07 100755 --- a/modules/account_dunning_email/setup.py +++ b/modules/account_dunning_email/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_dunning_email' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +118,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_dunning_email/tox.ini b/modules/account_dunning_email/tox.ini index f12fc49cbb..398034b826 100644 --- a/modules/account_dunning_email/tox.ini +++ b/modules/account_dunning_email/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_dunning_fee/.drone.yml b/modules/account_dunning_fee/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_dunning_fee/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_dunning_fee/.flake8 b/modules/account_dunning_fee/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_dunning_fee/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_dunning_fee/.isort.cfg b/modules/account_dunning_fee/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_dunning_fee/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_dunning_fee/doc/conf.py b/modules/account_dunning_fee/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_dunning_fee/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_dunning_fee/setup.py b/modules/account_dunning_fee/setup.py index ce8e344e54..3cfeb53bfb 100755 --- a/modules/account_dunning_fee/setup.py +++ b/modules/account_dunning_fee/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_dunning_fee' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -66,11 +49,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), get_require_version('trytond_account_dunning_letter')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_dunning_fee/tox.ini b/modules/account_dunning_fee/tox.ini index bc78c660c6..99e61fb6cb 100644 --- a/modules/account_dunning_fee/tox.ini +++ b/modules/account_dunning_fee/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_dunning_letter/.drone.yml b/modules/account_dunning_letter/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_dunning_letter/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_dunning_letter/.flake8 b/modules/account_dunning_letter/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_dunning_letter/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_dunning_letter/.isort.cfg b/modules/account_dunning_letter/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_dunning_letter/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_dunning_letter/doc/conf.py b/modules/account_dunning_letter/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_dunning_letter/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_dunning_letter/setup.py b/modules/account_dunning_letter/setup.py index fdfd2445ee..b5200efa64 100755 --- a/modules/account_dunning_letter/setup.py +++ b/modules/account_dunning_letter/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_dunning_letter' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_dunning_letter/tox.ini b/modules/account_dunning_letter/tox.ini index 95825fa893..f6c7f0ddad 100644 --- a/modules/account_dunning_letter/tox.ini +++ b/modules/account_dunning_letter/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_es/.drone.yml b/modules/account_es/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_es/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_es/.flake8 b/modules/account_es/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_es/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_es/.isort.cfg b/modules/account_es/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_es/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_es/doc/conf.py b/modules/account_es/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_es/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_es/setup.py b/modules/account_es/setup.py index cdd66463e1..3355cc59d3 100755 --- a/modules/account_es/setup.py +++ b/modules/account_es/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_es' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 1.1.0', 'phonenumbers'] for dep in info.get('depends', []): @@ -70,11 +53,6 @@ tests_require = [ get_require_version('trytond_account_payment_sepa'), get_require_version('trytond_sale_advance_payment'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -127,7 +105,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_es/tox.ini b/modules/account_es/tox.ini index e486e590a9..6be2bb699b 100644 --- a/modules/account_es/tox.ini +++ b/modules/account_es/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_es_sii/.drone.yml b/modules/account_es_sii/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_es_sii/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_es_sii/.flake8 b/modules/account_es_sii/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_es_sii/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_es_sii/.isort.cfg b/modules/account_es_sii/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_es_sii/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_es_sii/doc/conf.py b/modules/account_es_sii/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_es_sii/doc/conf.py +++ b/modules/account_es_sii/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_es_sii/setup.py b/modules/account_es_sii/setup.py index 8a5f04d2e8..596e41f93f 100755 --- a/modules/account_es_sii/setup.py +++ b/modules/account_es_sii/setup.py @@ -43,23 +43,6 @@ name = 'trytond_account_es_sii' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['zeep', 'requests'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -147,7 +125,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_es_sii/tox.ini b/modules/account_es_sii/tox.ini index c3ef19df9d..0930d15b66 100644 --- a/modules/account_es_sii/tox.ini +++ b/modules/account_es_sii/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_eu/.drone.yml b/modules/account_eu/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_eu/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_eu/.flake8 b/modules/account_eu/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_eu/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_eu/.isort.cfg b/modules/account_eu/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_eu/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_eu/doc/conf.py b/modules/account_eu/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_eu/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_eu/setup.py b/modules/account_eu/setup.py index b7e1ddb791..ae739be0aa 100755 --- a/modules/account_eu/setup.py +++ b/modules/account_eu/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_eu' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -139,7 +117,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_eu/tox.ini b/modules/account_eu/tox.ini index 4897ccd32f..6cc7dfc2e9 100644 --- a/modules/account_eu/tox.ini +++ b/modules/account_eu/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_fr/.drone.yml b/modules/account_fr/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_fr/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_fr/.flake8 b/modules/account_fr/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_fr/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_fr/.isort.cfg b/modules/account_fr/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_fr/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_fr/doc/conf.py b/modules/account_fr/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_fr/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_fr/setup.py b/modules/account_fr/setup.py index f8dbb6665c..74aa05428e 100755 --- a/modules/account_fr/setup.py +++ b/modules/account_fr/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_fr' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), 'python-dateutil'] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_fr/tox.ini b/modules/account_fr/tox.ini index ca5e6a48bd..d3886921a4 100644 --- a/modules/account_fr/tox.ini +++ b/modules/account_fr/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_fr_chorus/.drone.yml b/modules/account_fr_chorus/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_fr_chorus/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_fr_chorus/.flake8 b/modules/account_fr_chorus/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_fr_chorus/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_fr_chorus/.isort.cfg b/modules/account_fr_chorus/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_fr_chorus/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_fr_chorus/doc/conf.py b/modules/account_fr_chorus/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_fr_chorus/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_fr_chorus/setup.py b/modules/account_fr_chorus/setup.py index 18474f75f0..9b8a912a22 100755 --- a/modules/account_fr_chorus/setup.py +++ b/modules/account_fr_chorus/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_fr_chorus' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['requests'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('trytond_edocument_uncefact')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_fr_chorus/tox.ini b/modules/account_fr_chorus/tox.ini index da1355d135..2b852f6ec6 100644 --- a/modules/account_fr_chorus/tox.ini +++ b/modules/account_fr_chorus/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_invoice/.drone.yml b/modules/account_invoice/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_invoice/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_invoice/.flake8 b/modules/account_invoice/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_invoice/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_invoice/.isort.cfg b/modules/account_invoice/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_invoice/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_invoice/doc/conf.py b/modules/account_invoice/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_invoice/doc/conf.py +++ b/modules/account_invoice/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_invoice/setup.py b/modules/account_invoice/setup.py index 991175ab44..c3bfe3f386 100755 --- a/modules/account_invoice/setup.py +++ b/modules/account_invoice/setup.py @@ -43,23 +43,6 @@ name = 'trytond_account_invoice' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-dateutil', 'python-sql >= 0.4'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_invoice/tox.ini b/modules/account_invoice/tox.ini index 344ecb444f..50389307d1 100644 --- a/modules/account_invoice/tox.ini +++ b/modules/account_invoice/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_invoice_correction/.drone.yml b/modules/account_invoice_correction/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_invoice_correction/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_invoice_correction/.flake8 b/modules/account_invoice_correction/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_invoice_correction/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_invoice_correction/.isort.cfg b/modules/account_invoice_correction/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_invoice_correction/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_invoice_correction/doc/conf.py b/modules/account_invoice_correction/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_invoice_correction/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_invoice_correction/setup.py b/modules/account_invoice_correction/setup.py index 93e97aa4ed..6cb25faa61 100755 --- a/modules/account_invoice_correction/setup.py +++ b/modules/account_invoice_correction/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_invoice_correction' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_invoice_correction/tox.ini b/modules/account_invoice_correction/tox.ini index e79a82ee5f..256b09cea1 100644 --- a/modules/account_invoice_correction/tox.ini +++ b/modules/account_invoice_correction/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_invoice_defer/.drone.yml b/modules/account_invoice_defer/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_invoice_defer/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_invoice_defer/.flake8 b/modules/account_invoice_defer/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_invoice_defer/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_invoice_defer/.isort.cfg b/modules/account_invoice_defer/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_invoice_defer/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_invoice_defer/doc/conf.py b/modules/account_invoice_defer/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_invoice_defer/doc/conf.py +++ b/modules/account_invoice_defer/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_invoice_defer/setup.py b/modules/account_invoice_defer/setup.py index 4b6f877739..ad57012687 100755 --- a/modules/account_invoice_defer/setup.py +++ b/modules/account_invoice_defer/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_invoice_defer' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -147,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_invoice_defer/tox.ini b/modules/account_invoice_defer/tox.ini index 27f793b55b..46074099f1 100644 --- a/modules/account_invoice_defer/tox.ini +++ b/modules/account_invoice_defer/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_invoice_history/.drone.yml b/modules/account_invoice_history/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_invoice_history/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_invoice_history/.flake8 b/modules/account_invoice_history/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_invoice_history/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_invoice_history/.isort.cfg b/modules/account_invoice_history/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_invoice_history/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_invoice_history/doc/conf.py b/modules/account_invoice_history/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_invoice_history/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_invoice_history/setup.py b/modules/account_invoice_history/setup.py index f7508a3008..69c5ca2b04 100755 --- a/modules/account_invoice_history/setup.py +++ b/modules/account_invoice_history/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_invoice_history' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to historize invoices', @@ -138,7 +115,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_invoice_history/tox.ini b/modules/account_invoice_history/tox.ini index 66c1cbad8f..ddb08cea14 100644 --- a/modules/account_invoice_history/tox.ini +++ b/modules/account_invoice_history/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_invoice_line_standalone/.drone.yml b/modules/account_invoice_line_standalone/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_invoice_line_standalone/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_invoice_line_standalone/.flake8 b/modules/account_invoice_line_standalone/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_invoice_line_standalone/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_invoice_line_standalone/.isort.cfg b/modules/account_invoice_line_standalone/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_invoice_line_standalone/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_invoice_line_standalone/doc/conf.py b/modules/account_invoice_line_standalone/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_invoice_line_standalone/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_invoice_line_standalone/setup.py b/modules/account_invoice_line_standalone/setup.py index f725ffc86f..9e714c781b 100755 --- a/modules/account_invoice_line_standalone/setup.py +++ b/modules/account_invoice_line_standalone/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_invoice_line_standalone' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to have standalone invoice lines', @@ -138,7 +115,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_invoice_line_standalone/tox.ini b/modules/account_invoice_line_standalone/tox.ini index 27e5944962..a4a81322a7 100644 --- a/modules/account_invoice_line_standalone/tox.ini +++ b/modules/account_invoice_line_standalone/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_invoice_secondary_unit/.drone.yml b/modules/account_invoice_secondary_unit/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_invoice_secondary_unit/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_invoice_secondary_unit/.flake8 b/modules/account_invoice_secondary_unit/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_invoice_secondary_unit/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_invoice_secondary_unit/.isort.cfg b/modules/account_invoice_secondary_unit/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_invoice_secondary_unit/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_invoice_secondary_unit/doc/conf.py b/modules/account_invoice_secondary_unit/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_invoice_secondary_unit/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_invoice_secondary_unit/setup.py b/modules/account_invoice_secondary_unit/setup.py index f555d15a55..d6f0d74c9f 100755 --- a/modules/account_invoice_secondary_unit/setup.py +++ b/modules/account_invoice_secondary_unit/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_invoice_secondary_unit' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_invoice_secondary_unit/tox.ini b/modules/account_invoice_secondary_unit/tox.ini index 31cce30095..688216307f 100644 --- a/modules/account_invoice_secondary_unit/tox.ini +++ b/modules/account_invoice_secondary_unit/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_invoice_stock/.drone.yml b/modules/account_invoice_stock/.drone.yml deleted file mode 100644 index bac756d88b..0000000000 --- a/modules/account_invoice_stock/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_invoice_stock/.flake8 b/modules/account_invoice_stock/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_invoice_stock/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_invoice_stock/.isort.cfg b/modules/account_invoice_stock/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_invoice_stock/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_invoice_stock/doc/conf.py b/modules/account_invoice_stock/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_invoice_stock/doc/conf.py +++ b/modules/account_invoice_stock/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_invoice_stock/setup.py b/modules/account_invoice_stock/setup.py index 7fe7146562..97721ad627 100755 --- a/modules/account_invoice_stock/setup.py +++ b/modules/account_invoice_stock/setup.py @@ -43,23 +43,6 @@ name = 'trytond_account_invoice_stock' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_invoice_stock/tox.ini b/modules/account_invoice_stock/tox.ini index 3c3f84acf8..d9d84f27c8 100644 --- a/modules/account_invoice_stock/tox.ini +++ b/modules/account_invoice_stock/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_invoice_watermark/.drone.yml b/modules/account_invoice_watermark/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_invoice_watermark/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_invoice_watermark/.flake8 b/modules/account_invoice_watermark/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_invoice_watermark/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_invoice_watermark/.isort.cfg b/modules/account_invoice_watermark/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_invoice_watermark/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_invoice_watermark/doc/conf.py b/modules/account_invoice_watermark/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_invoice_watermark/doc/conf.py +++ b/modules/account_invoice_watermark/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_invoice_watermark/setup.py b/modules/account_invoice_watermark/setup.py index d83f27d8bc..ecf1126b2d 100755 --- a/modules/account_invoice_watermark/setup.py +++ b/modules/account_invoice_watermark/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_invoice_watermark' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['PyPDF2'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -150,7 +127,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_invoice_watermark/tox.ini b/modules/account_invoice_watermark/tox.ini index 344ecb444f..50389307d1 100644 --- a/modules/account_invoice_watermark/tox.ini +++ b/modules/account_invoice_watermark/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_move_line_grouping/.drone.yml b/modules/account_move_line_grouping/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_move_line_grouping/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_move_line_grouping/.flake8 b/modules/account_move_line_grouping/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_move_line_grouping/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_move_line_grouping/.isort.cfg b/modules/account_move_line_grouping/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_move_line_grouping/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_move_line_grouping/doc/conf.py b/modules/account_move_line_grouping/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_move_line_grouping/doc/conf.py +++ b/modules/account_move_line_grouping/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_move_line_grouping/setup.py b/modules/account_move_line_grouping/setup.py index 7b88753c0f..a7b60d35bb 100755 --- a/modules/account_move_line_grouping/setup.py +++ b/modules/account_move_line_grouping/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_move_line_grouping' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -148,7 +125,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_move_line_grouping/tox.ini b/modules/account_move_line_grouping/tox.ini index 1261d3e8e6..1053c013e1 100644 --- a/modules/account_move_line_grouping/tox.ini +++ b/modules/account_move_line_grouping/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_payment/.drone.yml b/modules/account_payment/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_payment/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_payment/.flake8 b/modules/account_payment/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_payment/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_payment/.isort.cfg b/modules/account_payment/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_payment/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_payment/doc/conf.py b/modules/account_payment/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_payment/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_payment/setup.py b/modules/account_payment/setup.py index 991e79de5c..b7b7deb2ea 100755 --- a/modules/account_payment/setup.py +++ b/modules/account_payment/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_payment' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -70,11 +53,6 @@ tests_require = [ ] for dep in ['account_invoice']: tests_require.append(get_require_version('trytond_%s' % dep)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -147,7 +125,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_payment/tox.ini b/modules/account_payment/tox.ini index 225338c404..edc63b0311 100644 --- a/modules/account_payment/tox.ini +++ b/modules/account_payment/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_payment_braintree/.drone.yml b/modules/account_payment_braintree/.drone.yml deleted file mode 100644 index 9c3107f59a..0000000000 --- a/modules/account_payment_braintree/.drone.yml +++ /dev/null @@ -1,71 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID BRAINTREE_MERCHANT_ID BRAINTREE_PUBLIC_KEY BRAINTREE_PRIVATE_KEY - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - secrets: [ braintree_merchant_id, braintree_public_key, braintree_private_key ] - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_payment_braintree/.flake8 b/modules/account_payment_braintree/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_payment_braintree/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_payment_braintree/.isort.cfg b/modules/account_payment_braintree/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_payment_braintree/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_payment_braintree/doc/conf.py b/modules/account_payment_braintree/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_payment_braintree/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_payment_braintree/setup.py b/modules/account_payment_braintree/setup.py index a711c9a5b1..4c60c0b95c 100755 --- a/modules/account_payment_braintree/setup.py +++ b/modules/account_payment_braintree/setup.py @@ -43,23 +43,6 @@ name = 'trytond_account_payment_braintree' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['braintree >= 3.38.0', 'werkzeug'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_payment_braintree/tox.ini b/modules/account_payment_braintree/tox.ini index 3513cafc0e..672626f909 100644 --- a/modules/account_payment_braintree/tox.ini +++ b/modules/account_payment_braintree/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_payment_clearing/.drone.yml b/modules/account_payment_clearing/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_payment_clearing/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_payment_clearing/.flake8 b/modules/account_payment_clearing/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_payment_clearing/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_payment_clearing/.isort.cfg b/modules/account_payment_clearing/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_payment_clearing/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_payment_clearing/doc/conf.py b/modules/account_payment_clearing/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_payment_clearing/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_payment_clearing/setup.py b/modules/account_payment_clearing/setup.py index 4b5a47e23a..11f4d0374d 100755 --- a/modules/account_payment_clearing/setup.py +++ b/modules/account_payment_clearing/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_payment_clearing' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -69,11 +52,6 @@ tests_require = [get_require_version('proteus'), get_require_version('trytond_account_statement_rule'), get_require_version('trytond_account_invoice'), 'python-dateutil'] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -148,7 +126,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_payment_clearing/tox.ini b/modules/account_payment_clearing/tox.ini index 503dbcb471..ce7b9e60e4 100644 --- a/modules/account_payment_clearing/tox.ini +++ b/modules/account_payment_clearing/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_payment_sepa/.drone.yml b/modules/account_payment_sepa/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_payment_sepa/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_payment_sepa/.flake8 b/modules/account_payment_sepa/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_payment_sepa/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_payment_sepa/.isort.cfg b/modules/account_payment_sepa/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_payment_sepa/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_payment_sepa/doc/conf.py b/modules/account_payment_sepa/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_payment_sepa/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_payment_sepa/setup.py b/modules/account_payment_sepa/setup.py index be1a072efe..302bbd7555 100755 --- a/modules/account_payment_sepa/setup.py +++ b/modules/account_payment_sepa/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_payment_sepa' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['Genshi', 'lxml', 'python-dateutil', 'python-stdnum >= 1.0'] for dep in info.get('depends', []): @@ -66,12 +49,6 @@ requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module for SEPA payment', @@ -145,7 +122,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_payment_sepa/tox.ini b/modules/account_payment_sepa/tox.ini index b933fd8e5d..8566a9f5ef 100644 --- a/modules/account_payment_sepa/tox.ini +++ b/modules/account_payment_sepa/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_payment_sepa_cfonb/.drone.yml b/modules/account_payment_sepa_cfonb/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_payment_sepa_cfonb/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_payment_sepa_cfonb/.flake8 b/modules/account_payment_sepa_cfonb/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_payment_sepa_cfonb/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_payment_sepa_cfonb/.isort.cfg b/modules/account_payment_sepa_cfonb/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_payment_sepa_cfonb/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_payment_sepa_cfonb/doc/conf.py b/modules/account_payment_sepa_cfonb/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_payment_sepa_cfonb/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_payment_sepa_cfonb/setup.py b/modules/account_payment_sepa_cfonb/setup.py index dafd8f76bb..ac8d72cbb3 100755 --- a/modules/account_payment_sepa_cfonb/setup.py +++ b/modules/account_payment_sepa_cfonb/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_payment_sepa_cfonb' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['Genshi', 'lxml'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -144,7 +122,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_payment_sepa_cfonb/tox.ini b/modules/account_payment_sepa_cfonb/tox.ini index 604bfdd174..29445a4434 100644 --- a/modules/account_payment_sepa_cfonb/tox.ini +++ b/modules/account_payment_sepa_cfonb/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_payment_stripe/.drone.yml b/modules/account_payment_stripe/.drone.yml deleted file mode 100644 index 9bb9bb65b7..0000000000 --- a/modules/account_payment_stripe/.drone.yml +++ /dev/null @@ -1,71 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID STRIPE_SECRET_KEY STRIPE_PUBLISHABLE_KEY - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - secrets: [ stripe_secret_key, stripe_publishable_key ] - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_payment_stripe/.flake8 b/modules/account_payment_stripe/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_payment_stripe/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_payment_stripe/.isort.cfg b/modules/account_payment_stripe/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_payment_stripe/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_payment_stripe/doc/conf.py b/modules/account_payment_stripe/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_payment_stripe/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_payment_stripe/setup.py b/modules/account_payment_stripe/setup.py index 2548544379..f58a4c3069 100755 --- a/modules/account_payment_stripe/setup.py +++ b/modules/account_payment_stripe/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_payment_stripe' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['stripe >= 2.32.0', 'werkzeug'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_payment_stripe/tox.ini b/modules/account_payment_stripe/tox.ini index f0c1d5ad00..449d529f09 100644 --- a/modules/account_payment_stripe/tox.ini +++ b/modules/account_payment_stripe/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_product/.drone.yml b/modules/account_product/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_product/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_product/.flake8 b/modules/account_product/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_product/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_product/.isort.cfg b/modules/account_product/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_product/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_product/doc/conf.py b/modules/account_product/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_product/doc/conf.py +++ b/modules/account_product/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_product/setup.py b/modules/account_product/setup.py index 202f59cdb6..df7c1a296f 100755 --- a/modules/account_product/setup.py +++ b/modules/account_product/setup.py @@ -43,23 +43,6 @@ name = 'trytond_account_product' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('trytond_analytic_account')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_product/tox.ini b/modules/account_product/tox.ini index 47195f0bde..e29f622b14 100644 --- a/modules/account_product/tox.ini +++ b/modules/account_product/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_receivable_rule/.drone.yml b/modules/account_receivable_rule/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_receivable_rule/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_receivable_rule/.flake8 b/modules/account_receivable_rule/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_receivable_rule/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_receivable_rule/.isort.cfg b/modules/account_receivable_rule/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_receivable_rule/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_receivable_rule/doc/conf.py b/modules/account_receivable_rule/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_receivable_rule/doc/conf.py +++ b/modules/account_receivable_rule/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_receivable_rule/setup.py b/modules/account_receivable_rule/setup.py index ef9346513e..ffad1a3737 100755 --- a/modules/account_receivable_rule/setup.py +++ b/modules/account_receivable_rule/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_receivable_rule' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -148,7 +125,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_receivable_rule/tox.ini b/modules/account_receivable_rule/tox.ini index 76bb066c91..92361c15da 100644 --- a/modules/account_receivable_rule/tox.ini +++ b/modules/account_receivable_rule/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_rule/.drone.yml b/modules/account_rule/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_rule/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_rule/.flake8 b/modules/account_rule/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_rule/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_rule/.isort.cfg b/modules/account_rule/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_rule/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_rule/doc/conf.py b/modules/account_rule/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_rule/doc/conf.py +++ b/modules/account_rule/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_rule/setup.py b/modules/account_rule/setup.py index 878b1f0734..41b92f5ce6 100755 --- a/modules/account_rule/setup.py +++ b/modules/account_rule/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_rule' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -81,12 +64,6 @@ tests_require = [ get_require_version('trytond_stock'), get_require_version('trytond_stock_consignment'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -160,7 +137,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_rule/tox.ini b/modules/account_rule/tox.ini index d6f07a6819..b750f4a5e9 100644 --- a/modules/account_rule/tox.ini +++ b/modules/account_rule/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_statement/.drone.yml b/modules/account_statement/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_statement/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_statement/.flake8 b/modules/account_statement/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_statement/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_statement/.isort.cfg b/modules/account_statement/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_statement/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_statement/doc/conf.py b/modules/account_statement/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_statement/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_statement/setup.py b/modules/account_statement/setup.py index f0fffa4aea..5b28d5f19d 100755 --- a/modules/account_statement/setup.py +++ b/modules/account_statement/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_statement' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_statement/tox.ini b/modules/account_statement/tox.ini index fcf0f26096..5c9c43faa9 100644 --- a/modules/account_statement/tox.ini +++ b/modules/account_statement/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_statement_aeb43/.drone.yml b/modules/account_statement_aeb43/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_statement_aeb43/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_statement_aeb43/.flake8 b/modules/account_statement_aeb43/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_statement_aeb43/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_statement_aeb43/.isort.cfg b/modules/account_statement_aeb43/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_statement_aeb43/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_statement_aeb43/doc/conf.py b/modules/account_statement_aeb43/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_statement_aeb43/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_statement_aeb43/setup.py b/modules/account_statement_aeb43/setup.py index 4fb7967fd6..bf31de0c0e 100755 --- a/modules/account_statement_aeb43/setup.py +++ b/modules/account_statement_aeb43/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_statement_aeb43' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-stdnum', 'csb43>=0.8'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_statement_aeb43/tox.ini b/modules/account_statement_aeb43/tox.ini index 0c51f154a8..0ee759c843 100644 --- a/modules/account_statement_aeb43/tox.ini +++ b/modules/account_statement_aeb43/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_statement_coda/.drone.yml b/modules/account_statement_coda/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_statement_coda/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_statement_coda/.flake8 b/modules/account_statement_coda/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_statement_coda/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_statement_coda/.isort.cfg b/modules/account_statement_coda/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_statement_coda/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_statement_coda/doc/conf.py b/modules/account_statement_coda/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_statement_coda/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_statement_coda/setup.py b/modules/account_statement_coda/setup.py index 6325eaf2aa..27b3b57d7d 100755 --- a/modules/account_statement_coda/setup.py +++ b/modules/account_statement_coda/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_statement_coda' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['febelfin-coda'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +118,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_statement_coda/tox.ini b/modules/account_statement_coda/tox.ini index db9a6ac6fd..bb9ab80e16 100644 --- a/modules/account_statement_coda/tox.ini +++ b/modules/account_statement_coda/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_statement_ofx/.drone.yml b/modules/account_statement_ofx/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_statement_ofx/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_statement_ofx/.flake8 b/modules/account_statement_ofx/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_statement_ofx/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_statement_ofx/.isort.cfg b/modules/account_statement_ofx/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_statement_ofx/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_statement_ofx/doc/conf.py b/modules/account_statement_ofx/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_statement_ofx/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_statement_ofx/setup.py b/modules/account_statement_ofx/setup.py index 7acb6e31ec..13b7fb7d4f 100755 --- a/modules/account_statement_ofx/setup.py +++ b/modules/account_statement_ofx/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_statement_ofx' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['ofxparse'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +118,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_statement_ofx/tox.ini b/modules/account_statement_ofx/tox.ini index 3f5daf8722..19e6993be5 100644 --- a/modules/account_statement_ofx/tox.ini +++ b/modules/account_statement_ofx/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_statement_rule/.drone.yml b/modules/account_statement_rule/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_statement_rule/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_statement_rule/.flake8 b/modules/account_statement_rule/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_statement_rule/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_statement_rule/.isort.cfg b/modules/account_statement_rule/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_statement_rule/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_statement_rule/doc/conf.py b/modules/account_statement_rule/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_statement_rule/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_statement_rule/setup.py b/modules/account_statement_rule/setup.py index 390a8f835c..45cc44c0fa 100755 --- a/modules/account_statement_rule/setup.py +++ b/modules/account_statement_rule/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_statement_rule' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_bank'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_statement_rule/tox.ini b/modules/account_statement_rule/tox.ini index 50d29b32dc..6e2d24f9fb 100644 --- a/modules/account_statement_rule/tox.ini +++ b/modules/account_statement_rule/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_statement_sepa/.drone.yml b/modules/account_statement_sepa/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_statement_sepa/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_statement_sepa/.flake8 b/modules/account_statement_sepa/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_statement_sepa/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_statement_sepa/.isort.cfg b/modules/account_statement_sepa/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_statement_sepa/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_statement_sepa/doc/conf.py b/modules/account_statement_sepa/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_statement_sepa/doc/conf.py +++ b/modules/account_statement_sepa/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_statement_sepa/setup.py b/modules/account_statement_sepa/setup.py index a3153eee08..4259d7b59b 100755 --- a/modules/account_statement_sepa/setup.py +++ b/modules/account_statement_sepa/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_statement_sepa' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['lxml'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -147,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_statement_sepa/tox.ini b/modules/account_statement_sepa/tox.ini index d8d850f112..f1bacd21af 100644 --- a/modules/account_statement_sepa/tox.ini +++ b/modules/account_statement_sepa/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_stock_anglo_saxon/.drone.yml b/modules/account_stock_anglo_saxon/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_stock_anglo_saxon/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_stock_anglo_saxon/.flake8 b/modules/account_stock_anglo_saxon/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_stock_anglo_saxon/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_stock_anglo_saxon/.isort.cfg b/modules/account_stock_anglo_saxon/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_stock_anglo_saxon/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_stock_anglo_saxon/doc/conf.py b/modules/account_stock_anglo_saxon/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_stock_anglo_saxon/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_stock_anglo_saxon/setup.py b/modules/account_stock_anglo_saxon/setup.py index 3d693f521e..ce170d6be0 100755 --- a/modules/account_stock_anglo_saxon/setup.py +++ b/modules/account_stock_anglo_saxon/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_stock_anglo_saxon' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ tests_require = [get_require_version('proteus'), get_require_version('trytond_sale_supply_drop_shipment'), get_require_version('trytond_sale'), get_require_version('trytond_purchase')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_stock_anglo_saxon/tox.ini b/modules/account_stock_anglo_saxon/tox.ini index 348700bba0..02841171cf 100644 --- a/modules/account_stock_anglo_saxon/tox.ini +++ b/modules/account_stock_anglo_saxon/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_stock_continental/.drone.yml b/modules/account_stock_continental/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_stock_continental/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_stock_continental/.flake8 b/modules/account_stock_continental/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_stock_continental/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_stock_continental/.isort.cfg b/modules/account_stock_continental/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_stock_continental/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_stock_continental/doc/conf.py b/modules/account_stock_continental/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_stock_continental/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_stock_continental/setup.py b/modules/account_stock_continental/setup.py index 241272226b..5b3ace73bc 100755 --- a/modules/account_stock_continental/setup.py +++ b/modules/account_stock_continental/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_stock_continental' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ tests_require = [get_require_version('proteus')] for dep in ['sale', 'purchase', 'account_invoice', 'sale_supply_drop_shipment']: tests_require.append(get_require_version('trytond_%s' % dep)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_stock_continental/tox.ini b/modules/account_stock_continental/tox.ini index ef6f270ddc..ca1fbede5a 100644 --- a/modules/account_stock_continental/tox.ini +++ b/modules/account_stock_continental/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_stock_landed_cost/.drone.yml b/modules/account_stock_landed_cost/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_stock_landed_cost/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_stock_landed_cost/.flake8 b/modules/account_stock_landed_cost/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_stock_landed_cost/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_stock_landed_cost/.isort.cfg b/modules/account_stock_landed_cost/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_stock_landed_cost/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_stock_landed_cost/doc/conf.py b/modules/account_stock_landed_cost/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_stock_landed_cost/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_stock_landed_cost/setup.py b/modules/account_stock_landed_cost/setup.py index 81e3352f0c..13089823e3 100755 --- a/modules/account_stock_landed_cost/setup.py +++ b/modules/account_stock_landed_cost/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_stock_landed_cost' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_stock_landed_cost/tox.ini b/modules/account_stock_landed_cost/tox.ini index 815e1dd6db..7d09f468f6 100644 --- a/modules/account_stock_landed_cost/tox.ini +++ b/modules/account_stock_landed_cost/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_stock_landed_cost_weight/.drone.yml b/modules/account_stock_landed_cost_weight/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_stock_landed_cost_weight/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_stock_landed_cost_weight/.flake8 b/modules/account_stock_landed_cost_weight/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_stock_landed_cost_weight/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_stock_landed_cost_weight/.isort.cfg b/modules/account_stock_landed_cost_weight/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_stock_landed_cost_weight/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_stock_landed_cost_weight/doc/conf.py b/modules/account_stock_landed_cost_weight/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_stock_landed_cost_weight/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_stock_landed_cost_weight/setup.py b/modules/account_stock_landed_cost_weight/setup.py index 1d9f437cf5..fb4bd3109d 100755 --- a/modules/account_stock_landed_cost_weight/setup.py +++ b/modules/account_stock_landed_cost_weight/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_stock_landed_cost_weight' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -144,7 +122,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_stock_landed_cost_weight/tox.ini b/modules/account_stock_landed_cost_weight/tox.ini index 7288e99658..ec08eba5a1 100644 --- a/modules/account_stock_landed_cost_weight/tox.ini +++ b/modules/account_stock_landed_cost_weight/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_stock_shipment_cost/.drone.yml b/modules/account_stock_shipment_cost/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_stock_shipment_cost/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_stock_shipment_cost/.flake8 b/modules/account_stock_shipment_cost/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_stock_shipment_cost/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_stock_shipment_cost/.isort.cfg b/modules/account_stock_shipment_cost/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_stock_shipment_cost/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_stock_shipment_cost/doc/conf.py b/modules/account_stock_shipment_cost/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_stock_shipment_cost/doc/conf.py +++ b/modules/account_stock_shipment_cost/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_stock_shipment_cost/setup.py b/modules/account_stock_shipment_cost/setup.py index 3a23f1f984..2568df0539 100755 --- a/modules/account_stock_shipment_cost/setup.py +++ b/modules/account_stock_shipment_cost/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_stock_shipment_cost' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -150,7 +127,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_stock_shipment_cost/tox.ini b/modules/account_stock_shipment_cost/tox.ini index eec75bf9b3..7a64ec915a 100644 --- a/modules/account_stock_shipment_cost/tox.ini +++ b/modules/account_stock_shipment_cost/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_stock_shipment_cost_weight/.drone.yml b/modules/account_stock_shipment_cost_weight/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_stock_shipment_cost_weight/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_stock_shipment_cost_weight/.flake8 b/modules/account_stock_shipment_cost_weight/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_stock_shipment_cost_weight/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_stock_shipment_cost_weight/.isort.cfg b/modules/account_stock_shipment_cost_weight/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_stock_shipment_cost_weight/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_stock_shipment_cost_weight/doc/conf.py b/modules/account_stock_shipment_cost_weight/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_stock_shipment_cost_weight/doc/conf.py +++ b/modules/account_stock_shipment_cost_weight/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_stock_shipment_cost_weight/setup.py b/modules/account_stock_shipment_cost_weight/setup.py index 3d694af9c8..3c09002e36 100755 --- a/modules/account_stock_shipment_cost_weight/setup.py +++ b/modules/account_stock_shipment_cost_weight/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_stock_shipment_cost_weight' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -151,7 +128,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_stock_shipment_cost_weight/tox.ini b/modules/account_stock_shipment_cost_weight/tox.ini index 277a508b0b..083d107bb6 100644 --- a/modules/account_stock_shipment_cost_weight/tox.ini +++ b/modules/account_stock_shipment_cost_weight/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_tax_cash/.drone.yml b/modules/account_tax_cash/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_tax_cash/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_tax_cash/.flake8 b/modules/account_tax_cash/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_tax_cash/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_tax_cash/.isort.cfg b/modules/account_tax_cash/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_tax_cash/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_tax_cash/doc/conf.py b/modules/account_tax_cash/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_tax_cash/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_tax_cash/setup.py b/modules/account_tax_cash/setup.py index d454bc0d32..6d27a51287 100755 --- a/modules/account_tax_cash/setup.py +++ b/modules/account_tax_cash/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_tax_cash' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -139,7 +117,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_tax_cash/tox.ini b/modules/account_tax_cash/tox.ini index f3972a6641..f81bd30766 100644 --- a/modules/account_tax_cash/tox.ini +++ b/modules/account_tax_cash/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_tax_non_deductible/.drone.yml b/modules/account_tax_non_deductible/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/account_tax_non_deductible/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_tax_non_deductible/.flake8 b/modules/account_tax_non_deductible/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_tax_non_deductible/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_tax_non_deductible/.isort.cfg b/modules/account_tax_non_deductible/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_tax_non_deductible/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_tax_non_deductible/doc/conf.py b/modules/account_tax_non_deductible/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/account_tax_non_deductible/doc/conf.py +++ b/modules/account_tax_non_deductible/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_tax_non_deductible/setup.py b/modules/account_tax_non_deductible/setup.py index 20141af816..290d401507 100755 --- a/modules/account_tax_non_deductible/setup.py +++ b/modules/account_tax_non_deductible/setup.py @@ -43,24 +43,7 @@ name = 'trytond_account_tax_non_deductible' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -150,7 +127,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_tax_non_deductible/tox.ini b/modules/account_tax_non_deductible/tox.ini index ecd3339b85..f1ef2a7e19 100644 --- a/modules/account_tax_non_deductible/tox.ini +++ b/modules/account_tax_non_deductible/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/account_tax_rule_country/.drone.yml b/modules/account_tax_rule_country/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/account_tax_rule_country/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/account_tax_rule_country/.flake8 b/modules/account_tax_rule_country/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/account_tax_rule_country/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/account_tax_rule_country/.isort.cfg b/modules/account_tax_rule_country/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/account_tax_rule_country/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/account_tax_rule_country/doc/conf.py b/modules/account_tax_rule_country/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/account_tax_rule_country/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/account_tax_rule_country/setup.py b/modules/account_tax_rule_country/setup.py index 8e07f555a2..502ec96e6b 100755 --- a/modules/account_tax_rule_country/setup.py +++ b/modules/account_tax_rule_country/setup.py @@ -40,23 +40,6 @@ name = 'trytond_account_tax_rule_country' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -67,11 +50,6 @@ requires.append(get_require_version('trytond')) tests_require = [] for dep in ['account_invoice', 'sale', 'purchase', 'stock']: tests_require.append(get_require_version('trytond_%s' % dep)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/account_tax_rule_country/tox.ini b/modules/account_tax_rule_country/tox.ini index 18c2392cfc..d672590dbf 100644 --- a/modules/account_tax_rule_country/tox.ini +++ b/modules/account_tax_rule_country/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/analytic_account/.drone.yml b/modules/analytic_account/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/analytic_account/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/analytic_account/.flake8 b/modules/analytic_account/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/analytic_account/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/analytic_account/.isort.cfg b/modules/analytic_account/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/analytic_account/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/analytic_account/doc/conf.py b/modules/analytic_account/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/analytic_account/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/analytic_account/setup.py b/modules/analytic_account/setup.py index e8a1d70867..41eca070c2 100755 --- a/modules/analytic_account/setup.py +++ b/modules/analytic_account/setup.py @@ -40,23 +40,6 @@ name = 'trytond_analytic_account' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/analytic_account/tox.ini b/modules/analytic_account/tox.ini index a8e099cb81..74e65d265a 100644 --- a/modules/analytic_account/tox.ini +++ b/modules/analytic_account/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/analytic_budget/.drone.yml b/modules/analytic_budget/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/analytic_budget/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/analytic_budget/.flake8 b/modules/analytic_budget/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/analytic_budget/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/analytic_budget/.isort.cfg b/modules/analytic_budget/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/analytic_budget/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/analytic_budget/doc/conf.py b/modules/analytic_budget/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/analytic_budget/doc/conf.py +++ b/modules/analytic_budget/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/analytic_budget/setup.py b/modules/analytic_budget/setup.py index 3ca6e44c55..7b394583f0 100755 --- a/modules/analytic_budget/setup.py +++ b/modules/analytic_budget/setup.py @@ -43,24 +43,7 @@ name = 'trytond_analytic_budget' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -149,7 +126,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/analytic_budget/tox.ini b/modules/analytic_budget/tox.ini index 1a94b1dc12..9ef3ab62e0 100644 --- a/modules/analytic_budget/tox.ini +++ b/modules/analytic_budget/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/analytic_invoice/.drone.yml b/modules/analytic_invoice/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/analytic_invoice/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/analytic_invoice/.flake8 b/modules/analytic_invoice/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/analytic_invoice/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/analytic_invoice/.isort.cfg b/modules/analytic_invoice/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/analytic_invoice/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/analytic_invoice/doc/conf.py b/modules/analytic_invoice/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/analytic_invoice/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/analytic_invoice/setup.py b/modules/analytic_invoice/setup.py index 41cd7a1e0f..6bd469b07f 100755 --- a/modules/analytic_invoice/setup.py +++ b/modules/analytic_invoice/setup.py @@ -40,23 +40,6 @@ name = 'trytond_analytic_invoice' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -67,11 +50,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] for dep in ['account_asset']: tests_require.append(get_require_version('trytond_%s' % dep)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/analytic_invoice/tox.ini b/modules/analytic_invoice/tox.ini index 86e93bc045..a0fb4567b8 100644 --- a/modules/analytic_invoice/tox.ini +++ b/modules/analytic_invoice/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/analytic_purchase/.drone.yml b/modules/analytic_purchase/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/analytic_purchase/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/analytic_purchase/.flake8 b/modules/analytic_purchase/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/analytic_purchase/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/analytic_purchase/.isort.cfg b/modules/analytic_purchase/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/analytic_purchase/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/analytic_purchase/doc/conf.py b/modules/analytic_purchase/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/analytic_purchase/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/analytic_purchase/setup.py b/modules/analytic_purchase/setup.py index 3a0d7c8b06..97dd4b2ffe 100755 --- a/modules/analytic_purchase/setup.py +++ b/modules/analytic_purchase/setup.py @@ -40,23 +40,6 @@ name = 'trytond_analytic_purchase' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/analytic_purchase/tox.ini b/modules/analytic_purchase/tox.ini index 437653e400..16dbad3b72 100644 --- a/modules/analytic_purchase/tox.ini +++ b/modules/analytic_purchase/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/analytic_sale/.drone.yml b/modules/analytic_sale/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/analytic_sale/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/analytic_sale/.flake8 b/modules/analytic_sale/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/analytic_sale/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/analytic_sale/.isort.cfg b/modules/analytic_sale/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/analytic_sale/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/analytic_sale/doc/conf.py b/modules/analytic_sale/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/analytic_sale/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/analytic_sale/setup.py b/modules/analytic_sale/setup.py index 87c65cfc46..37acdc0c45 100755 --- a/modules/analytic_sale/setup.py +++ b/modules/analytic_sale/setup.py @@ -40,23 +40,6 @@ name = 'trytond_analytic_sale' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/analytic_sale/tox.ini b/modules/analytic_sale/tox.ini index 3f4ca072c9..e7c2536f22 100644 --- a/modules/analytic_sale/tox.ini +++ b/modules/analytic_sale/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/attendance/.drone.yml b/modules/attendance/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/attendance/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/attendance/.flake8 b/modules/attendance/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/attendance/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/attendance/.isort.cfg b/modules/attendance/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/attendance/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/attendance/doc/conf.py b/modules/attendance/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/attendance/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/attendance/setup.py b/modules/attendance/setup.py index 72bf2b03c3..5acbaaca76 100755 --- a/modules/attendance/setup.py +++ b/modules/attendance/setup.py @@ -43,23 +43,6 @@ name = 'trytond_attendance' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -71,11 +54,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_timesheet'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/attendance/tox.ini b/modules/attendance/tox.ini index fb75cdec85..0a69b1705a 100644 --- a/modules/attendance/tox.ini +++ b/modules/attendance/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/authentication_saml/.drone.yml b/modules/authentication_saml/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/authentication_saml/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/authentication_saml/.flake8 b/modules/authentication_saml/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/authentication_saml/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/authentication_saml/.isort.cfg b/modules/authentication_saml/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/authentication_saml/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/authentication_saml/doc/conf.py b/modules/authentication_saml/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/authentication_saml/doc/conf.py +++ b/modules/authentication_saml/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/authentication_saml/setup.py b/modules/authentication_saml/setup.py index dc0577e6f8..c58cb8ef51 100755 --- a/modules/authentication_saml/setup.py +++ b/modules/authentication_saml/setup.py @@ -43,24 +43,7 @@ name = 'trytond_authentication_saml' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['pysaml2'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -147,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/authentication_saml/tox.ini b/modules/authentication_saml/tox.ini index 31d299e5d8..a5133ca757 100644 --- a/modules/authentication_saml/tox.ini +++ b/modules/authentication_saml/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/authentication_sms/.drone.yml b/modules/authentication_sms/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/authentication_sms/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/authentication_sms/.flake8 b/modules/authentication_sms/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/authentication_sms/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/authentication_sms/.isort.cfg b/modules/authentication_sms/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/authentication_sms/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/authentication_sms/doc/conf.py b/modules/authentication_sms/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/authentication_sms/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/authentication_sms/setup.py b/modules/authentication_sms/setup.py index c465964fb9..f84c9d6d5f 100755 --- a/modules/authentication_sms/setup.py +++ b/modules/authentication_sms/setup.py @@ -40,23 +40,6 @@ name = 'trytond_authentication_sms' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/authentication_sms/tox.ini b/modules/authentication_sms/tox.ini index 0de6f7acd9..39cee9d4c1 100644 --- a/modules/authentication_sms/tox.ini +++ b/modules/authentication_sms/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/bank/.drone.yml b/modules/bank/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/bank/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/bank/.flake8 b/modules/bank/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/bank/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/bank/.isort.cfg b/modules/bank/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/bank/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/bank/doc/conf.py b/modules/bank/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/bank/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/bank/setup.py b/modules/bank/setup.py index 274c4bfe3e..b061f657b6 100755 --- a/modules/bank/setup.py +++ b/modules/bank/setup.py @@ -40,23 +40,6 @@ name = 'trytond_bank' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-stdnum', 'python-sql >= 0.4'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = ['schwifty'] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, 'SWIFT': ['schwifty>=2020.01.0'], 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/bank/tox.ini b/modules/bank/tox.ini index 06de07b63c..b212abf157 100644 --- a/modules/bank/tox.ini +++ b/modules/bank/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/carrier/.drone.yml b/modules/carrier/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/carrier/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/carrier/.flake8 b/modules/carrier/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/carrier/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/carrier/.isort.cfg b/modules/carrier/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/carrier/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/carrier/doc/conf.py b/modules/carrier/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/carrier/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/carrier/setup.py b/modules/carrier/setup.py index 50a8d69ba2..f50aa51c38 100755 --- a/modules/carrier/setup.py +++ b/modules/carrier/setup.py @@ -40,23 +40,6 @@ name = 'trytond_carrier' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module with carriers', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/carrier/tox.ini b/modules/carrier/tox.ini index 617835ebcd..fcade47ab6 100644 --- a/modules/carrier/tox.ini +++ b/modules/carrier/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/carrier_carriage/.drone.yml b/modules/carrier_carriage/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/carrier_carriage/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/carrier_carriage/.flake8 b/modules/carrier_carriage/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/carrier_carriage/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/carrier_carriage/.isort.cfg b/modules/carrier_carriage/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/carrier_carriage/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/carrier_carriage/doc/conf.py b/modules/carrier_carriage/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/carrier_carriage/doc/conf.py +++ b/modules/carrier_carriage/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/carrier_carriage/setup.py b/modules/carrier_carriage/setup.py index 4c407bf8ca..c26e51f879 100755 --- a/modules/carrier_carriage/setup.py +++ b/modules/carrier_carriage/setup.py @@ -43,24 +43,7 @@ name = 'trytond_carrier_carriage' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -74,12 +57,6 @@ tests_require = [ get_require_version('trytond_purchase_shipment_cost'), get_require_version('trytond_sale_shipment_cost'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -153,7 +130,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/carrier_carriage/tox.ini b/modules/carrier_carriage/tox.ini index b7f59c206f..cbd271c35c 100644 --- a/modules/carrier_carriage/tox.ini +++ b/modules/carrier_carriage/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/carrier_percentage/.drone.yml b/modules/carrier_percentage/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/carrier_percentage/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/carrier_percentage/.flake8 b/modules/carrier_percentage/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/carrier_percentage/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/carrier_percentage/.isort.cfg b/modules/carrier_percentage/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/carrier_percentage/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/carrier_percentage/doc/conf.py b/modules/carrier_percentage/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/carrier_percentage/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/carrier_percentage/setup.py b/modules/carrier_percentage/setup.py index e681fec60d..33bf9265a8 100755 --- a/modules/carrier_percentage/setup.py +++ b/modules/carrier_percentage/setup.py @@ -40,23 +40,6 @@ name = 'trytond_carrier_percentage' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -69,11 +52,6 @@ tests_require = [get_require_version('proteus'), get_require_version('trytond_sale_shipment_cost'), get_require_version('trytond_stock_shipment_cost'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/carrier_percentage/tox.ini b/modules/carrier_percentage/tox.ini index ed7ddc0421..5bab037421 100644 --- a/modules/carrier_percentage/tox.ini +++ b/modules/carrier_percentage/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/carrier_subdivision/.drone.yml b/modules/carrier_subdivision/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/carrier_subdivision/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/carrier_subdivision/.flake8 b/modules/carrier_subdivision/.flake8 deleted file mode 100644 index bb03d08a82..0000000000 --- a/modules/carrier_subdivision/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,W503 diff --git a/modules/carrier_subdivision/.isort.cfg b/modules/carrier_subdivision/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/carrier_subdivision/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/carrier_subdivision/doc/conf.py b/modules/carrier_subdivision/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/carrier_subdivision/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/carrier_subdivision/setup.py b/modules/carrier_subdivision/setup.py index 1dc80a6cd8..f21d47162f 100755 --- a/modules/carrier_subdivision/setup.py +++ b/modules/carrier_subdivision/setup.py @@ -43,23 +43,6 @@ name = 'trytond_carrier_subdivision' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -72,11 +55,6 @@ tests_require = [ get_require_version('trytond_sale_shipment_cost'), get_require_version('trytond_carrier_carriage'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -150,7 +128,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/carrier_subdivision/tox.ini b/modules/carrier_subdivision/tox.ini index 7746cc1e94..cf6f9eb25c 100644 --- a/modules/carrier_subdivision/tox.ini +++ b/modules/carrier_subdivision/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/carrier_weight/.drone.yml b/modules/carrier_weight/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/carrier_weight/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/carrier_weight/.flake8 b/modules/carrier_weight/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/carrier_weight/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/carrier_weight/.isort.cfg b/modules/carrier_weight/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/carrier_weight/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/carrier_weight/doc/conf.py b/modules/carrier_weight/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/carrier_weight/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/carrier_weight/setup.py b/modules/carrier_weight/setup.py index d56c650d70..27795033d1 100755 --- a/modules/carrier_weight/setup.py +++ b/modules/carrier_weight/setup.py @@ -40,23 +40,6 @@ name = 'trytond_carrier_weight' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -69,11 +52,6 @@ tests_require = [get_require_version('proteus'), get_require_version('trytond_sale_shipment_cost'), get_require_version('trytond_stock_shipment_cost'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/carrier_weight/tox.ini b/modules/carrier_weight/tox.ini index 4602a048ac..d06f31cbbb 100644 --- a/modules/carrier_weight/tox.ini +++ b/modules/carrier_weight/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/commission/.drone.yml b/modules/commission/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/commission/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/commission/.flake8 b/modules/commission/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/commission/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/commission/.isort.cfg b/modules/commission/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/commission/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/commission/doc/conf.py b/modules/commission/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/commission/doc/conf.py +++ b/modules/commission/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/commission/setup.py b/modules/commission/setup.py index e340248c17..238dd5c90c 100755 --- a/modules/commission/setup.py +++ b/modules/commission/setup.py @@ -43,23 +43,6 @@ name = 'trytond_commission' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['simpleeval', 'python-sql', 'python-dateutil'] for dep in info.get('depends', []): @@ -73,11 +56,6 @@ tests_require = [ get_require_version('trytond_sale'), get_require_version('trytond_stock'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -151,7 +129,6 @@ setup(name=name, 'sparklines': ['pygal'], 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/commission/tox.ini b/modules/commission/tox.ini index c0b09d7929..b4532f1b9d 100644 --- a/modules/commission/tox.ini +++ b/modules/commission/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/commission_waiting/.drone.yml b/modules/commission_waiting/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/commission_waiting/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/commission_waiting/.flake8 b/modules/commission_waiting/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/commission_waiting/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/commission_waiting/.isort.cfg b/modules/commission_waiting/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/commission_waiting/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/commission_waiting/doc/conf.py b/modules/commission_waiting/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/commission_waiting/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/commission_waiting/setup.py b/modules/commission_waiting/setup.py index 932bb2c005..f50fffd0f2 100755 --- a/modules/commission_waiting/setup.py +++ b/modules/commission_waiting/setup.py @@ -40,23 +40,6 @@ name = 'trytond_commission_waiting' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/commission_waiting/tox.ini b/modules/commission_waiting/tox.ini index af22dc1323..47b2eb4aef 100644 --- a/modules/commission_waiting/tox.ini +++ b/modules/commission_waiting/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/company/.drone.yml b/modules/company/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/company/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/company/.flake8 b/modules/company/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/company/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/company/.isort.cfg b/modules/company/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/company/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/company/doc/conf.py b/modules/company/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/company/doc/conf.py +++ b/modules/company/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/company/setup.py b/modules/company/setup.py index 1493df966f..4dae56ed97 100755 --- a/modules/company/setup.py +++ b/modules/company/setup.py @@ -43,23 +43,6 @@ name = 'trytond_company' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -67,12 +50,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module with companies and employees', @@ -141,7 +118,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/company/tox.ini b/modules/company/tox.ini index a16040d907..5c450bf015 100644 --- a/modules/company/tox.ini +++ b/modules/company/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/company_work_time/.drone.yml b/modules/company_work_time/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/company_work_time/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/company_work_time/.flake8 b/modules/company_work_time/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/company_work_time/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/company_work_time/.isort.cfg b/modules/company_work_time/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/company_work_time/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/company_work_time/doc/conf.py b/modules/company_work_time/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/company_work_time/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/company_work_time/setup.py b/modules/company_work_time/setup.py index b39fbaaeae..17b76b110e 100755 --- a/modules/company_work_time/setup.py +++ b/modules/company_work_time/setup.py @@ -40,23 +40,6 @@ name = 'trytond_company_work_time' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to add work time on company', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/company_work_time/tox.ini b/modules/company_work_time/tox.ini index 8022276863..d72b65b0fc 100644 --- a/modules/company_work_time/tox.ini +++ b/modules/company_work_time/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/country/.drone.yml b/modules/country/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/country/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/country/.flake8 b/modules/country/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/country/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/country/.isort.cfg b/modules/country/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/country/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/country/doc/conf.py b/modules/country/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/country/doc/conf.py +++ b/modules/country/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/country/setup.py b/modules/country/setup.py index 571a8daf3e..c17c6115fe 100755 --- a/modules/country/setup.py +++ b/modules/country/setup.py @@ -43,23 +43,6 @@ name = 'trytond_country' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), 'pycountry'] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -148,7 +126,6 @@ setup(name=name, 'GeoNames': [get_require_version('proteus')], 'completion': ['argcomplete'], }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/country/tox.ini b/modules/country/tox.ini index 6ff344ec44..b03c049100 100644 --- a/modules/country/tox.ini +++ b/modules/country/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/currency/.drone.yml b/modules/currency/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/currency/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/currency/.flake8 b/modules/currency/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/currency/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/currency/.isort.cfg b/modules/currency/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/currency/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/currency/doc/conf.py b/modules/currency/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/currency/doc/conf.py +++ b/modules/currency/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/currency/setup.py b/modules/currency/setup.py index ee840cefef..f56f9c7358 100755 --- a/modules/currency/setup.py +++ b/modules/currency/setup.py @@ -43,23 +43,6 @@ name = 'trytond_currency' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.9', 'python-dateutil'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), 'pycountry'] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -148,7 +126,6 @@ setup(name=name, 'test': tests_require, 'completion': ['argcomplete'], }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/currency/tox.ini b/modules/currency/tox.ini index 2101954c83..4b97760665 100644 --- a/modules/currency/tox.ini +++ b/modules/currency/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/currency_ro/.drone.yml b/modules/currency_ro/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/currency_ro/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/currency_ro/.flake8 b/modules/currency_ro/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/currency_ro/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/currency_ro/.isort.cfg b/modules/currency_ro/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/currency_ro/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/currency_ro/doc/conf.py b/modules/currency_ro/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/currency_ro/doc/conf.py +++ b/modules/currency_ro/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/currency_ro/setup.py b/modules/currency_ro/setup.py index e859ce0604..d1c7414374 100755 --- a/modules/currency_ro/setup.py +++ b/modules/currency_ro/setup.py @@ -43,24 +43,7 @@ name = 'trytond_currency_ro' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['requests', 'lxml'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -147,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/currency_ro/tox.ini b/modules/currency_ro/tox.ini index 44ad478b81..788d80d189 100644 --- a/modules/currency_ro/tox.ini +++ b/modules/currency_ro/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/currency_rs/.drone.yml b/modules/currency_rs/.drone.yml deleted file mode 100644 index bfa13a934b..0000000000 --- a/modules/currency_rs/.drone.yml +++ /dev/null @@ -1,79 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID NBS_RS_USERNAME NBS_RS_PASSWORD NBS_RS_LICENSE_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - secrets: [ nbs_rs_username, nbs_rs_password, nbs_rs_license_id ] - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/currency_rs/.flake8 b/modules/currency_rs/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/currency_rs/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/currency_rs/.isort.cfg b/modules/currency_rs/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/currency_rs/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/currency_rs/doc/conf.py b/modules/currency_rs/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/currency_rs/doc/conf.py +++ b/modules/currency_rs/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/currency_rs/setup.py b/modules/currency_rs/setup.py index 5a2e034ece..910a874d37 100755 --- a/modules/currency_rs/setup.py +++ b/modules/currency_rs/setup.py @@ -43,24 +43,7 @@ name = 'trytond_currency_rs' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['lxml', 'zeep'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -147,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/currency_rs/tox.ini b/modules/currency_rs/tox.ini index 4695a4a573..ac75921b1e 100644 --- a/modules/currency_rs/tox.ini +++ b/modules/currency_rs/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/customs/.drone.yml b/modules/customs/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/customs/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/customs/.flake8 b/modules/customs/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/customs/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/customs/.isort.cfg b/modules/customs/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/customs/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/customs/doc/conf.py b/modules/customs/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/customs/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/customs/setup.py b/modules/customs/setup.py index e940444e8e..5d18785368 100755 --- a/modules/customs/setup.py +++ b/modules/customs/setup.py @@ -40,23 +40,6 @@ name = 'trytond_customs' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['simpleeval', 'python-sql >= 0.4'] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module for customs', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/customs/tox.ini b/modules/customs/tox.ini index e3bf4722db..2b53163cb8 100644 --- a/modules/customs/tox.ini +++ b/modules/customs/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/dashboard/.drone.yml b/modules/dashboard/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/dashboard/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/dashboard/.flake8 b/modules/dashboard/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/dashboard/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/dashboard/.isort.cfg b/modules/dashboard/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/dashboard/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/dashboard/doc/conf.py b/modules/dashboard/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/dashboard/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/dashboard/setup.py b/modules/dashboard/setup.py index 47f444890a..f4687b993e 100755 --- a/modules/dashboard/setup.py +++ b/modules/dashboard/setup.py @@ -40,23 +40,6 @@ name = 'trytond_dashboard' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['lxml', 'python-sql >= 0.4'] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module for dashboard', @@ -135,7 +112,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/dashboard/tox.ini b/modules/dashboard/tox.ini index b0dddaa8b3..1a04c9e39b 100644 --- a/modules/dashboard/tox.ini +++ b/modules/dashboard/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/edocument_uncefact/.drone.yml b/modules/edocument_uncefact/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/edocument_uncefact/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/edocument_uncefact/.flake8 b/modules/edocument_uncefact/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/edocument_uncefact/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/edocument_uncefact/.isort.cfg b/modules/edocument_uncefact/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/edocument_uncefact/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/edocument_uncefact/doc/conf.py b/modules/edocument_uncefact/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/edocument_uncefact/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/edocument_uncefact/setup.py b/modules/edocument_uncefact/setup.py index 8872a2c75c..63fbd51ec4 100755 --- a/modules/edocument_uncefact/setup.py +++ b/modules/edocument_uncefact/setup.py @@ -40,23 +40,6 @@ name = 'trytond_edocument_uncefact' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['Genshi'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ tests_require = [ 'lxml', get_require_version('trytond_account_invoice'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/edocument_uncefact/tox.ini b/modules/edocument_uncefact/tox.ini index 8fd1cc36f2..3b38ad79bf 100644 --- a/modules/edocument_uncefact/tox.ini +++ b/modules/edocument_uncefact/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/edocument_unece/.drone.yml b/modules/edocument_unece/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/edocument_unece/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/edocument_unece/.flake8 b/modules/edocument_unece/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/edocument_unece/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/edocument_unece/.isort.cfg b/modules/edocument_unece/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/edocument_unece/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/edocument_unece/doc/conf.py b/modules/edocument_unece/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/edocument_unece/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/edocument_unece/setup.py b/modules/edocument_unece/setup.py index 50585c43fe..a87cd7f4d4 100755 --- a/modules/edocument_unece/setup.py +++ b/modules/edocument_unece/setup.py @@ -40,23 +40,6 @@ name = 'trytond_edocument_unece' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/edocument_unece/tox.ini b/modules/edocument_unece/tox.ini index 317e644f0c..1187c8f7a8 100644 --- a/modules/edocument_unece/tox.ini +++ b/modules/edocument_unece/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/google_maps/.drone.yml b/modules/google_maps/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/google_maps/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/google_maps/.flake8 b/modules/google_maps/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/google_maps/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/google_maps/.isort.cfg b/modules/google_maps/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/google_maps/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/google_maps/doc/conf.py b/modules/google_maps/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/google_maps/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/google_maps/setup.py b/modules/google_maps/setup.py index fb8b90d162..a9fbf96189 100755 --- a/modules/google_maps/setup.py +++ b/modules/google_maps/setup.py @@ -40,23 +40,6 @@ name = 'trytond_google_maps' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to link addresses to Google Maps', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/google_maps/tox.ini b/modules/google_maps/tox.ini index 1c5c9fe9e9..f7d9209250 100644 --- a/modules/google_maps/tox.ini +++ b/modules/google_maps/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/incoterm/.drone.yml b/modules/incoterm/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/incoterm/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/incoterm/.flake8 b/modules/incoterm/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/incoterm/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/incoterm/.isort.cfg b/modules/incoterm/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/incoterm/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/incoterm/doc/conf.py b/modules/incoterm/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/incoterm/doc/conf.py +++ b/modules/incoterm/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/incoterm/setup.py b/modules/incoterm/setup.py index 30babf5c2b..b26bfcc0d3 100755 --- a/modules/incoterm/setup.py +++ b/modules/incoterm/setup.py @@ -43,24 +43,7 @@ name = 'trytond_incoterm' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -81,12 +64,6 @@ tests_require = [ get_require_version('trytond_sale_invoice_grouping'), get_require_version('trytond_stock'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -159,7 +136,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/incoterm/tox.ini b/modules/incoterm/tox.ini index e295df7ee1..4ac6c1f3f2 100644 --- a/modules/incoterm/tox.ini +++ b/modules/incoterm/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/ldap_authentication/.drone.yml b/modules/ldap_authentication/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/ldap_authentication/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/ldap_authentication/.flake8 b/modules/ldap_authentication/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/ldap_authentication/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/ldap_authentication/.isort.cfg b/modules/ldap_authentication/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/ldap_authentication/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/ldap_authentication/doc/conf.py b/modules/ldap_authentication/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/ldap_authentication/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/ldap_authentication/setup.py b/modules/ldap_authentication/setup.py index 0e4e8b0275..246d1315e6 100755 --- a/modules/ldap_authentication/setup.py +++ b/modules/ldap_authentication/setup.py @@ -40,23 +40,6 @@ name = 'trytond_ldap_authentication' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['ldap3 >= 2.0.7'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/ldap_authentication/tox.ini b/modules/ldap_authentication/tox.ini index 5ae7e1dddd..570140bc65 100644 --- a/modules/ldap_authentication/tox.ini +++ b/modules/ldap_authentication/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/marketing/.drone.yml b/modules/marketing/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/marketing/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/marketing/.flake8 b/modules/marketing/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/marketing/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/marketing/.isort.cfg b/modules/marketing/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/marketing/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/marketing/doc/conf.py b/modules/marketing/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/marketing/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/marketing/setup.py b/modules/marketing/setup.py index 7c9fdebb09..10bf119964 100755 --- a/modules/marketing/setup.py +++ b/modules/marketing/setup.py @@ -40,23 +40,6 @@ name = 'trytond_marketing' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/marketing/tox.ini b/modules/marketing/tox.ini index 2dac7a2a4c..b699b499cf 100644 --- a/modules/marketing/tox.ini +++ b/modules/marketing/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/marketing_automation/.drone.yml b/modules/marketing_automation/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/marketing_automation/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/marketing_automation/.flake8 b/modules/marketing_automation/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/marketing_automation/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/marketing_automation/.isort.cfg b/modules/marketing_automation/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/marketing_automation/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/marketing_automation/doc/conf.py b/modules/marketing_automation/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/marketing_automation/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/marketing_automation/setup.py b/modules/marketing_automation/setup.py index 03001cd1b5..2a2dc49d55 100755 --- a/modules/marketing_automation/setup.py +++ b/modules/marketing_automation/setup.py @@ -40,23 +40,6 @@ name = 'trytond_marketing_automation' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['werkzeug', 'Genshi'] for dep in info.get('depends', []): @@ -67,11 +50,6 @@ requires.append(get_require_version('trytond')) tests_require = [ get_require_version('proteus'), get_require_version('trytond_sale')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/marketing_automation/tox.ini b/modules/marketing_automation/tox.ini index 5492e6d4d0..05dfc8f510 100644 --- a/modules/marketing_automation/tox.ini +++ b/modules/marketing_automation/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/marketing_campaign/.drone.yml b/modules/marketing_campaign/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/marketing_campaign/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/marketing_campaign/.flake8 b/modules/marketing_campaign/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/marketing_campaign/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/marketing_campaign/.isort.cfg b/modules/marketing_campaign/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/marketing_campaign/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/marketing_campaign/doc/conf.py b/modules/marketing_campaign/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/marketing_campaign/doc/conf.py +++ b/modules/marketing_campaign/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/marketing_campaign/setup.py b/modules/marketing_campaign/setup.py index 067167f76d..78d5d3a203 100755 --- a/modules/marketing_campaign/setup.py +++ b/modules/marketing_campaign/setup.py @@ -43,24 +43,7 @@ name = 'trytond_marketing_campaign' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -73,12 +56,6 @@ tests_require = [ get_require_version('trytond_sale_opportunity'), get_require_version('trytond_sale_point'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -152,7 +129,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/marketing_campaign/tox.ini b/modules/marketing_campaign/tox.ini index 8bde8f9097..a0641034e7 100644 --- a/modules/marketing_campaign/tox.ini +++ b/modules/marketing_campaign/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/marketing_email/.drone.yml b/modules/marketing_email/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/marketing_email/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/marketing_email/.flake8 b/modules/marketing_email/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/marketing_email/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/marketing_email/.isort.cfg b/modules/marketing_email/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/marketing_email/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/marketing_email/doc/conf.py b/modules/marketing_email/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/marketing_email/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/marketing_email/setup.py b/modules/marketing_email/setup.py index e0c9fbfb17..3febc1996b 100755 --- a/modules/marketing_email/setup.py +++ b/modules/marketing_email/setup.py @@ -40,23 +40,6 @@ name = 'trytond_marketing_email' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +118,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/marketing_email/tox.ini b/modules/marketing_email/tox.ini index 63c9aeba13..102177cb46 100644 --- a/modules/marketing_email/tox.ini +++ b/modules/marketing_email/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/notification_email/.drone.yml b/modules/notification_email/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/notification_email/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/notification_email/.flake8 b/modules/notification_email/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/notification_email/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/notification_email/.isort.cfg b/modules/notification_email/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/notification_email/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/notification_email/doc/conf.py b/modules/notification_email/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/notification_email/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/notification_email/setup.py b/modules/notification_email/setup.py index ab97a3ec26..d3372e4028 100755 --- a/modules/notification_email/setup.py +++ b/modules/notification_email/setup.py @@ -40,23 +40,6 @@ name = 'trytond_notification_email' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['Genshi'] for dep in info.get('depends', []): @@ -70,11 +53,6 @@ tests_require = [ get_require_version('trytond_party'), get_require_version('trytond_web_user'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/notification_email/tox.ini b/modules/notification_email/tox.ini index 8b6c42b308..887e4e9dfd 100644 --- a/modules/notification_email/tox.ini +++ b/modules/notification_email/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/party/.drone.yml b/modules/party/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/party/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/party/.flake8 b/modules/party/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/party/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/party/.isort.cfg b/modules/party/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/party/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/party/doc/conf.py b/modules/party/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/party/doc/conf.py +++ b/modules/party/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/party/setup.py b/modules/party/setup.py index f4dacb6fbe..408f2b440f 100755 --- a/modules/party/setup.py +++ b/modules/party/setup.py @@ -43,23 +43,6 @@ name = 'trytond_party' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4', 'python-stdnum >= 1.15'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), 'phonenumbers'] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -147,7 +125,6 @@ setup(name=name, 'VIES': ['python-stdnum[SOAP]'], 'phonenumbers': ['phonenumbers'], }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/party/tox.ini b/modules/party/tox.ini index 7a6b33f941..008df314b4 100644 --- a/modules/party/tox.ini +++ b/modules/party/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/party_avatar/.drone.yml b/modules/party_avatar/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/party_avatar/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/party_avatar/.flake8 b/modules/party_avatar/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/party_avatar/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/party_avatar/.isort.cfg b/modules/party_avatar/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/party_avatar/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/party_avatar/doc/conf.py b/modules/party_avatar/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/party_avatar/doc/conf.py +++ b/modules/party_avatar/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/party_avatar/setup.py b/modules/party_avatar/setup.py index 8a6e853856..fd7b8ebae2 100755 --- a/modules/party_avatar/setup.py +++ b/modules/party_avatar/setup.py @@ -43,24 +43,7 @@ name = 'trytond_party_avatar' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('trytond_company')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -147,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/party_avatar/tox.ini b/modules/party_avatar/tox.ini index 108fd2fdf0..27ff0fc7c8 100644 --- a/modules/party_avatar/tox.ini +++ b/modules/party_avatar/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/party_relationship/.drone.yml b/modules/party_relationship/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/party_relationship/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/party_relationship/.flake8 b/modules/party_relationship/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/party_relationship/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/party_relationship/.isort.cfg b/modules/party_relationship/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/party_relationship/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/party_relationship/doc/conf.py b/modules/party_relationship/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/party_relationship/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/party_relationship/setup.py b/modules/party_relationship/setup.py index 86c9132242..a0405f3933 100755 --- a/modules/party_relationship/setup.py +++ b/modules/party_relationship/setup.py @@ -40,23 +40,6 @@ name = 'trytond_party_relationship' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/party_relationship/tox.ini b/modules/party_relationship/tox.ini index 434cb841e3..64c5dfc1c2 100644 --- a/modules/party_relationship/tox.ini +++ b/modules/party_relationship/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/party_siret/.drone.yml b/modules/party_siret/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/party_siret/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/party_siret/.flake8 b/modules/party_siret/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/party_siret/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/party_siret/.isort.cfg b/modules/party_siret/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/party_siret/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/party_siret/doc/conf.py b/modules/party_siret/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/party_siret/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/party_siret/setup.py b/modules/party_siret/setup.py index d4b836bc7d..42832f3ae7 100755 --- a/modules/party_siret/setup.py +++ b/modules/party_siret/setup.py @@ -40,23 +40,6 @@ name = 'trytond_party_siret' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to add SIRET/SIREN on parties', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/party_siret/tox.ini b/modules/party_siret/tox.ini index eaa40aee78..7a053dda4e 100644 --- a/modules/party_siret/tox.ini +++ b/modules/party_siret/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product/.drone.yml b/modules/product/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/product/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product/.flake8 b/modules/product/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product/.isort.cfg b/modules/product/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product/doc/conf.py b/modules/product/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/product/doc/conf.py +++ b/modules/product/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product/setup.py b/modules/product/setup.py index 8633cf5a32..87b12af9ef 100755 --- a/modules/product/setup.py +++ b/modules/product/setup.py @@ -43,23 +43,6 @@ name = 'trytond_product' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql', 'python-stdnum'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product/tox.ini b/modules/product/tox.ini index ffb16c68d1..e75de37773 100644 --- a/modules/product/tox.ini +++ b/modules/product/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_attribute/.drone.yml b/modules/product_attribute/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/product_attribute/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_attribute/.flake8 b/modules/product_attribute/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_attribute/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_attribute/.isort.cfg b/modules/product_attribute/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_attribute/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_attribute/doc/conf.py b/modules/product_attribute/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/product_attribute/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_attribute/setup.py b/modules/product_attribute/setup.py index efdabb9898..10bd3aea74 100755 --- a/modules/product_attribute/setup.py +++ b/modules/product_attribute/setup.py @@ -40,23 +40,6 @@ name = 'trytond_product_attribute' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module with product attributes', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_attribute/tox.ini b/modules/product_attribute/tox.ini index 44aeebad64..bacaad6214 100644 --- a/modules/product_attribute/tox.ini +++ b/modules/product_attribute/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_classification/.drone.yml b/modules/product_classification/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/product_classification/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_classification/.flake8 b/modules/product_classification/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_classification/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_classification/.isort.cfg b/modules/product_classification/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_classification/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_classification/doc/conf.py b/modules/product_classification/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/product_classification/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_classification/setup.py b/modules/product_classification/setup.py index 503d306c80..71f0b3288c 100755 --- a/modules/product_classification/setup.py +++ b/modules/product_classification/setup.py @@ -40,23 +40,6 @@ name = 'trytond_product_classification' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to implement product classification', @@ -135,7 +112,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_classification/tox.ini b/modules/product_classification/tox.ini index f7f92ce79b..cf46790a2c 100644 --- a/modules/product_classification/tox.ini +++ b/modules/product_classification/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_classification_taxonomic/.drone.yml b/modules/product_classification_taxonomic/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/product_classification_taxonomic/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_classification_taxonomic/.flake8 b/modules/product_classification_taxonomic/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_classification_taxonomic/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_classification_taxonomic/.isort.cfg b/modules/product_classification_taxonomic/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_classification_taxonomic/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_classification_taxonomic/doc/conf.py b/modules/product_classification_taxonomic/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/product_classification_taxonomic/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_classification_taxonomic/setup.py b/modules/product_classification_taxonomic/setup.py index 523bb98e65..2417be135b 100755 --- a/modules/product_classification_taxonomic/setup.py +++ b/modules/product_classification_taxonomic/setup.py @@ -40,23 +40,6 @@ name = 'trytond_product_classification_taxonomic' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to implement product classification taxonomic', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_classification_taxonomic/tox.ini b/modules/product_classification_taxonomic/tox.ini index 1066baebbb..c71a460617 100644 --- a/modules/product_classification_taxonomic/tox.ini +++ b/modules/product_classification_taxonomic/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_cost_fifo/.drone.yml b/modules/product_cost_fifo/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/product_cost_fifo/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_cost_fifo/.flake8 b/modules/product_cost_fifo/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_cost_fifo/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_cost_fifo/.isort.cfg b/modules/product_cost_fifo/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_cost_fifo/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_cost_fifo/doc/conf.py b/modules/product_cost_fifo/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/product_cost_fifo/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_cost_fifo/setup.py b/modules/product_cost_fifo/setup.py index 1d7b4ec4ec..6546ff0aa4 100755 --- a/modules/product_cost_fifo/setup.py +++ b/modules/product_cost_fifo/setup.py @@ -40,23 +40,6 @@ name = 'trytond_product_cost_fifo' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_cost_fifo/tox.ini b/modules/product_cost_fifo/tox.ini index 29da5300d4..e36b9658e8 100644 --- a/modules/product_cost_fifo/tox.ini +++ b/modules/product_cost_fifo/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_cost_history/.drone.yml b/modules/product_cost_history/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/product_cost_history/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_cost_history/.flake8 b/modules/product_cost_history/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_cost_history/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_cost_history/.isort.cfg b/modules/product_cost_history/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_cost_history/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_cost_history/doc/conf.py b/modules/product_cost_history/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/product_cost_history/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_cost_history/setup.py b/modules/product_cost_history/setup.py index b793131c9e..c5a8e521ba 100755 --- a/modules/product_cost_history/setup.py +++ b/modules/product_cost_history/setup.py @@ -40,23 +40,6 @@ name = 'trytond_product_cost_history' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_cost_history/tox.ini b/modules/product_cost_history/tox.ini index 7434e5fa3d..3eb5838999 100644 --- a/modules/product_cost_history/tox.ini +++ b/modules/product_cost_history/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_cost_warehouse/.drone.yml b/modules/product_cost_warehouse/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/product_cost_warehouse/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_cost_warehouse/.flake8 b/modules/product_cost_warehouse/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_cost_warehouse/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_cost_warehouse/.isort.cfg b/modules/product_cost_warehouse/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_cost_warehouse/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_cost_warehouse/doc/conf.py b/modules/product_cost_warehouse/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/product_cost_warehouse/doc/conf.py +++ b/modules/product_cost_warehouse/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_cost_warehouse/setup.py b/modules/product_cost_warehouse/setup.py index 048cb9e8e9..3e47458ca0 100755 --- a/modules/product_cost_warehouse/setup.py +++ b/modules/product_cost_warehouse/setup.py @@ -43,23 +43,6 @@ name = 'trytond_product_cost_warehouse' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -74,11 +57,6 @@ tests_require = [ get_require_version('trytond_product_cost_history'), get_require_version('trytond_account_stock_continental'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -152,7 +130,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_cost_warehouse/tox.ini b/modules/product_cost_warehouse/tox.ini index ebf2d7f419..3a3c46a1a7 100644 --- a/modules/product_cost_warehouse/tox.ini +++ b/modules/product_cost_warehouse/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_image/.drone.yml b/modules/product_image/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/product_image/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_image/.flake8 b/modules/product_image/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_image/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_image/.isort.cfg b/modules/product_image/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_image/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_image/doc/conf.py b/modules/product_image/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/product_image/doc/conf.py +++ b/modules/product_image/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_image/setup.py b/modules/product_image/setup.py index 8de5b20a0c..3ccb71d13d 100755 --- a/modules/product_image/setup.py +++ b/modules/product_image/setup.py @@ -43,24 +43,7 @@ name = 'trytond_product_image' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['pillow'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -147,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_image/tox.ini b/modules/product_image/tox.ini index cc39b2afe6..0f9f5e5573 100644 --- a/modules/product_image/tox.ini +++ b/modules/product_image/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_image_attribute/.drone.yml b/modules/product_image_attribute/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/product_image_attribute/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_image_attribute/.flake8 b/modules/product_image_attribute/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_image_attribute/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_image_attribute/.isort.cfg b/modules/product_image_attribute/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_image_attribute/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_image_attribute/doc/conf.py b/modules/product_image_attribute/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/product_image_attribute/doc/conf.py +++ b/modules/product_image_attribute/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_image_attribute/setup.py b/modules/product_image_attribute/setup.py index 206c290a2c..d961c75ab8 100755 --- a/modules/product_image_attribute/setup.py +++ b/modules/product_image_attribute/setup.py @@ -43,24 +43,7 @@ name = 'trytond_product_image_attribute' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -148,7 +125,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_image_attribute/tox.ini b/modules/product_image_attribute/tox.ini index fe14ce7781..304da4d551 100644 --- a/modules/product_image_attribute/tox.ini +++ b/modules/product_image_attribute/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_kit/.drone.yml b/modules/product_kit/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/product_kit/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_kit/.flake8 b/modules/product_kit/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_kit/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_kit/.isort.cfg b/modules/product_kit/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_kit/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_kit/doc/conf.py b/modules/product_kit/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/product_kit/doc/conf.py +++ b/modules/product_kit/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_kit/setup.py b/modules/product_kit/setup.py index c9e9407a70..d087ff6eed 100755 --- a/modules/product_kit/setup.py +++ b/modules/product_kit/setup.py @@ -43,23 +43,6 @@ name = 'trytond_product_kit' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -76,11 +59,6 @@ tests_require = [ get_require_version('trytond_sale'), get_require_version('trytond_stock'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -154,7 +132,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_kit/tox.ini b/modules/product_kit/tox.ini index 1e6263ce7b..9289210653 100644 --- a/modules/product_kit/tox.ini +++ b/modules/product_kit/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_measurements/.drone.yml b/modules/product_measurements/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/product_measurements/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_measurements/.flake8 b/modules/product_measurements/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_measurements/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_measurements/.isort.cfg b/modules/product_measurements/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_measurements/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_measurements/doc/conf.py b/modules/product_measurements/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/product_measurements/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_measurements/setup.py b/modules/product_measurements/setup.py index 9e05e19b99..25358bbffd 100755 --- a/modules/product_measurements/setup.py +++ b/modules/product_measurements/setup.py @@ -40,23 +40,6 @@ name = 'trytond_product_measurements' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to add measurements to product', @@ -138,7 +115,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_measurements/tox.ini b/modules/product_measurements/tox.ini index 3a3b6ce4bf..b596c7b2f2 100644 --- a/modules/product_measurements/tox.ini +++ b/modules/product_measurements/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_price_list/.drone.yml b/modules/product_price_list/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/product_price_list/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_price_list/.flake8 b/modules/product_price_list/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_price_list/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_price_list/.isort.cfg b/modules/product_price_list/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_price_list/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_price_list/doc/conf.py b/modules/product_price_list/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/product_price_list/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_price_list/setup.py b/modules/product_price_list/setup.py index 2757ca91bb..a2d4c059b7 100755 --- a/modules/product_price_list/setup.py +++ b/modules/product_price_list/setup.py @@ -40,23 +40,6 @@ name = 'trytond_product_price_list' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['simpleeval', 'python-sql >= 0.4'] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module with price list', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_price_list/tox.ini b/modules/product_price_list/tox.ini index 39ad562d8c..12d9bf527d 100644 --- a/modules/product_price_list/tox.ini +++ b/modules/product_price_list/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_price_list_dates/.drone.yml b/modules/product_price_list_dates/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/product_price_list_dates/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_price_list_dates/.flake8 b/modules/product_price_list_dates/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_price_list_dates/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_price_list_dates/.isort.cfg b/modules/product_price_list_dates/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_price_list_dates/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_price_list_dates/doc/conf.py b/modules/product_price_list_dates/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/product_price_list_dates/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_price_list_dates/setup.py b/modules/product_price_list_dates/setup.py index 8826efa089..a2b2fa9ccf 100755 --- a/modules/product_price_list_dates/setup.py +++ b/modules/product_price_list_dates/setup.py @@ -40,23 +40,6 @@ name = 'trytond_product_price_list_dates' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('trytond_sale_price_list')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_price_list_dates/tox.ini b/modules/product_price_list_dates/tox.ini index d45035e252..686b47e85c 100644 --- a/modules/product_price_list_dates/tox.ini +++ b/modules/product_price_list_dates/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/product_price_list_parent/.drone.yml b/modules/product_price_list_parent/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/product_price_list_parent/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/product_price_list_parent/.flake8 b/modules/product_price_list_parent/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/product_price_list_parent/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/product_price_list_parent/.isort.cfg b/modules/product_price_list_parent/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/product_price_list_parent/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/product_price_list_parent/doc/conf.py b/modules/product_price_list_parent/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/product_price_list_parent/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/product_price_list_parent/setup.py b/modules/product_price_list_parent/setup.py index f7f365dd81..0312e08a9b 100755 --- a/modules/product_price_list_parent/setup.py +++ b/modules/product_price_list_parent/setup.py @@ -40,23 +40,6 @@ name = 'trytond_product_price_list_parent' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/product_price_list_parent/tox.ini b/modules/product_price_list_parent/tox.ini index 69e2c1096d..2b8b210481 100644 --- a/modules/product_price_list_parent/tox.ini +++ b/modules/product_price_list_parent/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/production/.drone.yml b/modules/production/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/production/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/production/.flake8 b/modules/production/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/production/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/production/.isort.cfg b/modules/production/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/production/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/production/doc/conf.py b/modules/production/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/production/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/production/setup.py b/modules/production/setup.py index 066c21b486..ca4ee9aa33 100755 --- a/modules/production/setup.py +++ b/modules/production/setup.py @@ -40,23 +40,6 @@ name = 'trytond_production' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/production/tox.ini b/modules/production/tox.ini index fbf6f6c4c3..7092fa550e 100644 --- a/modules/production/tox.ini +++ b/modules/production/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/production_outsourcing/.drone.yml b/modules/production_outsourcing/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/production_outsourcing/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/production_outsourcing/.flake8 b/modules/production_outsourcing/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/production_outsourcing/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/production_outsourcing/.isort.cfg b/modules/production_outsourcing/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/production_outsourcing/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/production_outsourcing/doc/conf.py b/modules/production_outsourcing/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/production_outsourcing/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/production_outsourcing/setup.py b/modules/production_outsourcing/setup.py index be4704b53e..58256c2702 100755 --- a/modules/production_outsourcing/setup.py +++ b/modules/production_outsourcing/setup.py @@ -40,23 +40,6 @@ name = 'trytond_production_outsourcing' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/production_outsourcing/tox.ini b/modules/production_outsourcing/tox.ini index d610df0a09..fe5f4e9e0f 100644 --- a/modules/production_outsourcing/tox.ini +++ b/modules/production_outsourcing/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/production_routing/.drone.yml b/modules/production_routing/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/production_routing/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/production_routing/.flake8 b/modules/production_routing/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/production_routing/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/production_routing/.isort.cfg b/modules/production_routing/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/production_routing/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/production_routing/doc/conf.py b/modules/production_routing/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/production_routing/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/production_routing/setup.py b/modules/production_routing/setup.py index 1806cb8dd9..c86bc9bc20 100755 --- a/modules/production_routing/setup.py +++ b/modules/production_routing/setup.py @@ -40,23 +40,6 @@ name = 'trytond_production_routing' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_stock_supply_production'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/production_routing/tox.ini b/modules/production_routing/tox.ini index 7f9be2e955..60cf15fb0e 100644 --- a/modules/production_routing/tox.ini +++ b/modules/production_routing/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/production_split/.drone.yml b/modules/production_split/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/production_split/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/production_split/.flake8 b/modules/production_split/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/production_split/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/production_split/.isort.cfg b/modules/production_split/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/production_split/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/production_split/doc/conf.py b/modules/production_split/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/production_split/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/production_split/setup.py b/modules/production_split/setup.py index e5bfa3514b..4d544157d2 100755 --- a/modules/production_split/setup.py +++ b/modules/production_split/setup.py @@ -40,23 +40,6 @@ name = 'trytond_production_split' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/production_split/tox.ini b/modules/production_split/tox.ini index 04104cd2a3..7961ae23ca 100644 --- a/modules/production_split/tox.ini +++ b/modules/production_split/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/production_work/.drone.yml b/modules/production_work/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/production_work/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/production_work/.flake8 b/modules/production_work/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/production_work/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/production_work/.isort.cfg b/modules/production_work/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/production_work/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/production_work/doc/conf.py b/modules/production_work/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/production_work/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/production_work/setup.py b/modules/production_work/setup.py index d00a55b3f3..15bc74ba4d 100755 --- a/modules/production_work/setup.py +++ b/modules/production_work/setup.py @@ -40,23 +40,6 @@ name = 'trytond_production_work' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/production_work/tox.ini b/modules/production_work/tox.ini index c93a8c3dc6..fba99cab1f 100644 --- a/modules/production_work/tox.ini +++ b/modules/production_work/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/production_work_timesheet/.drone.yml b/modules/production_work_timesheet/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/production_work_timesheet/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/production_work_timesheet/.flake8 b/modules/production_work_timesheet/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/production_work_timesheet/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/production_work_timesheet/.isort.cfg b/modules/production_work_timesheet/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/production_work_timesheet/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/production_work_timesheet/doc/conf.py b/modules/production_work_timesheet/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/production_work_timesheet/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/production_work_timesheet/setup.py b/modules/production_work_timesheet/setup.py index 8b86316f49..8578409559 100755 --- a/modules/production_work_timesheet/setup.py +++ b/modules/production_work_timesheet/setup.py @@ -40,23 +40,6 @@ name = 'trytond_production_work_timesheet' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/production_work_timesheet/tox.ini b/modules/production_work_timesheet/tox.ini index 2c840d6d30..a228658598 100644 --- a/modules/production_work_timesheet/tox.ini +++ b/modules/production_work_timesheet/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/project/.drone.yml b/modules/project/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/project/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/project/.flake8 b/modules/project/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/project/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/project/.isort.cfg b/modules/project/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/project/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/project/doc/conf.py b/modules/project/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/project/doc/conf.py +++ b/modules/project/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/project/setup.py b/modules/project/setup.py index 7b456c8f38..4afdb0558f 100755 --- a/modules/project/setup.py +++ b/modules/project/setup.py @@ -43,23 +43,6 @@ name = 'trytond_project' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/project/tox.ini b/modules/project/tox.ini index 591d959342..b77e0305c5 100644 --- a/modules/project/tox.ini +++ b/modules/project/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/project_invoice/.drone.yml b/modules/project_invoice/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/project_invoice/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/project_invoice/.flake8 b/modules/project_invoice/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/project_invoice/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/project_invoice/.isort.cfg b/modules/project_invoice/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/project_invoice/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/project_invoice/doc/conf.py b/modules/project_invoice/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/project_invoice/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/project_invoice/setup.py b/modules/project_invoice/setup.py index 2dfc90e0e8..a759dba0e0 100755 --- a/modules/project_invoice/setup.py +++ b/modules/project_invoice/setup.py @@ -40,23 +40,6 @@ name = 'trytond_project_invoice' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/project_invoice/tox.ini b/modules/project_invoice/tox.ini index eaf996867d..9712975676 100644 --- a/modules/project_invoice/tox.ini +++ b/modules/project_invoice/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/project_plan/.drone.yml b/modules/project_plan/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/project_plan/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/project_plan/.flake8 b/modules/project_plan/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/project_plan/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/project_plan/.isort.cfg b/modules/project_plan/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/project_plan/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/project_plan/doc/conf.py b/modules/project_plan/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/project_plan/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/project_plan/setup.py b/modules/project_plan/setup.py index fabef9e214..9d841cbd93 100755 --- a/modules/project_plan/setup.py +++ b/modules/project_plan/setup.py @@ -40,23 +40,6 @@ name = 'trytond_project_plan' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to add planning capabilities on projects', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/project_plan/tox.ini b/modules/project_plan/tox.ini index 10c245f98e..5a183ce447 100644 --- a/modules/project_plan/tox.ini +++ b/modules/project_plan/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/project_revenue/.drone.yml b/modules/project_revenue/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/project_revenue/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/project_revenue/.flake8 b/modules/project_revenue/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/project_revenue/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/project_revenue/.isort.cfg b/modules/project_revenue/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/project_revenue/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/project_revenue/doc/conf.py b/modules/project_revenue/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/project_revenue/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/project_revenue/setup.py b/modules/project_revenue/setup.py index 55e4c819e1..161b7895e0 100755 --- a/modules/project_revenue/setup.py +++ b/modules/project_revenue/setup.py @@ -40,23 +40,6 @@ name = 'trytond_project_revenue' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -66,11 +49,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), get_require_version('trytond_purchase')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/project_revenue/tox.ini b/modules/project_revenue/tox.ini index 2393d92ed8..fcb955a358 100644 --- a/modules/project_revenue/tox.ini +++ b/modules/project_revenue/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase/.drone.yml b/modules/purchase/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/purchase/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase/.flake8 b/modules/purchase/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase/.isort.cfg b/modules/purchase/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase/doc/conf.py b/modules/purchase/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/purchase/doc/conf.py +++ b/modules/purchase/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase/setup.py b/modules/purchase/setup.py index e45c618cf2..9e187fa607 100755 --- a/modules/purchase/setup.py +++ b/modules/purchase/setup.py @@ -43,23 +43,6 @@ name = 'trytond_purchase' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, 'sparklines': ['pygal'], 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase/tox.ini b/modules/purchase/tox.ini index 677b1d26a4..d40e0b9e38 100644 --- a/modules/purchase/tox.ini +++ b/modules/purchase/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_amendment/.drone.yml b/modules/purchase_amendment/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/purchase_amendment/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_amendment/.flake8 b/modules/purchase_amendment/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_amendment/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_amendment/.isort.cfg b/modules/purchase_amendment/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_amendment/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_amendment/doc/conf.py b/modules/purchase_amendment/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/purchase_amendment/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_amendment/setup.py b/modules/purchase_amendment/setup.py index b166e70ec4..0d89706a7b 100755 --- a/modules/purchase_amendment/setup.py +++ b/modules/purchase_amendment/setup.py @@ -40,23 +40,6 @@ name = 'trytond_purchase_amendment' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_amendment/tox.ini b/modules/purchase_amendment/tox.ini index d8aff22a32..81962901c9 100644 --- a/modules/purchase_amendment/tox.ini +++ b/modules/purchase_amendment/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_blanket_agreement/.drone.yml b/modules/purchase_blanket_agreement/.drone.yml deleted file mode 100644 index 25369fb040..0000000000 --- a/modules/purchase_blanket_agreement/.drone.yml +++ /dev/null @@ -1,76 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_blanket_agreement/.flake8 b/modules/purchase_blanket_agreement/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_blanket_agreement/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_blanket_agreement/.isort.cfg b/modules/purchase_blanket_agreement/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_blanket_agreement/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_blanket_agreement/doc/conf.py b/modules/purchase_blanket_agreement/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/purchase_blanket_agreement/doc/conf.py +++ b/modules/purchase_blanket_agreement/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_blanket_agreement/setup.py b/modules/purchase_blanket_agreement/setup.py index 571df199fb..e664e84b07 100755 --- a/modules/purchase_blanket_agreement/setup.py +++ b/modules/purchase_blanket_agreement/setup.py @@ -43,24 +43,7 @@ name = 'trytond_purchase_blanket_agreement' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -70,12 +53,6 @@ requires.append(get_require_version('trytond')) tests_require = [ get_require_version('proteus'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -151,7 +128,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_blanket_agreement/tox.ini b/modules/purchase_blanket_agreement/tox.ini index e20c218a6b..7a25674108 100644 --- a/modules/purchase_blanket_agreement/tox.ini +++ b/modules/purchase_blanket_agreement/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_history/.drone.yml b/modules/purchase_history/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/purchase_history/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_history/.flake8 b/modules/purchase_history/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_history/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_history/.isort.cfg b/modules/purchase_history/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_history/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_history/doc/conf.py b/modules/purchase_history/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/purchase_history/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_history/setup.py b/modules/purchase_history/setup.py index 00bb937d0e..a2cedbf3b4 100755 --- a/modules/purchase_history/setup.py +++ b/modules/purchase_history/setup.py @@ -40,23 +40,6 @@ name = 'trytond_purchase_history' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +118,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_history/tox.ini b/modules/purchase_history/tox.ini index a230b228b6..f958ebd334 100644 --- a/modules/purchase_history/tox.ini +++ b/modules/purchase_history/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_invoice_line_standalone/.drone.yml b/modules/purchase_invoice_line_standalone/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/purchase_invoice_line_standalone/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_invoice_line_standalone/.flake8 b/modules/purchase_invoice_line_standalone/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_invoice_line_standalone/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_invoice_line_standalone/.isort.cfg b/modules/purchase_invoice_line_standalone/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_invoice_line_standalone/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_invoice_line_standalone/doc/conf.py b/modules/purchase_invoice_line_standalone/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/purchase_invoice_line_standalone/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_invoice_line_standalone/setup.py b/modules/purchase_invoice_line_standalone/setup.py index fdaa278d91..ca7c5036a8 100755 --- a/modules/purchase_invoice_line_standalone/setup.py +++ b/modules/purchase_invoice_line_standalone/setup.py @@ -40,23 +40,6 @@ name = 'trytond_purchase_invoice_line_standalone' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_invoice_line_standalone/tox.ini b/modules/purchase_invoice_line_standalone/tox.ini index 8fdb2c432a..04a66b8edb 100644 --- a/modules/purchase_invoice_line_standalone/tox.ini +++ b/modules/purchase_invoice_line_standalone/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_price_list/.drone.yml b/modules/purchase_price_list/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/purchase_price_list/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_price_list/.flake8 b/modules/purchase_price_list/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_price_list/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_price_list/.isort.cfg b/modules/purchase_price_list/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_price_list/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_price_list/doc/conf.py b/modules/purchase_price_list/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/purchase_price_list/doc/conf.py +++ b/modules/purchase_price_list/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_price_list/setup.py b/modules/purchase_price_list/setup.py index 8d5bb6d513..83e79c62ce 100755 --- a/modules/purchase_price_list/setup.py +++ b/modules/purchase_price_list/setup.py @@ -43,24 +43,7 @@ name = 'trytond_purchase_price_list' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -147,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_price_list/tox.ini b/modules/purchase_price_list/tox.ini index 3fbfe00113..90a7e6f8b7 100644 --- a/modules/purchase_price_list/tox.ini +++ b/modules/purchase_price_list/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_product_quantity/.drone.yml b/modules/purchase_product_quantity/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/purchase_product_quantity/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_product_quantity/.flake8 b/modules/purchase_product_quantity/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_product_quantity/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_product_quantity/.isort.cfg b/modules/purchase_product_quantity/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_product_quantity/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_product_quantity/doc/conf.py b/modules/purchase_product_quantity/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/purchase_product_quantity/doc/conf.py +++ b/modules/purchase_product_quantity/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_product_quantity/setup.py b/modules/purchase_product_quantity/setup.py index a463ce8204..3a57a6eb4a 100755 --- a/modules/purchase_product_quantity/setup.py +++ b/modules/purchase_product_quantity/setup.py @@ -43,24 +43,7 @@ name = 'trytond_purchase_product_quantity' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -71,12 +54,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_stock_supply'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -152,7 +129,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_product_quantity/tox.ini b/modules/purchase_product_quantity/tox.ini index 4634f3abd6..ec708bcacf 100644 --- a/modules/purchase_product_quantity/tox.ini +++ b/modules/purchase_product_quantity/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_request/.drone.yml b/modules/purchase_request/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/purchase_request/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_request/.flake8 b/modules/purchase_request/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_request/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_request/.isort.cfg b/modules/purchase_request/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_request/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_request/doc/conf.py b/modules/purchase_request/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/purchase_request/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_request/setup.py b/modules/purchase_request/setup.py index 5699d95aad..0f73e5b88e 100755 --- a/modules/purchase_request/setup.py +++ b/modules/purchase_request/setup.py @@ -40,23 +40,6 @@ name = 'trytond_purchase_request' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -66,11 +49,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('trytond_stock_supply'), get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_request/tox.ini b/modules/purchase_request/tox.ini index aa70ded76e..ca74a8e9d3 100644 --- a/modules/purchase_request/tox.ini +++ b/modules/purchase_request/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_request_quotation/.drone.yml b/modules/purchase_request_quotation/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/purchase_request_quotation/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_request_quotation/.flake8 b/modules/purchase_request_quotation/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_request_quotation/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_request_quotation/.isort.cfg b/modules/purchase_request_quotation/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_request_quotation/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_request_quotation/doc/conf.py b/modules/purchase_request_quotation/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/purchase_request_quotation/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_request_quotation/setup.py b/modules/purchase_request_quotation/setup.py index e8a0171b0d..e0ae53df9c 100755 --- a/modules/purchase_request_quotation/setup.py +++ b/modules/purchase_request_quotation/setup.py @@ -40,23 +40,6 @@ name = 'trytond_purchase_request_quotation' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_purchase_requisition'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_request_quotation/tox.ini b/modules/purchase_request_quotation/tox.ini index 9932753e12..1799933596 100644 --- a/modules/purchase_request_quotation/tox.ini +++ b/modules/purchase_request_quotation/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_requisition/.drone.yml b/modules/purchase_requisition/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/purchase_requisition/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_requisition/.flake8 b/modules/purchase_requisition/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_requisition/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_requisition/.isort.cfg b/modules/purchase_requisition/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_requisition/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_requisition/doc/conf.py b/modules/purchase_requisition/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/purchase_requisition/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_requisition/setup.py b/modules/purchase_requisition/setup.py index f3220fb759..0e17a789f9 100755 --- a/modules/purchase_requisition/setup.py +++ b/modules/purchase_requisition/setup.py @@ -40,23 +40,6 @@ name = 'trytond_purchase_requisition' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_requisition/tox.ini b/modules/purchase_requisition/tox.ini index 3fb4b501b8..08c666b909 100644 --- a/modules/purchase_requisition/tox.ini +++ b/modules/purchase_requisition/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_secondary_unit/.drone.yml b/modules/purchase_secondary_unit/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/purchase_secondary_unit/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_secondary_unit/.flake8 b/modules/purchase_secondary_unit/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_secondary_unit/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_secondary_unit/.isort.cfg b/modules/purchase_secondary_unit/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_secondary_unit/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_secondary_unit/doc/conf.py b/modules/purchase_secondary_unit/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/purchase_secondary_unit/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_secondary_unit/setup.py b/modules/purchase_secondary_unit/setup.py index 19e8a8b224..f3099c9e6a 100755 --- a/modules/purchase_secondary_unit/setup.py +++ b/modules/purchase_secondary_unit/setup.py @@ -40,23 +40,6 @@ name = 'trytond_purchase_secondary_unit' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -70,11 +53,6 @@ tests_require = [get_require_version('proteus'), get_require_version('trytond_purchase_request'), get_require_version('trytond_purchase_requisition'), get_require_version('trytond_stock_secondary_unit')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_secondary_unit/tox.ini b/modules/purchase_secondary_unit/tox.ini index c48ea18d62..2866e9a855 100644 --- a/modules/purchase_secondary_unit/tox.ini +++ b/modules/purchase_secondary_unit/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/purchase_shipment_cost/.drone.yml b/modules/purchase_shipment_cost/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/purchase_shipment_cost/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/purchase_shipment_cost/.flake8 b/modules/purchase_shipment_cost/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/purchase_shipment_cost/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/purchase_shipment_cost/.isort.cfg b/modules/purchase_shipment_cost/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/purchase_shipment_cost/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/purchase_shipment_cost/doc/conf.py b/modules/purchase_shipment_cost/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/purchase_shipment_cost/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/purchase_shipment_cost/setup.py b/modules/purchase_shipment_cost/setup.py index 71529ae73b..21e129a244 100755 --- a/modules/purchase_shipment_cost/setup.py +++ b/modules/purchase_shipment_cost/setup.py @@ -40,23 +40,6 @@ name = 'trytond_purchase_shipment_cost' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,22 +47,11 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -extras_require = {} -for dep in info.get('extras_depend', []): - if not re.match(r'(ir|res)(\W|$)', dep): - extras_require[dep] = get_require_version('trytond_%s' % dep) - tests_require = [get_require_version('proteus'), get_require_version('trytond_account_invoice_stock'), get_require_version('trytond_account_stock_continental'), get_require_version('trytond_account_stock_anglo_saxon'), get_require_version('trytond_purchase')] -extras_require['test'] = tests_require -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -149,8 +121,9 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - extras_require=extras_require, - dependency_links=dependency_links, + extras_require={ + 'test': tests_require, + }, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/purchase_shipment_cost/tox.ini b/modules/purchase_shipment_cost/tox.ini index 92002e7378..bca4d965fa 100644 --- a/modules/purchase_shipment_cost/tox.ini +++ b/modules/purchase_shipment_cost/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale/.drone.yml b/modules/sale/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/sale/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale/.flake8 b/modules/sale/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale/.isort.cfg b/modules/sale/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale/doc/conf.py b/modules/sale/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/sale/doc/conf.py +++ b/modules/sale/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale/setup.py b/modules/sale/setup.py index ff6abc5ae6..b2d7716329 100755 --- a/modules/sale/setup.py +++ b/modules/sale/setup.py @@ -43,23 +43,6 @@ name = 'trytond_sale' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4', 'python-dateutil'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, 'sparklines': ['pygal'], 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale/tox.ini b/modules/sale/tox.ini index f16d41a030..5411b738a0 100644 --- a/modules/sale/tox.ini +++ b/modules/sale/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_advance_payment/.drone.yml b/modules/sale_advance_payment/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_advance_payment/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_advance_payment/.flake8 b/modules/sale_advance_payment/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_advance_payment/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_advance_payment/.isort.cfg b/modules/sale_advance_payment/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_advance_payment/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_advance_payment/doc/conf.py b/modules/sale_advance_payment/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_advance_payment/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_advance_payment/setup.py b/modules/sale_advance_payment/setup.py index bb545303d5..f887286222 100755 --- a/modules/sale_advance_payment/setup.py +++ b/modules/sale_advance_payment/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_advance_payment' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['simpleeval'] for dep in info.get('depends', []): @@ -67,11 +50,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] for dep in ['sale_supply']: tests_require.append(get_require_version('trytond_%s' % dep)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_advance_payment/tox.ini b/modules/sale_advance_payment/tox.ini index 951339aa30..8b26cdab7f 100644 --- a/modules/sale_advance_payment/tox.ini +++ b/modules/sale_advance_payment/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_amendment/.drone.yml b/modules/sale_amendment/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_amendment/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_amendment/.flake8 b/modules/sale_amendment/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_amendment/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_amendment/.isort.cfg b/modules/sale_amendment/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_amendment/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_amendment/doc/conf.py b/modules/sale_amendment/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_amendment/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_amendment/setup.py b/modules/sale_amendment/setup.py index 93f3f0f92f..d82a1cae62 100755 --- a/modules/sale_amendment/setup.py +++ b/modules/sale_amendment/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_amendment' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_amendment/tox.ini b/modules/sale_amendment/tox.ini index ba754f0224..0397de5d5b 100644 --- a/modules/sale_amendment/tox.ini +++ b/modules/sale_amendment/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_blanket_agreement/.drone.yml b/modules/sale_blanket_agreement/.drone.yml deleted file mode 100644 index 25369fb040..0000000000 --- a/modules/sale_blanket_agreement/.drone.yml +++ /dev/null @@ -1,76 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_blanket_agreement/.flake8 b/modules/sale_blanket_agreement/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_blanket_agreement/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_blanket_agreement/.isort.cfg b/modules/sale_blanket_agreement/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_blanket_agreement/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_blanket_agreement/doc/conf.py b/modules/sale_blanket_agreement/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/sale_blanket_agreement/doc/conf.py +++ b/modules/sale_blanket_agreement/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_blanket_agreement/setup.py b/modules/sale_blanket_agreement/setup.py index 33dd1802db..0e5b39b8c0 100755 --- a/modules/sale_blanket_agreement/setup.py +++ b/modules/sale_blanket_agreement/setup.py @@ -43,24 +43,7 @@ name = 'trytond_sale_blanket_agreement' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -70,12 +53,6 @@ requires.append(get_require_version('trytond')) tests_require = [ get_require_version('proteus'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -150,7 +127,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_blanket_agreement/tox.ini b/modules/sale_blanket_agreement/tox.ini index 8ed773ff0d..66634d64ca 100644 --- a/modules/sale_blanket_agreement/tox.ini +++ b/modules/sale_blanket_agreement/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_complaint/.drone.yml b/modules/sale_complaint/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_complaint/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_complaint/.flake8 b/modules/sale_complaint/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_complaint/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_complaint/.isort.cfg b/modules/sale_complaint/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_complaint/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_complaint/doc/conf.py b/modules/sale_complaint/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_complaint/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_complaint/setup.py b/modules/sale_complaint/setup.py index 401725cb57..b3901a3022 100755 --- a/modules/sale_complaint/setup.py +++ b/modules/sale_complaint/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_complaint' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_complaint/tox.ini b/modules/sale_complaint/tox.ini index 94c03cbf52..14fd27933a 100644 --- a/modules/sale_complaint/tox.ini +++ b/modules/sale_complaint/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_credit_limit/.drone.yml b/modules/sale_credit_limit/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_credit_limit/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_credit_limit/.flake8 b/modules/sale_credit_limit/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_credit_limit/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_credit_limit/.isort.cfg b/modules/sale_credit_limit/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_credit_limit/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_credit_limit/doc/conf.py b/modules/sale_credit_limit/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_credit_limit/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_credit_limit/setup.py b/modules/sale_credit_limit/setup.py index 411b89335d..807398cef4 100755 --- a/modules/sale_credit_limit/setup.py +++ b/modules/sale_credit_limit/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_credit_limit' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module for sale credit limit', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_credit_limit/tox.ini b/modules/sale_credit_limit/tox.ini index 6171b1505b..6f3209170f 100644 --- a/modules/sale_credit_limit/tox.ini +++ b/modules/sale_credit_limit/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_discount/.drone.yml b/modules/sale_discount/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_discount/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_discount/.flake8 b/modules/sale_discount/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_discount/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_discount/.isort.cfg b/modules/sale_discount/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_discount/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_discount/doc/conf.py b/modules/sale_discount/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_discount/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_discount/setup.py b/modules/sale_discount/setup.py index 8a77bbb7ba..f5761f3d30 100755 --- a/modules/sale_discount/setup.py +++ b/modules/sale_discount/setup.py @@ -43,23 +43,6 @@ name = 'trytond_sale_discount' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_discount/tox.ini b/modules/sale_discount/tox.ini index b533ee79cb..d3b4cdb32e 100644 --- a/modules/sale_discount/tox.ini +++ b/modules/sale_discount/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_extra/.drone.yml b/modules/sale_extra/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_extra/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_extra/.flake8 b/modules/sale_extra/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_extra/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_extra/.isort.cfg b/modules/sale_extra/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_extra/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_extra/doc/conf.py b/modules/sale_extra/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_extra/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_extra/setup.py b/modules/sale_extra/setup.py index 7cc33b4b4b..5de8b02c4f 100755 --- a/modules/sale_extra/setup.py +++ b/modules/sale_extra/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_extra' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_extra/tox.ini b/modules/sale_extra/tox.ini index cd29d61688..01e1c14db5 100644 --- a/modules/sale_extra/tox.ini +++ b/modules/sale_extra/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_gift_card/.drone.yml b/modules/sale_gift_card/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/sale_gift_card/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_gift_card/.flake8 b/modules/sale_gift_card/.flake8 deleted file mode 100644 index bb03d08a82..0000000000 --- a/modules/sale_gift_card/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,W503 diff --git a/modules/sale_gift_card/.isort.cfg b/modules/sale_gift_card/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_gift_card/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_gift_card/doc/conf.py b/modules/sale_gift_card/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/sale_gift_card/doc/conf.py +++ b/modules/sale_gift_card/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_gift_card/setup.py b/modules/sale_gift_card/setup.py index d3e1e7135c..ff4ff5e199 100755 --- a/modules/sale_gift_card/setup.py +++ b/modules/sale_gift_card/setup.py @@ -43,23 +43,6 @@ name = 'trytond_sale_gift_card' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -71,11 +54,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_sale_point'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -148,7 +126,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_gift_card/tox.ini b/modules/sale_gift_card/tox.ini index 5b778946df..2c9651a280 100644 --- a/modules/sale_gift_card/tox.ini +++ b/modules/sale_gift_card/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_history/.drone.yml b/modules/sale_history/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_history/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_history/.flake8 b/modules/sale_history/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_history/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_history/.isort.cfg b/modules/sale_history/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_history/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_history/doc/conf.py b/modules/sale_history/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_history/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_history/setup.py b/modules/sale_history/setup.py index 564c57a5db..afcec9155b 100755 --- a/modules/sale_history/setup.py +++ b/modules/sale_history/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_history' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_sale_subscription'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_history/tox.ini b/modules/sale_history/tox.ini index 5ef0e97276..11ac0250e1 100644 --- a/modules/sale_history/tox.ini +++ b/modules/sale_history/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_invoice_date/.drone.yml b/modules/sale_invoice_date/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/sale_invoice_date/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_invoice_date/.flake8 b/modules/sale_invoice_date/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_invoice_date/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_invoice_date/.isort.cfg b/modules/sale_invoice_date/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_invoice_date/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_invoice_date/doc/conf.py b/modules/sale_invoice_date/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/sale_invoice_date/doc/conf.py +++ b/modules/sale_invoice_date/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_invoice_date/setup.py b/modules/sale_invoice_date/setup.py index 52a0b8e829..dddf29bc83 100755 --- a/modules/sale_invoice_date/setup.py +++ b/modules/sale_invoice_date/setup.py @@ -43,24 +43,7 @@ name = 'trytond_sale_invoice_date' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-dateutil'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -147,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_invoice_date/tox.ini b/modules/sale_invoice_date/tox.ini index f16d41a030..5411b738a0 100644 --- a/modules/sale_invoice_date/tox.ini +++ b/modules/sale_invoice_date/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_invoice_grouping/.drone.yml b/modules/sale_invoice_grouping/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_invoice_grouping/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_invoice_grouping/.flake8 b/modules/sale_invoice_grouping/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_invoice_grouping/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_invoice_grouping/.isort.cfg b/modules/sale_invoice_grouping/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_invoice_grouping/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_invoice_grouping/doc/conf.py b/modules/sale_invoice_grouping/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_invoice_grouping/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_invoice_grouping/setup.py b/modules/sale_invoice_grouping/setup.py index b35042d74f..cf67c61e4a 100755 --- a/modules/sale_invoice_grouping/setup.py +++ b/modules/sale_invoice_grouping/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_invoice_grouping' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_invoice_grouping/tox.ini b/modules/sale_invoice_grouping/tox.ini index e4711df1bd..229467a650 100644 --- a/modules/sale_invoice_grouping/tox.ini +++ b/modules/sale_invoice_grouping/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_opportunity/.drone.yml b/modules/sale_opportunity/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_opportunity/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_opportunity/.flake8 b/modules/sale_opportunity/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_opportunity/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_opportunity/.isort.cfg b/modules/sale_opportunity/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_opportunity/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_opportunity/doc/conf.py b/modules/sale_opportunity/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_opportunity/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_opportunity/setup.py b/modules/sale_opportunity/setup.py index bd6197a28d..f065892643 100755 --- a/modules/sale_opportunity/setup.py +++ b/modules/sale_opportunity/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_opportunity' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4', 'python-dateutil'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, 'sparklines': ['pygal'], 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_opportunity/tox.ini b/modules/sale_opportunity/tox.ini index 2b03bf757d..56203d32c8 100644 --- a/modules/sale_opportunity/tox.ini +++ b/modules/sale_opportunity/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_payment/.drone.yml b/modules/sale_payment/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_payment/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_payment/.flake8 b/modules/sale_payment/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_payment/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_payment/.isort.cfg b/modules/sale_payment/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_payment/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_payment/doc/conf.py b/modules/sale_payment/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_payment/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_payment/setup.py b/modules/sale_payment/setup.py index f2b929fae0..96b5165bec 100755 --- a/modules/sale_payment/setup.py +++ b/modules/sale_payment/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_payment' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -67,11 +50,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] for dep in ['account_payment_clearing']: tests_require.append(get_require_version('trytond_%s' % dep)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_payment/tox.ini b/modules/sale_payment/tox.ini index 0fd6a4cbde..d79017d7b7 100644 --- a/modules/sale_payment/tox.ini +++ b/modules/sale_payment/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_point/.drone.yml b/modules/sale_point/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/sale_point/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_point/.flake8 b/modules/sale_point/.flake8 deleted file mode 100644 index bb03d08a82..0000000000 --- a/modules/sale_point/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,W503 diff --git a/modules/sale_point/.isort.cfg b/modules/sale_point/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_point/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_point/doc/conf.py b/modules/sale_point/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/sale_point/doc/conf.py +++ b/modules/sale_point/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_point/setup.py b/modules/sale_point/setup.py index 45e1ee1d50..3c8ab0bb6c 100755 --- a/modules/sale_point/setup.py +++ b/modules/sale_point/setup.py @@ -43,23 +43,6 @@ name = 'trytond_sale_point' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] @@ -69,11 +52,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -147,7 +125,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_point/tox.ini b/modules/sale_point/tox.ini index 585cb40885..f848bf33b2 100644 --- a/modules/sale_point/tox.ini +++ b/modules/sale_point/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_price_list/.drone.yml b/modules/sale_price_list/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_price_list/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_price_list/.flake8 b/modules/sale_price_list/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_price_list/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_price_list/.isort.cfg b/modules/sale_price_list/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_price_list/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_price_list/doc/conf.py b/modules/sale_price_list/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_price_list/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_price_list/setup.py b/modules/sale_price_list/setup.py index 148432619a..845b6c0a4c 100755 --- a/modules/sale_price_list/setup.py +++ b/modules/sale_price_list/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_price_list' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,11 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +118,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_price_list/tox.ini b/modules/sale_price_list/tox.ini index 7044b2668e..8da848ebcd 100644 --- a/modules/sale_price_list/tox.ini +++ b/modules/sale_price_list/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_product_customer/.drone.yml b/modules/sale_product_customer/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_product_customer/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_product_customer/.flake8 b/modules/sale_product_customer/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_product_customer/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_product_customer/.isort.cfg b/modules/sale_product_customer/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_product_customer/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_product_customer/doc/conf.py b/modules/sale_product_customer/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_product_customer/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_product_customer/setup.py b/modules/sale_product_customer/setup.py index 829708cf87..c429efece1 100755 --- a/modules/sale_product_customer/setup.py +++ b/modules/sale_product_customer/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_product_customer' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -69,11 +52,6 @@ tests_require = [ get_require_version('trytond_sale_amendment'), get_require_version('trytond_sale_blanket_agreement'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_product_customer/tox.ini b/modules/sale_product_customer/tox.ini index 2b10116b35..5ae2c7c83a 100644 --- a/modules/sale_product_customer/tox.ini +++ b/modules/sale_product_customer/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_product_quantity/.drone.yml b/modules/sale_product_quantity/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/sale_product_quantity/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_product_quantity/.flake8 b/modules/sale_product_quantity/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_product_quantity/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_product_quantity/.isort.cfg b/modules/sale_product_quantity/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_product_quantity/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_product_quantity/doc/conf.py b/modules/sale_product_quantity/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/sale_product_quantity/doc/conf.py +++ b/modules/sale_product_quantity/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_product_quantity/setup.py b/modules/sale_product_quantity/setup.py index 09f6381cd5..5b9a6648d7 100755 --- a/modules/sale_product_quantity/setup.py +++ b/modules/sale_product_quantity/setup.py @@ -43,24 +43,7 @@ name = 'trytond_sale_product_quantity' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -71,12 +54,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_sale_point'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -150,7 +127,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_product_quantity/tox.ini b/modules/sale_product_quantity/tox.ini index c993cc49d8..a3c2be9ffa 100644 --- a/modules/sale_product_quantity/tox.ini +++ b/modules/sale_product_quantity/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_product_recommendation/.drone.yml b/modules/sale_product_recommendation/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/sale_product_recommendation/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_product_recommendation/.flake8 b/modules/sale_product_recommendation/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_product_recommendation/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_product_recommendation/.isort.cfg b/modules/sale_product_recommendation/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_product_recommendation/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_product_recommendation/doc/conf.py b/modules/sale_product_recommendation/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/sale_product_recommendation/doc/conf.py +++ b/modules/sale_product_recommendation/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_product_recommendation/setup.py b/modules/sale_product_recommendation/setup.py index a80f3b8d61..d64329c951 100755 --- a/modules/sale_product_recommendation/setup.py +++ b/modules/sale_product_recommendation/setup.py @@ -43,24 +43,7 @@ name = 'trytond_sale_product_recommendation' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('trytond_sale_point')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -149,7 +126,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_product_recommendation/tox.ini b/modules/sale_product_recommendation/tox.ini index 395ebe0c86..8ddbe3fd84 100644 --- a/modules/sale_product_recommendation/tox.ini +++ b/modules/sale_product_recommendation/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_product_recommendation_association_rule/.drone.yml b/modules/sale_product_recommendation_association_rule/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/sale_product_recommendation_association_rule/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_product_recommendation_association_rule/.flake8 b/modules/sale_product_recommendation_association_rule/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_product_recommendation_association_rule/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_product_recommendation_association_rule/.isort.cfg b/modules/sale_product_recommendation_association_rule/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_product_recommendation_association_rule/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_product_recommendation_association_rule/doc/conf.py b/modules/sale_product_recommendation_association_rule/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/sale_product_recommendation_association_rule/doc/conf.py +++ b/modules/sale_product_recommendation_association_rule/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_product_recommendation_association_rule/setup.py b/modules/sale_product_recommendation_association_rule/setup.py index 7a2f67f0c6..4f6f328733 100755 --- a/modules/sale_product_recommendation_association_rule/setup.py +++ b/modules/sale_product_recommendation_association_rule/setup.py @@ -43,24 +43,7 @@ name = 'trytond_sale_product_recommendation_association_rule' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['efficient-apriori'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -71,12 +54,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_sale_point'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -157,7 +134,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_product_recommendation_association_rule/tox.ini b/modules/sale_product_recommendation_association_rule/tox.ini index 2672a37250..3c1a44f258 100644 --- a/modules/sale_product_recommendation_association_rule/tox.ini +++ b/modules/sale_product_recommendation_association_rule/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_promotion/.drone.yml b/modules/sale_promotion/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_promotion/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_promotion/.flake8 b/modules/sale_promotion/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_promotion/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_promotion/.isort.cfg b/modules/sale_promotion/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_promotion/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_promotion/doc/conf.py b/modules/sale_promotion/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_promotion/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_promotion/setup.py b/modules/sale_promotion/setup.py index d312bf411c..97a694ba76 100755 --- a/modules/sale_promotion/setup.py +++ b/modules/sale_promotion/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_promotion' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['simpleeval'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_promotion/tox.ini b/modules/sale_promotion/tox.ini index 50388260e7..75cf7c5d4a 100644 --- a/modules/sale_promotion/tox.ini +++ b/modules/sale_promotion/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_promotion_coupon/.drone.yml b/modules/sale_promotion_coupon/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_promotion_coupon/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_promotion_coupon/.flake8 b/modules/sale_promotion_coupon/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_promotion_coupon/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_promotion_coupon/.isort.cfg b/modules/sale_promotion_coupon/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_promotion_coupon/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_promotion_coupon/doc/conf.py b/modules/sale_promotion_coupon/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_promotion_coupon/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_promotion_coupon/setup.py b/modules/sale_promotion_coupon/setup.py index 687337f6c6..e935891c29 100755 --- a/modules/sale_promotion_coupon/setup.py +++ b/modules/sale_promotion_coupon/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_promotion_coupon' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +118,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_promotion_coupon/tox.ini b/modules/sale_promotion_coupon/tox.ini index 9dd456ff6a..d31da75558 100644 --- a/modules/sale_promotion_coupon/tox.ini +++ b/modules/sale_promotion_coupon/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_promotion_coupon_payment/.drone.yml b/modules/sale_promotion_coupon_payment/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/sale_promotion_coupon_payment/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_promotion_coupon_payment/.flake8 b/modules/sale_promotion_coupon_payment/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_promotion_coupon_payment/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_promotion_coupon_payment/.isort.cfg b/modules/sale_promotion_coupon_payment/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_promotion_coupon_payment/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_promotion_coupon_payment/doc/conf.py b/modules/sale_promotion_coupon_payment/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/sale_promotion_coupon_payment/doc/conf.py +++ b/modules/sale_promotion_coupon_payment/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_promotion_coupon_payment/setup.py b/modules/sale_promotion_coupon_payment/setup.py index 7c0b37c744..016d368ec8 100755 --- a/modules/sale_promotion_coupon_payment/setup.py +++ b/modules/sale_promotion_coupon_payment/setup.py @@ -43,24 +43,7 @@ name = 'trytond_sale_promotion_coupon_payment' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -150,7 +127,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_promotion_coupon_payment/tox.ini b/modules/sale_promotion_coupon_payment/tox.ini index 1c3823f653..4b174b24c6 100644 --- a/modules/sale_promotion_coupon_payment/tox.ini +++ b/modules/sale_promotion_coupon_payment/tox.ini @@ -13,6 +13,5 @@ deps = setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_secondary_unit/.drone.yml b/modules/sale_secondary_unit/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_secondary_unit/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_secondary_unit/.flake8 b/modules/sale_secondary_unit/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_secondary_unit/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_secondary_unit/.isort.cfg b/modules/sale_secondary_unit/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_secondary_unit/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_secondary_unit/doc/conf.py b/modules/sale_secondary_unit/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_secondary_unit/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_secondary_unit/setup.py b/modules/sale_secondary_unit/setup.py index 597fe847de..b87db14061 100755 --- a/modules/sale_secondary_unit/setup.py +++ b/modules/sale_secondary_unit/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_secondary_unit' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -69,11 +52,6 @@ tests_require = [get_require_version('proteus'), get_require_version('trytond_sale_blanket_agreement'), get_require_version('trytond_stock_secondary_unit'), get_require_version('trytond_sale_product_customer')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_secondary_unit/tox.ini b/modules/sale_secondary_unit/tox.ini index 6eb5871605..1d5b8562e1 100644 --- a/modules/sale_secondary_unit/tox.ini +++ b/modules/sale_secondary_unit/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_shipment_cost/.drone.yml b/modules/sale_shipment_cost/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_shipment_cost/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_shipment_cost/.flake8 b/modules/sale_shipment_cost/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_shipment_cost/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_shipment_cost/.isort.cfg b/modules/sale_shipment_cost/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_shipment_cost/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_shipment_cost/doc/conf.py b/modules/sale_shipment_cost/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_shipment_cost/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_shipment_cost/setup.py b/modules/sale_shipment_cost/setup.py index 3305eaf03e..67dee924b8 100755 --- a/modules/sale_shipment_cost/setup.py +++ b/modules/sale_shipment_cost/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_shipment_cost' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -69,11 +52,6 @@ tests_require = [ ] for dep in ['account', 'party', 'stock', 'sale_promotion']: tests_require.append(get_require_version('trytond_%s' % dep)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_shipment_cost/tox.ini b/modules/sale_shipment_cost/tox.ini index b3d27920eb..33f8219f6e 100644 --- a/modules/sale_shipment_cost/tox.ini +++ b/modules/sale_shipment_cost/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_shipment_grouping/.drone.yml b/modules/sale_shipment_grouping/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_shipment_grouping/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_shipment_grouping/.flake8 b/modules/sale_shipment_grouping/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_shipment_grouping/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_shipment_grouping/.isort.cfg b/modules/sale_shipment_grouping/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_shipment_grouping/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_shipment_grouping/doc/conf.py b/modules/sale_shipment_grouping/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_shipment_grouping/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_shipment_grouping/setup.py b/modules/sale_shipment_grouping/setup.py index c934cefecf..a86abe9529 100755 --- a/modules/sale_shipment_grouping/setup.py +++ b/modules/sale_shipment_grouping/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_shipment_grouping' download_url = 'http://dowloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_shipment_grouping/tox.ini b/modules/sale_shipment_grouping/tox.ini index 23361c1438..af785e763d 100644 --- a/modules/sale_shipment_grouping/tox.ini +++ b/modules/sale_shipment_grouping/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_shipment_tolerance/.drone.yml b/modules/sale_shipment_tolerance/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_shipment_tolerance/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_shipment_tolerance/.flake8 b/modules/sale_shipment_tolerance/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_shipment_tolerance/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_shipment_tolerance/.isort.cfg b/modules/sale_shipment_tolerance/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_shipment_tolerance/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_shipment_tolerance/doc/conf.py b/modules/sale_shipment_tolerance/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_shipment_tolerance/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_shipment_tolerance/setup.py b/modules/sale_shipment_tolerance/setup.py index 509e2bfd74..99ff8f1534 100755 --- a/modules/sale_shipment_tolerance/setup.py +++ b/modules/sale_shipment_tolerance/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_shipment_tolerance' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +118,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_shipment_tolerance/tox.ini b/modules/sale_shipment_tolerance/tox.ini index e9f4ccb5cd..a3c2c338c4 100644 --- a/modules/sale_shipment_tolerance/tox.ini +++ b/modules/sale_shipment_tolerance/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_stock_quantity/.drone.yml b/modules/sale_stock_quantity/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_stock_quantity/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_stock_quantity/.flake8 b/modules/sale_stock_quantity/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_stock_quantity/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_stock_quantity/.isort.cfg b/modules/sale_stock_quantity/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_stock_quantity/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_stock_quantity/doc/conf.py b/modules/sale_stock_quantity/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_stock_quantity/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_stock_quantity/setup.py b/modules/sale_stock_quantity/setup.py index 8582e4ea22..d73fdfb9ce 100755 --- a/modules/sale_stock_quantity/setup.py +++ b/modules/sale_stock_quantity/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_stock_quantity' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_stock_supply'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_stock_quantity/tox.ini b/modules/sale_stock_quantity/tox.ini index de2a2dd3bd..232632ae64 100644 --- a/modules/sale_stock_quantity/tox.ini +++ b/modules/sale_stock_quantity/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_subscription/.drone.yml b/modules/sale_subscription/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_subscription/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_subscription/.flake8 b/modules/sale_subscription/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_subscription/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_subscription/.isort.cfg b/modules/sale_subscription/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_subscription/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_subscription/doc/conf.py b/modules/sale_subscription/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_subscription/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_subscription/setup.py b/modules/sale_subscription/setup.py index 8ab3591b78..7449c02071 100755 --- a/modules/sale_subscription/setup.py +++ b/modules/sale_subscription/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_subscription' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-dateutil'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_subscription/tox.ini b/modules/sale_subscription/tox.ini index 4ec33716cb..6ef55bf6fc 100644 --- a/modules/sale_subscription/tox.ini +++ b/modules/sale_subscription/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_subscription_asset/.drone.yml b/modules/sale_subscription_asset/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_subscription_asset/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_subscription_asset/.flake8 b/modules/sale_subscription_asset/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_subscription_asset/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_subscription_asset/.isort.cfg b/modules/sale_subscription_asset/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_subscription_asset/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_subscription_asset/doc/conf.py b/modules/sale_subscription_asset/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_subscription_asset/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_subscription_asset/setup.py b/modules/sale_subscription_asset/setup.py index c4c6dd49a7..3031eebd46 100755 --- a/modules/sale_subscription_asset/setup.py +++ b/modules/sale_subscription_asset/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_subscription_asset' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_subscription_asset/tox.ini b/modules/sale_subscription_asset/tox.ini index 94a4ea626b..3443c85891 100644 --- a/modules/sale_subscription_asset/tox.ini +++ b/modules/sale_subscription_asset/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_supply/.drone.yml b/modules/sale_supply/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_supply/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_supply/.flake8 b/modules/sale_supply/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_supply/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_supply/.isort.cfg b/modules/sale_supply/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_supply/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_supply/doc/conf.py b/modules/sale_supply/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_supply/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_supply/setup.py b/modules/sale_supply/setup.py index b0baeba63f..a77da3b659 100755 --- a/modules/sale_supply/setup.py +++ b/modules/sale_supply/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_supply' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_supply/tox.ini b/modules/sale_supply/tox.ini index 5e3bf82840..268f969300 100644 --- a/modules/sale_supply/tox.ini +++ b/modules/sale_supply/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_supply_drop_shipment/.drone.yml b/modules/sale_supply_drop_shipment/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_supply_drop_shipment/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_supply_drop_shipment/.flake8 b/modules/sale_supply_drop_shipment/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_supply_drop_shipment/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_supply_drop_shipment/.isort.cfg b/modules/sale_supply_drop_shipment/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_supply_drop_shipment/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_supply_drop_shipment/doc/conf.py b/modules/sale_supply_drop_shipment/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_supply_drop_shipment/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_supply_drop_shipment/setup.py b/modules/sale_supply_drop_shipment/setup.py index 4047bdfee0..aa5697a7c9 100755 --- a/modules/sale_supply_drop_shipment/setup.py +++ b/modules/sale_supply_drop_shipment/setup.py @@ -40,23 +40,6 @@ name = 'trytond_sale_supply_drop_shipment' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -144,7 +122,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_supply_drop_shipment/tox.ini b/modules/sale_supply_drop_shipment/tox.ini index 0c630a3b84..3b6b3d2701 100644 --- a/modules/sale_supply_drop_shipment/tox.ini +++ b/modules/sale_supply_drop_shipment/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/sale_supply_production/.drone.yml b/modules/sale_supply_production/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/sale_supply_production/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/sale_supply_production/.flake8 b/modules/sale_supply_production/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/sale_supply_production/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/sale_supply_production/.isort.cfg b/modules/sale_supply_production/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/sale_supply_production/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/sale_supply_production/doc/conf.py b/modules/sale_supply_production/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/sale_supply_production/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/sale_supply_production/setup.py b/modules/sale_supply_production/setup.py index a032058c3c..2669e21ee2 100755 --- a/modules/sale_supply_production/setup.py +++ b/modules/sale_supply_production/setup.py @@ -43,23 +43,6 @@ name = 'trytond_sale_supply_production' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/sale_supply_production/tox.ini b/modules/sale_supply_production/tox.ini index 26177504c4..6d4bbaedc3 100644 --- a/modules/sale_supply_production/tox.ini +++ b/modules/sale_supply_production/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock/.drone.yml b/modules/stock/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/stock/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock/.flake8 b/modules/stock/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock/.isort.cfg b/modules/stock/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock/doc/conf.py b/modules/stock/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/stock/doc/conf.py +++ b/modules/stock/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock/setup.py b/modules/stock/setup.py index 7681ff0978..0a5d806b24 100755 --- a/modules/stock/setup.py +++ b/modules/stock/setup.py @@ -43,23 +43,6 @@ name = 'trytond_stock' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 1.3.0', 'simpleeval'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, 'sparklines': ['pygal'], 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock/tox.ini b/modules/stock/tox.ini index 621e52aed8..389623a404 100644 --- a/modules/stock/tox.ini +++ b/modules/stock/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_assign_manual/.drone.yml b/modules/stock_assign_manual/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_assign_manual/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_assign_manual/.flake8 b/modules/stock_assign_manual/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_assign_manual/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_assign_manual/.isort.cfg b/modules/stock_assign_manual/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_assign_manual/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_assign_manual/doc/conf.py b/modules/stock_assign_manual/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_assign_manual/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_assign_manual/setup.py b/modules/stock_assign_manual/setup.py index 44aec6f95c..22541add92 100755 --- a/modules/stock_assign_manual/setup.py +++ b/modules/stock_assign_manual/setup.py @@ -43,23 +43,6 @@ name = 'trytond_stock_assign_manual' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -71,11 +54,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_production'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -148,7 +126,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_assign_manual/tox.ini b/modules/stock_assign_manual/tox.ini index c71483d985..680703d0db 100644 --- a/modules/stock_assign_manual/tox.ini +++ b/modules/stock_assign_manual/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_consignment/.drone.yml b/modules/stock_consignment/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_consignment/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_consignment/.flake8 b/modules/stock_consignment/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_consignment/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_consignment/.isort.cfg b/modules/stock_consignment/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_consignment/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_consignment/doc/conf.py b/modules/stock_consignment/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_consignment/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_consignment/setup.py b/modules/stock_consignment/setup.py index 64b424bfb9..305429a2f3 100755 --- a/modules/stock_consignment/setup.py +++ b/modules/stock_consignment/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_consignment' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -66,11 +49,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), get_require_version('trytond_stock_supply')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_consignment/tox.ini b/modules/stock_consignment/tox.ini index 367270265c..e51ce3f32e 100644 --- a/modules/stock_consignment/tox.ini +++ b/modules/stock_consignment/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_forecast/.drone.yml b/modules/stock_forecast/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_forecast/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_forecast/.flake8 b/modules/stock_forecast/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_forecast/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_forecast/.isort.cfg b/modules/stock_forecast/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_forecast/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_forecast/doc/conf.py b/modules/stock_forecast/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_forecast/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_forecast/setup.py b/modules/stock_forecast/setup.py index 3079bad279..5a5de2b0d4 100755 --- a/modules/stock_forecast/setup.py +++ b/modules/stock_forecast/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_forecast' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-dateutil', 'python-sql >= 0.4'] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module with stock forecasts', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_forecast/tox.ini b/modules/stock_forecast/tox.ini index a04ae2d481..434443c64b 100644 --- a/modules/stock_forecast/tox.ini +++ b/modules/stock_forecast/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_inventory_location/.drone.yml b/modules/stock_inventory_location/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_inventory_location/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_inventory_location/.flake8 b/modules/stock_inventory_location/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_inventory_location/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_inventory_location/.isort.cfg b/modules/stock_inventory_location/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_inventory_location/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_inventory_location/doc/conf.py b/modules/stock_inventory_location/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_inventory_location/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_inventory_location/setup.py b/modules/stock_inventory_location/setup.py index ff3ca1ba87..053c20cd3d 100755 --- a/modules/stock_inventory_location/setup.py +++ b/modules/stock_inventory_location/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_inventory_location' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -143,7 +121,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_inventory_location/tox.ini b/modules/stock_inventory_location/tox.ini index 37557d9313..8e7644e744 100644 --- a/modules/stock_inventory_location/tox.ini +++ b/modules/stock_inventory_location/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_location_move/.drone.yml b/modules/stock_location_move/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_location_move/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_location_move/.flake8 b/modules/stock_location_move/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_location_move/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_location_move/.isort.cfg b/modules/stock_location_move/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_location_move/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_location_move/doc/conf.py b/modules/stock_location_move/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_location_move/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_location_move/setup.py b/modules/stock_location_move/setup.py index 4c79f36de1..aa4a877192 100755 --- a/modules/stock_location_move/setup.py +++ b/modules/stock_location_move/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_location_move' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -67,11 +50,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] for dep in info.get('extras_depend', []): tests_require.append(get_require_version('trytond_%s' % dep)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_location_move/tox.ini b/modules/stock_location_move/tox.ini index 31f227721f..e7a130fafb 100644 --- a/modules/stock_location_move/tox.ini +++ b/modules/stock_location_move/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_location_sequence/.drone.yml b/modules/stock_location_sequence/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_location_sequence/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_location_sequence/.flake8 b/modules/stock_location_sequence/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_location_sequence/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_location_sequence/.isort.cfg b/modules/stock_location_sequence/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_location_sequence/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_location_sequence/doc/conf.py b/modules/stock_location_sequence/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_location_sequence/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_location_sequence/setup.py b/modules/stock_location_sequence/setup.py index 612f16f17b..be96169618 100755 --- a/modules/stock_location_sequence/setup.py +++ b/modules/stock_location_sequence/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_location_sequence' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to add sequence on location', @@ -138,7 +115,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_location_sequence/tox.ini b/modules/stock_location_sequence/tox.ini index 189eabf611..01c5f2a430 100644 --- a/modules/stock_location_sequence/tox.ini +++ b/modules/stock_location_sequence/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_lot/.drone.yml b/modules/stock_lot/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_lot/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_lot/.flake8 b/modules/stock_lot/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_lot/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_lot/.isort.cfg b/modules/stock_lot/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_lot/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_lot/doc/conf.py b/modules/stock_lot/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_lot/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_lot/setup.py b/modules/stock_lot/setup.py index bd18b0ebfe..b746ca142c 100755 --- a/modules/stock_lot/setup.py +++ b/modules/stock_lot/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_lot' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), 'python-dateutil'] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_lot/tox.ini b/modules/stock_lot/tox.ini index 2c78a15a21..e012c9a0ad 100644 --- a/modules/stock_lot/tox.ini +++ b/modules/stock_lot/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_lot_sled/.drone.yml b/modules/stock_lot_sled/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_lot_sled/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_lot_sled/.flake8 b/modules/stock_lot_sled/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_lot_sled/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_lot_sled/.isort.cfg b/modules/stock_lot_sled/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_lot_sled/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_lot_sled/doc/conf.py b/modules/stock_lot_sled/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_lot_sled/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_lot_sled/setup.py b/modules/stock_lot_sled/setup.py index c0a4e54063..0bb42735d2 100755 --- a/modules/stock_lot_sled/setup.py +++ b/modules/stock_lot_sled/setup.py @@ -40,35 +40,14 @@ name = 'trytond_stock_lot_sled' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.5'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) + tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_lot_sled/tox.ini b/modules/stock_lot_sled/tox.ini index 40913d4cdb..4b9b534a8f 100644 --- a/modules/stock_lot_sled/tox.ini +++ b/modules/stock_lot_sled/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_lot_unit/.drone.yml b/modules/stock_lot_unit/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_lot_unit/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_lot_unit/.flake8 b/modules/stock_lot_unit/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_lot_unit/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_lot_unit/.isort.cfg b/modules/stock_lot_unit/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_lot_unit/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_lot_unit/doc/conf.py b/modules/stock_lot_unit/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_lot_unit/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_lot_unit/setup.py b/modules/stock_lot_unit/setup.py index b7f3e30593..a4a88b304e 100755 --- a/modules/stock_lot_unit/setup.py +++ b/modules/stock_lot_unit/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_lot_unit' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -66,11 +49,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus'), get_require_version('trytond_production')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_lot_unit/tox.ini b/modules/stock_lot_unit/tox.ini index eb3a1d6a76..502357e815 100644 --- a/modules/stock_lot_unit/tox.ini +++ b/modules/stock_lot_unit/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_package/.drone.yml b/modules/stock_package/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_package/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_package/.flake8 b/modules/stock_package/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_package/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_package/.isort.cfg b/modules/stock_package/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_package/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_package/doc/conf.py b/modules/stock_package/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_package/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_package/setup.py b/modules/stock_package/setup.py index 4751817723..87e2ce4feb 100755 --- a/modules/stock_package/setup.py +++ b/modules/stock_package/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_package' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_package/tox.ini b/modules/stock_package/tox.ini index ca515eb9f8..75cc75f515 100644 --- a/modules/stock_package/tox.ini +++ b/modules/stock_package/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_package_shipping/.drone.yml b/modules/stock_package_shipping/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/stock_package_shipping/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_package_shipping/.flake8 b/modules/stock_package_shipping/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_package_shipping/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_package_shipping/.isort.cfg b/modules/stock_package_shipping/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_package_shipping/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_package_shipping/doc/conf.py b/modules/stock_package_shipping/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/stock_package_shipping/doc/conf.py +++ b/modules/stock_package_shipping/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_package_shipping/setup.py b/modules/stock_package_shipping/setup.py index bd0037bdf3..548ed442be 100755 --- a/modules/stock_package_shipping/setup.py +++ b/modules/stock_package_shipping/setup.py @@ -43,23 +43,6 @@ name = 'trytond_stock_package_shipping' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_package_shipping/tox.ini b/modules/stock_package_shipping/tox.ini index 62db059a5c..515a2afa51 100644 --- a/modules/stock_package_shipping/tox.ini +++ b/modules/stock_package_shipping/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_package_shipping_dpd/.drone.yml b/modules/stock_package_shipping_dpd/.drone.yml deleted file mode 100644 index 7b87e59d53..0000000000 --- a/modules/stock_package_shipping_dpd/.drone.yml +++ /dev/null @@ -1,71 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID DPD_USER_ID DPD_PASSWORD - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - secrets: [ dpd_user_id, dpd_password ] - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_package_shipping_dpd/.flake8 b/modules/stock_package_shipping_dpd/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_package_shipping_dpd/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_package_shipping_dpd/.isort.cfg b/modules/stock_package_shipping_dpd/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_package_shipping_dpd/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_package_shipping_dpd/doc/conf.py b/modules/stock_package_shipping_dpd/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_package_shipping_dpd/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_package_shipping_dpd/setup.py b/modules/stock_package_shipping_dpd/setup.py index 4ce89a5deb..1ce1bfb7f2 100755 --- a/modules/stock_package_shipping_dpd/setup.py +++ b/modules/stock_package_shipping_dpd/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_package_shipping_dpd' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['zeep >= 0.12', 'PyPDF2', 'lxml'] for dep in info.get('depends', []): @@ -69,11 +52,6 @@ tests_require = [ get_require_version('trytond_sale'), get_require_version('trytond_sale_shipment_cost'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_package_shipping_dpd/tox.ini b/modules/stock_package_shipping_dpd/tox.ini index 817507dc3d..12e0d4a029 100644 --- a/modules/stock_package_shipping_dpd/tox.ini +++ b/modules/stock_package_shipping_dpd/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_package_shipping_mygls/.drone.yml b/modules/stock_package_shipping_mygls/.drone.yml deleted file mode 100644 index f99c626d17..0000000000 --- a/modules/stock_package_shipping_mygls/.drone.yml +++ /dev/null @@ -1,79 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID MYGLS_USERNAME MYGLS_PASSWORD MYGLS_CLIENT_NUMBER - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - secrets: [ mygls_username, mygls_password, mygls_client_number ] - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_package_shipping_mygls/.flake8 b/modules/stock_package_shipping_mygls/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_package_shipping_mygls/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_package_shipping_mygls/.isort.cfg b/modules/stock_package_shipping_mygls/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_package_shipping_mygls/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_package_shipping_mygls/doc/conf.py b/modules/stock_package_shipping_mygls/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/stock_package_shipping_mygls/doc/conf.py +++ b/modules/stock_package_shipping_mygls/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_package_shipping_mygls/setup.py b/modules/stock_package_shipping_mygls/setup.py index 022d45d3fa..7d7e426721 100755 --- a/modules/stock_package_shipping_mygls/setup.py +++ b/modules/stock_package_shipping_mygls/setup.py @@ -43,24 +43,7 @@ name = 'trytond_stock_package_shipping_mygls' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['zeep', 'PyPDF2'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -72,12 +55,6 @@ tests_require = [ get_require_version('trytond_sale'), get_require_version('trytond_sale_shipment_cost'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -153,7 +130,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_package_shipping_mygls/tox.ini b/modules/stock_package_shipping_mygls/tox.ini index 44a40ee2bc..d9225ebfa3 100644 --- a/modules/stock_package_shipping_mygls/tox.ini +++ b/modules/stock_package_shipping_mygls/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_package_shipping_sendcloud/.drone.yml b/modules/stock_package_shipping_sendcloud/.drone.yml deleted file mode 100644 index 20bb6fbdf9..0000000000 --- a/modules/stock_package_shipping_sendcloud/.drone.yml +++ /dev/null @@ -1,79 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID SENDCLOUD_PUBLIC_KEY SENDCLOUD_SECRET_KEY - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - secrets: [ sendcloud_public_key, sendcloud_secret_key ] - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_package_shipping_sendcloud/.flake8 b/modules/stock_package_shipping_sendcloud/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_package_shipping_sendcloud/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_package_shipping_sendcloud/.isort.cfg b/modules/stock_package_shipping_sendcloud/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_package_shipping_sendcloud/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_package_shipping_sendcloud/doc/conf.py b/modules/stock_package_shipping_sendcloud/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/stock_package_shipping_sendcloud/doc/conf.py +++ b/modules/stock_package_shipping_sendcloud/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_package_shipping_sendcloud/setup.py b/modules/stock_package_shipping_sendcloud/setup.py index 248f3424b4..0e7804120c 100755 --- a/modules/stock_package_shipping_sendcloud/setup.py +++ b/modules/stock_package_shipping_sendcloud/setup.py @@ -43,24 +43,7 @@ name = 'trytond_stock_package_shipping_sendcloud' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['requests'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -72,12 +55,6 @@ tests_require = [ get_require_version('trytond_sale'), get_require_version('trytond_sale_shipment_cost'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -154,7 +131,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_package_shipping_sendcloud/tox.ini b/modules/stock_package_shipping_sendcloud/tox.ini index 5cb067a731..67d991273b 100644 --- a/modules/stock_package_shipping_sendcloud/tox.ini +++ b/modules/stock_package_shipping_sendcloud/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_package_shipping_ups/.drone.yml b/modules/stock_package_shipping_ups/.drone.yml deleted file mode 100644 index 2a43179527..0000000000 --- a/modules/stock_package_shipping_ups/.drone.yml +++ /dev/null @@ -1,71 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID UPS_USER_ID UPS_PASSWORD UPS_LICENSE UPS_ACCOUNT_NUMBER - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - secrets: [ ups_user_id, ups_password, ups_account_number, ups_license ] - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_package_shipping_ups/.flake8 b/modules/stock_package_shipping_ups/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_package_shipping_ups/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_package_shipping_ups/.isort.cfg b/modules/stock_package_shipping_ups/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_package_shipping_ups/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_package_shipping_ups/doc/conf.py b/modules/stock_package_shipping_ups/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_package_shipping_ups/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_package_shipping_ups/setup.py b/modules/stock_package_shipping_ups/setup.py index 8204a22076..72b4b44a39 100755 --- a/modules/stock_package_shipping_ups/setup.py +++ b/modules/stock_package_shipping_ups/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_package_shipping_ups' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['requests'] for dep in info.get('depends', []): @@ -69,11 +52,6 @@ tests_require = [ get_require_version('trytond_sale'), get_require_version('trytond_sale_shipment_cost'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_package_shipping_ups/tox.ini b/modules/stock_package_shipping_ups/tox.ini index 6e2d007fe7..6f4dc4b482 100644 --- a/modules/stock_package_shipping_ups/tox.ini +++ b/modules/stock_package_shipping_ups/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_product_location/.drone.yml b/modules/stock_product_location/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_product_location/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_product_location/.flake8 b/modules/stock_product_location/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_product_location/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_product_location/.isort.cfg b/modules/stock_product_location/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_product_location/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_product_location/doc/conf.py b/modules/stock_product_location/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_product_location/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_product_location/setup.py b/modules/stock_product_location/setup.py index 844525d0d6..9a3c4e0a67 100755 --- a/modules/stock_product_location/setup.py +++ b/modules/stock_product_location/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_product_location' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -67,11 +50,6 @@ requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] for dep in ['production']: tests_require.append(get_require_version('trytond_%s' % dep)) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -144,7 +122,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_product_location/tox.ini b/modules/stock_product_location/tox.ini index 1b05d3f2f9..d654cb42b5 100644 --- a/modules/stock_product_location/tox.ini +++ b/modules/stock_product_location/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_quantity_early_planning/.drone.yml b/modules/stock_quantity_early_planning/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/stock_quantity_early_planning/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_quantity_early_planning/.flake8 b/modules/stock_quantity_early_planning/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_quantity_early_planning/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_quantity_early_planning/.isort.cfg b/modules/stock_quantity_early_planning/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_quantity_early_planning/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_quantity_early_planning/doc/conf.py b/modules/stock_quantity_early_planning/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/stock_quantity_early_planning/doc/conf.py +++ b/modules/stock_quantity_early_planning/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_quantity_early_planning/setup.py b/modules/stock_quantity_early_planning/setup.py index e3ebf47fb9..0e25d3fc59 100755 --- a/modules/stock_quantity_early_planning/setup.py +++ b/modules/stock_quantity_early_planning/setup.py @@ -43,24 +43,7 @@ name = 'trytond_stock_quantity_early_planning' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -72,12 +55,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_production'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -152,7 +129,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_quantity_early_planning/tox.ini b/modules/stock_quantity_early_planning/tox.ini index c3a8c6c5a6..a2e2e965ad 100644 --- a/modules/stock_quantity_early_planning/tox.ini +++ b/modules/stock_quantity_early_planning/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_quantity_issue/.drone.yml b/modules/stock_quantity_issue/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/stock_quantity_issue/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_quantity_issue/.flake8 b/modules/stock_quantity_issue/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_quantity_issue/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_quantity_issue/.isort.cfg b/modules/stock_quantity_issue/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_quantity_issue/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_quantity_issue/doc/conf.py b/modules/stock_quantity_issue/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/stock_quantity_issue/doc/conf.py +++ b/modules/stock_quantity_issue/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_quantity_issue/setup.py b/modules/stock_quantity_issue/setup.py index e0940af9f3..7dc2ac0db1 100755 --- a/modules/stock_quantity_issue/setup.py +++ b/modules/stock_quantity_issue/setup.py @@ -43,23 +43,6 @@ name = 'trytond_stock_quantity_issue' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -72,11 +55,6 @@ tests_require = [ get_require_version('proteus'), get_require_version('trytond_production'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -151,7 +129,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_quantity_issue/tox.ini b/modules/stock_quantity_issue/tox.ini index f0f826d2c0..6dde04f1b1 100644 --- a/modules/stock_quantity_issue/tox.ini +++ b/modules/stock_quantity_issue/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_secondary_unit/.drone.yml b/modules/stock_secondary_unit/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_secondary_unit/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_secondary_unit/.flake8 b/modules/stock_secondary_unit/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_secondary_unit/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_secondary_unit/.isort.cfg b/modules/stock_secondary_unit/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_secondary_unit/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_secondary_unit/doc/conf.py b/modules/stock_secondary_unit/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_secondary_unit/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_secondary_unit/setup.py b/modules/stock_secondary_unit/setup.py index f1f59a741d..ab659c3a90 100755 --- a/modules/stock_secondary_unit/setup.py +++ b/modules/stock_secondary_unit/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_secondary_unit' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_secondary_unit/tox.ini b/modules/stock_secondary_unit/tox.ini index 809e160d2c..98f28061ea 100644 --- a/modules/stock_secondary_unit/tox.ini +++ b/modules/stock_secondary_unit/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_shipment_cost/.drone.yml b/modules/stock_shipment_cost/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_shipment_cost/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_shipment_cost/.flake8 b/modules/stock_shipment_cost/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_shipment_cost/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_shipment_cost/.isort.cfg b/modules/stock_shipment_cost/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_shipment_cost/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_shipment_cost/doc/conf.py b/modules/stock_shipment_cost/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_shipment_cost/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_shipment_cost/setup.py b/modules/stock_shipment_cost/setup.py index 2cfb36c61a..44020ce9b5 100755 --- a/modules/stock_shipment_cost/setup.py +++ b/modules/stock_shipment_cost/setup.py @@ -43,23 +43,6 @@ name = 'trytond_stock_shipment_cost' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_shipment_cost/tox.ini b/modules/stock_shipment_cost/tox.ini index b9a1f0e9bd..ae4f1053ae 100644 --- a/modules/stock_shipment_cost/tox.ini +++ b/modules/stock_shipment_cost/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_shipment_cost_weight/.drone.yml b/modules/stock_shipment_cost_weight/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/modules/stock_shipment_cost_weight/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_shipment_cost_weight/.flake8 b/modules/stock_shipment_cost_weight/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_shipment_cost_weight/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_shipment_cost_weight/.isort.cfg b/modules/stock_shipment_cost_weight/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_shipment_cost_weight/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_shipment_cost_weight/doc/conf.py b/modules/stock_shipment_cost_weight/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/stock_shipment_cost_weight/doc/conf.py +++ b/modules/stock_shipment_cost_weight/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_shipment_cost_weight/setup.py b/modules/stock_shipment_cost_weight/setup.py index 3ace720d34..048d6bd540 100755 --- a/modules/stock_shipment_cost_weight/setup.py +++ b/modules/stock_shipment_cost_weight/setup.py @@ -43,24 +43,7 @@ name = 'trytond_stock_shipment_cost_weight' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -68,12 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -149,7 +126,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_shipment_cost_weight/tox.ini b/modules/stock_shipment_cost_weight/tox.ini index 761dc3d803..99b7b7af33 100644 --- a/modules/stock_shipment_cost_weight/tox.ini +++ b/modules/stock_shipment_cost_weight/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_shipment_measurements/.drone.yml b/modules/stock_shipment_measurements/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_shipment_measurements/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_shipment_measurements/.flake8 b/modules/stock_shipment_measurements/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_shipment_measurements/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_shipment_measurements/.isort.cfg b/modules/stock_shipment_measurements/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_shipment_measurements/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_shipment_measurements/doc/conf.py b/modules/stock_shipment_measurements/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_shipment_measurements/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_shipment_measurements/setup.py b/modules/stock_shipment_measurements/setup.py index 1405c96ab6..73e532d4e9 100755 --- a/modules/stock_shipment_measurements/setup.py +++ b/modules/stock_shipment_measurements/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_shipment_measurements' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('trytond_stock_package')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_shipment_measurements/tox.ini b/modules/stock_shipment_measurements/tox.ini index bff1ab828c..a733ec64f7 100644 --- a/modules/stock_shipment_measurements/tox.ini +++ b/modules/stock_shipment_measurements/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_split/.drone.yml b/modules/stock_split/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_split/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_split/.flake8 b/modules/stock_split/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_split/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_split/.isort.cfg b/modules/stock_split/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_split/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_split/doc/conf.py b/modules/stock_split/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_split/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_split/setup.py b/modules/stock_split/setup.py index 070cff72c2..b8310d4994 100755 --- a/modules/stock_split/setup.py +++ b/modules/stock_split/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_split' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_split/tox.ini b/modules/stock_split/tox.ini index 27fc6d27de..04eb455f06 100644 --- a/modules/stock_split/tox.ini +++ b/modules/stock_split/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_supply/.drone.yml b/modules/stock_supply/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_supply/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_supply/.flake8 b/modules/stock_supply/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_supply/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_supply/.isort.cfg b/modules/stock_supply/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_supply/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_supply/doc/conf.py b/modules/stock_supply/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_supply/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_supply/setup.py b/modules/stock_supply/setup.py index d71d5d34c4..97f3061bc3 100755 --- a/modules/stock_supply/setup.py +++ b/modules/stock_supply/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_supply' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -140,7 +118,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_supply/tox.ini b/modules/stock_supply/tox.ini index 4f3af887d9..c0278e68a3 100644 --- a/modules/stock_supply/tox.ini +++ b/modules/stock_supply/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_supply_day/.drone.yml b/modules/stock_supply_day/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_supply_day/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_supply_day/.flake8 b/modules/stock_supply_day/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_supply_day/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_supply_day/.isort.cfg b/modules/stock_supply_day/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_supply_day/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_supply_day/doc/conf.py b/modules/stock_supply_day/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_supply_day/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_supply_day/setup.py b/modules/stock_supply_day/setup.py index 62ff9b2db9..327ca089b9 100755 --- a/modules/stock_supply_day/setup.py +++ b/modules/stock_supply_day/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_supply_day' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to add supply weekdays', @@ -136,7 +113,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_supply_day/tox.ini b/modules/stock_supply_day/tox.ini index b18be9fddb..cd8559570d 100644 --- a/modules/stock_supply_day/tox.ini +++ b/modules/stock_supply_day/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_supply_forecast/.drone.yml b/modules/stock_supply_forecast/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_supply_forecast/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_supply_forecast/.flake8 b/modules/stock_supply_forecast/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_supply_forecast/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_supply_forecast/.isort.cfg b/modules/stock_supply_forecast/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_supply_forecast/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_supply_forecast/doc/conf.py b/modules/stock_supply_forecast/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_supply_forecast/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_supply_forecast/setup.py b/modules/stock_supply_forecast/setup.py index fc31619bfc..936d172b02 100755 --- a/modules/stock_supply_forecast/setup.py +++ b/modules/stock_supply_forecast/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_supply_forecast' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_supply_forecast/tox.ini b/modules/stock_supply_forecast/tox.ini index 637e9fdcbd..de0b4cad61 100644 --- a/modules/stock_supply_forecast/tox.ini +++ b/modules/stock_supply_forecast/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/stock_supply_production/.drone.yml b/modules/stock_supply_production/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/stock_supply_production/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/stock_supply_production/.flake8 b/modules/stock_supply_production/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/stock_supply_production/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/stock_supply_production/.isort.cfg b/modules/stock_supply_production/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/stock_supply_production/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/stock_supply_production/doc/conf.py b/modules/stock_supply_production/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/stock_supply_production/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/stock_supply_production/setup.py b/modules/stock_supply_production/setup.py index b0971f101e..137835e4cf 100755 --- a/modules/stock_supply_production/setup.py +++ b/modules/stock_supply_production/setup.py @@ -40,23 +40,6 @@ name = 'trytond_stock_supply_production' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/stock_supply_production/tox.ini b/modules/stock_supply_production/tox.ini index 584414c0e1..e75c91bafd 100644 --- a/modules/stock_supply_production/tox.ini +++ b/modules/stock_supply_production/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/timesheet/.drone.yml b/modules/timesheet/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/timesheet/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/timesheet/.flake8 b/modules/timesheet/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/timesheet/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/timesheet/.isort.cfg b/modules/timesheet/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/timesheet/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/timesheet/doc/conf.py b/modules/timesheet/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/timesheet/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/timesheet/setup.py b/modules/timesheet/setup.py index 4fa02af479..733c1887cb 100755 --- a/modules/timesheet/setup.py +++ b/modules/timesheet/setup.py @@ -43,23 +43,6 @@ name = 'trytond_timesheet' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql', 'werkzeug'] for dep in info.get('depends', []): @@ -67,12 +50,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module with timesheets', @@ -140,7 +117,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/timesheet/tox.ini b/modules/timesheet/tox.ini index fd57405bd4..fc12f21878 100644 --- a/modules/timesheet/tox.ini +++ b/modules/timesheet/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/timesheet_cost/.drone.yml b/modules/timesheet_cost/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/timesheet_cost/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/timesheet_cost/.flake8 b/modules/timesheet_cost/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/timesheet_cost/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/timesheet_cost/.isort.cfg b/modules/timesheet_cost/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/timesheet_cost/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/timesheet_cost/doc/conf.py b/modules/timesheet_cost/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/timesheet_cost/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/timesheet_cost/setup.py b/modules/timesheet_cost/setup.py index 96981c1b74..1a52119ec9 100755 --- a/modules/timesheet_cost/setup.py +++ b/modules/timesheet_cost/setup.py @@ -40,23 +40,6 @@ name = 'trytond_timesheet_cost' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql >= 0.4'] for dep in info.get('depends', []): @@ -64,12 +47,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond_%s' % dep)) requires.append(get_require_version('trytond')) -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - setup(name=name, version=version, description='Tryton module to add cost on timesheet', @@ -137,7 +114,6 @@ setup(name=name, license='GPL-3', python_requires='>=3.7', install_requires=requires, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/timesheet_cost/tox.ini b/modules/timesheet_cost/tox.ini index b5615a3b3d..9ab882a74d 100644 --- a/modules/timesheet_cost/tox.ini +++ b/modules/timesheet_cost/tox.ini @@ -8,9 +8,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/user_role/.drone.yml b/modules/user_role/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/user_role/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/user_role/.flake8 b/modules/user_role/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/user_role/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/user_role/.isort.cfg b/modules/user_role/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/user_role/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/user_role/doc/conf.py b/modules/user_role/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/user_role/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/user_role/setup.py b/modules/user_role/setup.py index af0547f2ea..0ab4452cc5 100755 --- a/modules/user_role/setup.py +++ b/modules/user_role/setup.py @@ -40,23 +40,6 @@ name = 'trytond_user_role' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [get_require_version('proteus')] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/user_role/tox.ini b/modules/user_role/tox.ini index 1de67aa285..10467a66aa 100644 --- a/modules/user_role/tox.ini +++ b/modules/user_role/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/web_shop/.drone.yml b/modules/web_shop/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/web_shop/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/web_shop/.flake8 b/modules/web_shop/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/web_shop/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/web_shop/.isort.cfg b/modules/web_shop/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/web_shop/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/web_shop/doc/conf.py b/modules/web_shop/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/web_shop/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/web_shop/setup.py b/modules/web_shop/setup.py index b344f6b64f..c2f1e2d6ce 100755 --- a/modules/web_shop/setup.py +++ b/modules/web_shop/setup.py @@ -43,23 +43,6 @@ name = 'trytond_web_shop' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -71,11 +54,6 @@ tests_require = [ get_require_version('trytond_product_attribute'), get_require_version('trytond_product_image'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -145,7 +123,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/web_shop/tox.ini b/modules/web_shop/tox.ini index d81f5f136b..376bd00d5e 100644 --- a/modules/web_shop/tox.ini +++ b/modules/web_shop/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/web_shop_shopify/.drone.yml b/modules/web_shop_shopify/.drone.yml deleted file mode 100644 index 248cfe037b..0000000000 --- a/modules/web_shop_shopify/.drone.yml +++ /dev/null @@ -1,79 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID SHOPIFY_PASSWORD SHOPIFY_URL TRYTOND_WEB_SHOP_SHOPIFY__API_BACKOFF_TIME - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - secrets: [ shopify_password, shopify_url, trytond_web_shop_shopify__api_backoff_time ] - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/web_shop_shopify/.flake8 b/modules/web_shop_shopify/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/web_shop_shopify/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/web_shop_shopify/.isort.cfg b/modules/web_shop_shopify/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/web_shop_shopify/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/web_shop_shopify/doc/conf.py b/modules/web_shop_shopify/doc/conf.py index 8513b72dd2..4db2bff708 100644 --- a/modules/web_shop_shopify/doc/conf.py +++ b/modules/web_shop_shopify/doc/conf.py @@ -1,13 +1,20 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): import configparser - import os import subprocess import sys @@ -57,5 +64,6 @@ intersphinx_mapping.update({ module=m.replace('_', '-'), series=version), None) for m in info['modules'] }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/web_shop_shopify/setup.py b/modules/web_shop_shopify/setup.py index 61c57f95f6..b980400a69 100755 --- a/modules/web_shop_shopify/setup.py +++ b/modules/web_shop_shopify/setup.py @@ -43,24 +43,7 @@ name = 'trytond_web_shop_shopify' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['ShopifyAPI', 'pyactiveresource', 'python-sql', 'python-dateutil'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): @@ -77,12 +60,6 @@ tests_require = [ get_require_version('trytond_sale_shipment_cost'), get_require_version('trytond_sale_secondary_unit'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version) - ) setup(name=name, version=version, @@ -156,7 +133,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/web_shop_shopify/tox.ini b/modules/web_shop_shopify/tox.ini index 91426e5b25..3e650bcd13 100644 --- a/modules/web_shop_shopify/tox.ini +++ b/modules/web_shop_shopify/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/web_shop_vue_storefront/.drone.yml b/modules/web_shop_vue_storefront/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/web_shop_vue_storefront/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/web_shop_vue_storefront/.flake8 b/modules/web_shop_vue_storefront/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/web_shop_vue_storefront/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/web_shop_vue_storefront/.isort.cfg b/modules/web_shop_vue_storefront/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/web_shop_vue_storefront/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/web_shop_vue_storefront/doc/conf.py b/modules/web_shop_vue_storefront/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/web_shop_vue_storefront/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/web_shop_vue_storefront/setup.py b/modules/web_shop_vue_storefront/setup.py index 310f07bed3..0b617a86c7 100755 --- a/modules/web_shop_vue_storefront/setup.py +++ b/modules/web_shop_vue_storefront/setup.py @@ -43,23 +43,6 @@ name = 'trytond_web_shop_vue_storefront' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['elasticsearch', 'python-stdnum >= 1.1.0', 'werkzeug'] for dep in info.get('depends', []): @@ -75,11 +58,6 @@ tests_require = [ get_require_version('trytond_sale_shipment_cost'), get_require_version('trytond_carrier'), ] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -152,7 +130,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/web_shop_vue_storefront/tox.ini b/modules/web_shop_vue_storefront/tox.ini index 953b991317..a1ec9920ff 100644 --- a/modules/web_shop_vue_storefront/tox.ini +++ b/modules/web_shop_vue_storefront/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/web_shop_vue_storefront_stripe/.drone.yml b/modules/web_shop_vue_storefront_stripe/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/web_shop_vue_storefront_stripe/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/web_shop_vue_storefront_stripe/.flake8 b/modules/web_shop_vue_storefront_stripe/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/web_shop_vue_storefront_stripe/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/web_shop_vue_storefront_stripe/.isort.cfg b/modules/web_shop_vue_storefront_stripe/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/web_shop_vue_storefront_stripe/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/web_shop_vue_storefront_stripe/doc/conf.py b/modules/web_shop_vue_storefront_stripe/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/web_shop_vue_storefront_stripe/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/web_shop_vue_storefront_stripe/setup.py b/modules/web_shop_vue_storefront_stripe/setup.py index c5711a99f2..36562e30fd 100755 --- a/modules/web_shop_vue_storefront_stripe/setup.py +++ b/modules/web_shop_vue_storefront_stripe/setup.py @@ -43,23 +43,6 @@ name = 'trytond_web_shop_vue_storefront_stripe' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -68,11 +51,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -146,7 +124,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/web_shop_vue_storefront_stripe/tox.ini b/modules/web_shop_vue_storefront_stripe/tox.ini index 44d046f301..4d67654ec9 100644 --- a/modules/web_shop_vue_storefront_stripe/tox.ini +++ b/modules/web_shop_vue_storefront_stripe/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/web_shortener/.drone.yml b/modules/web_shortener/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/web_shortener/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/web_shortener/.flake8 b/modules/web_shortener/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/web_shortener/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/web_shortener/.isort.cfg b/modules/web_shortener/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/web_shortener/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/web_shortener/doc/conf.py b/modules/web_shortener/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/web_shortener/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/web_shortener/setup.py b/modules/web_shortener/setup.py index c8043be3c7..1097de1c02 100755 --- a/modules/web_shortener/setup.py +++ b/modules/web_shortener/setup.py @@ -40,23 +40,6 @@ name = 'trytond_web_shortener' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['python-sql', 'werkzeug'] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -141,7 +119,6 @@ setup(name=name, extras_require={ 'test': tests_require, }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/web_shortener/tox.ini b/modules/web_shortener/tox.ini index 115140644d..5a573ba27a 100644 --- a/modules/web_shortener/tox.ini +++ b/modules/web_shortener/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/modules/web_user/.drone.yml b/modules/web_user/.drone.yml deleted file mode 100644 index cb4fbecb4d..0000000000 --- a/modules/web_user/.drone.yml +++ /dev/null @@ -1,70 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/modules/web_user/.flake8 b/modules/web_user/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/modules/web_user/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/modules/web_user/.isort.cfg b/modules/web_user/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/modules/web_user/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/modules/web_user/doc/conf.py b/modules/web_user/doc/conf.py new file mode 100644 index 0000000000..4db2bff708 --- /dev/null +++ b/modules/web_user/doc/conf.py @@ -0,0 +1,69 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' + + +def get_info(): + import configparser + import subprocess + import sys + + module_dir = os.path.dirname(os.path.dirname(__file__)) + + config = configparser.ConfigParser() + config.read_file(open(os.path.join(module_dir, 'tryton.cfg'))) + info = dict(config.items('tryton')) + + result = subprocess.run( + [sys.executable, 'setup.py', '--name'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + info['name'] = result.stdout.decode('utf-8').strip() + + result = subprocess.run( + [sys.executable, 'setup.py', '--version'], + stdout=subprocess.PIPE, check=True, cwd=module_dir) + version = result.stdout.decode('utf-8').strip() + if 'dev' in version: + info['series'] = 'latest' + else: + info['series'] = '.'.join(version.split('.', 2)[:2]) + + for key in {'depends', 'extras_depend'}: + info[key] = info.get(key, '').strip().splitlines() + info['modules'] = set(info['depends'] + info['extras_depend']) + info['modules'] -= {'ir', 'res'} + + return info + + +info = get_info() + +master_doc = 'index' +project = info['name'] +release = version = info['series'] +default_role = 'ref' +highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'trytond': (trytond_url.format(series=version), None), + } +intersphinx_mapping.update({ + m: (modules_url.format( + module=m.replace('_', '-'), series=version), None) + for m in info['modules'] + }) +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] + +del get_info, info, base_url, modules_url, trytond_url diff --git a/modules/web_user/setup.py b/modules/web_user/setup.py index 4647f5a1ac..6cb4f285e7 100755 --- a/modules/web_user/setup.py +++ b/modules/web_user/setup.py @@ -40,23 +40,6 @@ name = 'trytond_web_user' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = ( - 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( - name[8:], name, version)) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = [] for dep in info.get('depends', []): @@ -65,11 +48,6 @@ for dep in info.get('depends', []): requires.append(get_require_version('trytond')) tests_require = [] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -142,7 +120,6 @@ setup(name=name, 'test': tests_require, 'html2text': ['html2text'], }, - dependency_links=dependency_links, zip_safe=False, entry_points=""" [trytond.modules] diff --git a/modules/web_user/tox.ini b/modules/web_user/tox.ini index b6e599948d..dccc5b3843 100644 --- a/modules/web_user/tox.ini +++ b/modules/web_user/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test} diff --git a/proteus/.drone.yml b/proteus/.drone.yml deleted file mode 100644 index f37746fe42..0000000000 --- a/proteus/.drone.yml +++ /dev/null @@ -1,50 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - TOX_TESTENV_PASSENV=CFLAGS CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox pydot - - tox -e "${TOXENV}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - - IMAGE: python:3.8 - TOXENV: py38 - - IMAGE: python:3.9 - TOXENV: py39 - - IMAGE: python:3.10 - TOXENV: py310 diff --git a/proteus/.flake8 b/proteus/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/proteus/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/proteus/.isort.cfg b/proteus/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/proteus/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/proteus/doc/conf.py b/proteus/doc/conf.py index fd190772eb..69481c2fa5 100644 --- a/proteus/doc/conf.py +++ b/proteus/doc/conf.py @@ -1,12 +1,19 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): - import os import subprocess import sys @@ -38,5 +45,12 @@ project = info['name'] release = version = info['series'] default_role = 'ref' highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'python': ('https://docs.python.org/', None), + } +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/proteus/setup.py b/proteus/setup.py index fa3ca38484..22dd4a4ba2 100755 --- a/proteus/setup.py +++ b/proteus/setup.py @@ -44,28 +44,6 @@ minor_version = int(minor_version) download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = 'hg+http://hg.tryton.org/%s#egg=%s-%s' % ( - name, name, version) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) - -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) setup(name=name, version=version, @@ -115,6 +93,5 @@ setup(name=name, get_require_version('trytond_party'), ], }, - dependency_links=dependency_links, zip_safe=True, ) diff --git a/proteus/tox.ini b/proteus/tox.ini index c0e3b63cbd..3e1b9293c4 100644 --- a/proteus/tox.ini +++ b/proteus/tox.ini @@ -7,7 +7,7 @@ commands = coverage run -m unittest discover -s proteus.tests coverage report --include=./proteus/* --omit=*/tests/* deps = coverage +passenv = * setenv = TRYTOND_DATABASE_URI={env:TRYTOND_DATBASE_URI:sqlite://} DB_NAME={env:DB_NAME::memory:} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} diff --git a/readthedocs/conf.py b/readthedocs/conf.py new file mode 100644 index 0000000000..9d44983dd4 --- /dev/null +++ b/readthedocs/conf.py @@ -0,0 +1,8 @@ +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. + +master_doc = 'index' +project = "Tryton Documentation" +default_role = 'ref' +highlight_language = 'none' +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] diff --git a/sao/.drone.yml b/sao/.drone.yml deleted file mode 100644 index e2a994d6b3..0000000000 --- a/sao/.drone.yml +++ /dev/null @@ -1,17 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - npm: - image: tryton/sao-test - commands: - - sh .bower_allow_root.sh - - npm -s install --unsafe-perm --legacy-peer-deps - - npm test - volumes: - - cache-npm:/root/.npm diff --git a/tryton/.drone.yml b/tryton/.drone.yml deleted file mode 100644 index 221a796b76..0000000000 --- a/tryton/.drone.yml +++ /dev/null @@ -1,46 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - TOX_TESTENV_PASSENV=CFLAGS CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - commands: - - pip install tox - - tox -e "${TOXENV}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -matrix: - include: - - IMAGE: tryton/tryton-test:3.7 - TOXENV: py37 - - IMAGE: tryton/tryton-test:3.8 - TOXENV: py38 - - IMAGE: tryton/tryton-test:3.9 - TOXENV: py39 - - IMAGE: tryton/tryton-test:3.10 - TOXENV: py310 diff --git a/tryton/.flake8 b/tryton/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/tryton/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/tryton/.isort.cfg b/tryton/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/tryton/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/tryton/doc/conf.py b/tryton/doc/conf.py index fd190772eb..69481c2fa5 100644 --- a/tryton/doc/conf.py +++ b/tryton/doc/conf.py @@ -1,12 +1,19 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): - import os import subprocess import sys @@ -38,5 +45,12 @@ project = info['name'] release = version = info['series'] default_role = 'ref' highlight_language = 'none' +extensions = [ + 'sphinx.ext.intersphinx', + ] +intersphinx_mapping = { + 'python': ('https://docs.python.org/', None), + } +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/tryton/setup.py b/tryton/setup.py index 6a2943ae9b..b181547e27 100755 --- a/tryton/setup.py +++ b/tryton/setup.py @@ -70,28 +70,6 @@ name = 'tryton' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = 'hg+http://hg.tryton.org/%s#egg=%s-%s' % ( - name, name, version) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) - -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) dist = setup(name=name, version=version, @@ -159,7 +137,6 @@ dist = setup(name=name, extras_require={ 'calendar': ['GooCalendar>=0.7'], }, - dependency_links=dependency_links, zip_safe=False, **args ) diff --git a/tryton/tox.ini b/tryton/tox.ini index 7964b29cb5..dc3b7cf65d 100644 --- a/tryton/tox.ini +++ b/tryton/tox.ini @@ -7,4 +7,4 @@ commands = coverage report --include=./tryton/* --omit=*/tests/* deps = coverage -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} +passenv = * diff --git a/trytond-gis/.drone.yml b/trytond-gis/.drone.yml deleted file mode 100644 index ca3cbf71d3..0000000000 --- a/trytond-gis/.drone.yml +++ /dev/null @@ -1,59 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGIS_URI=postgis://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgis/postgis - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - - IMAGE: python:3.8 - TOXENV: py38 - - IMAGE: python:3.9 - TOXENV: py39 - - IMAGE: python:3.10 - TOXENV: py310 diff --git a/trytond-gis/.flake8 b/trytond-gis/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/trytond-gis/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/trytond-gis/.isort.cfg b/trytond-gis/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/trytond-gis/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/trytond-gis/doc/conf.py b/trytond-gis/doc/conf.py index 62de4fa544..5c9a4b5744 100644 --- a/trytond-gis/doc/conf.py +++ b/trytond-gis/doc/conf.py @@ -1,12 +1,19 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): - import os import subprocess import sys @@ -42,7 +49,9 @@ extensions = [ 'sphinx.ext.intersphinx', ] intersphinx_mapping = { + 'python': ('https://docs.python.org/', None), 'trytond': (trytond_url.format(series=version), None), } +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/trytond-gis/setup.py b/trytond-gis/setup.py index a1506c99c2..7e1623c04c 100755 --- a/trytond-gis/setup.py +++ b/trytond-gis/setup.py @@ -44,32 +44,9 @@ name = 'trytond_gis' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = 'hg+http://hg.tryton.org/%s#egg=%s-%s' % ( - name, name, version) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) requires = ['geomet', get_require_version('trytond'), 'psycopg2 >= 2.0.14'] -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) - - setup(name=name, version=version, description='Adds Geographic Information System support to trytond', @@ -110,6 +87,5 @@ setup(name=name, 'test_geographic_fields = trytond_gis.tests', ], }, - dependency_links=dependency_links, zip_safe=False, ) diff --git a/trytond-gis/tox.ini b/trytond-gis/tox.ini index 4ed403bb80..7944bccd58 100644 --- a/trytond-gis/tox.ini +++ b/trytond-gis/tox.ini @@ -7,7 +7,7 @@ commands = coverage run -a -m unittest discover -s trytond_gis.tests coverage report --include=./trytond_gis/* --omit=*/tests/* deps = coverage +passenv = * setenv = TRYTOND_DATABASE_URI={env:POSTGIS_URI:postgis://} - DB_NAME={env:POSTGIS_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + DB_NAME={env:DB_NAME:test} diff --git a/trytond/.drone.yml b/trytond/.drone.yml deleted file mode 100644 index b45ef267ef..0000000000 --- a/trytond/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -clone: - hg: - image: plugins/hg - environment: - - HG_SHARE_POOL=/root/.cache/hg - volumes: - - cache:/root/.cache - -pipeline: - tox: - image: ${IMAGE} - environment: - - CFLAGS=-O0 - - DB_CACHE=/cache - - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID - - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/ - commands: - - echo "[extensions]" >> /root/.hgrc - - echo "hgext.share =" >> /root/.hgrc - - echo "[share]" >> /root/.hgrc - - echo "pool = /root/.cache/hg" >> /root/.hgrc - - pip install tox - - tox -e "${TOXENV}-${DATABASE}" - volumes: - - cache:/root/.cache - check_dist: - image: ${IMAGE} - commands: - - pip install twine - - python setup.py sdist - - twine check dist/* - volumes: - - cache:/root/.cache - check_doc: - image: ${IMAGE} - commands: - - pip install sphinx - - python -m sphinx -T -E -W -n -b html doc _build/html - - python -m sphinx -T -E -W -n -b linkcheck doc _build - volumes: - - cache:/root/.cache - -services: - postgresql: - image: postgres - environment: - - POSTGRES_HOST_AUTH_METHOD=trust - command: "-c fsync=off -c synchronous_commit=off -c full_page_writes=off" - when: - matrix: - DATABASE: postgresql - -matrix: - include: - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: sqlite - - IMAGE: python:3.7 - TOXENV: py37 - DATABASE: postgresql - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: sqlite - - IMAGE: python:3.8 - TOXENV: py38 - DATABASE: postgresql - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: sqlite - - IMAGE: python:3.9 - TOXENV: py39 - DATABASE: postgresql - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: sqlite - - IMAGE: python:3.10 - TOXENV: py310 - DATABASE: postgresql diff --git a/trytond/.flake8 b/trytond/.flake8 deleted file mode 100644 index fa6b4f66d1..0000000000 --- a/trytond/.flake8 +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -ignore=E123,E124,E126,E128,E741,W503 diff --git a/trytond/.isort.cfg b/trytond/.isort.cfg deleted file mode 100644 index e1c6495da9..0000000000 --- a/trytond/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -multi_line_output=4 -known_first_party=trytond diff --git a/trytond/doc/conf.py b/trytond/doc/conf.py index cd651411bb..69481c2fa5 100644 --- a/trytond/doc/conf.py +++ b/trytond/doc/conf.py @@ -1,12 +1,19 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -modules_url = 'https://docs.tryton.org/projects/modules-{module}/en/{series}/' -trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' +import os + +base_url = os.environ.get('DOC_BASE_URL') +if base_url: + modules_url = base_url + '/modules-{module}/' + trytond_url = base_url + '/server/' +else: + modules_url = ( + 'https://docs.tryton.org/projects/modules-{module}/en/{series}/') + trytond_url = 'https://docs.tryton.org/projects/server/en/{series}/' def get_info(): - import os import subprocess import sys @@ -44,5 +51,6 @@ extensions = [ intersphinx_mapping = { 'python': ('https://docs.python.org/', None), } +linkcheck_ignore = [r'/.*', r'https://demo.tryton.org/*'] -del get_info, info, modules_url, trytond_url +del get_info, info, base_url, modules_url, trytond_url diff --git a/trytond/setup.py b/trytond/setup.py index d608c175d1..52863017e1 100755 --- a/trytond/setup.py +++ b/trytond/setup.py @@ -49,28 +49,6 @@ name = 'trytond' download_url = 'http://downloads.tryton.org/%s.%s/' % ( major_version, minor_version) -if minor_version % 2: - version = '%s.%s.dev0' % (major_version, minor_version) - download_url = 'hg+http://hg.tryton.org/%s#egg=%s-%s' % ( - name, name, version) -local_version = [] -if os.environ.get('CI_JOB_ID'): - local_version.append(os.environ['CI_JOB_ID']) -else: - for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']: - if os.environ.get(build): - local_version.append(os.environ[build]) - else: - local_version = [] - break -if local_version: - version += '+' + '.'.join(local_version) - -dependency_links = [] -if minor_version % 2: - dependency_links.append( - 'https://trydevpi.tryton.org/?local_version=' - + '.'.join(local_version)) tests_require = ['pillow'] @@ -177,7 +155,6 @@ setup(name=name, 'image': ['pillow'], 'completion': ['argcomplete'], }, - dependency_links=dependency_links, zip_safe=False, cmdclass={ 'update_rng': rnc2rng, diff --git a/trytond/tox.ini b/trytond/tox.ini index 410cf79383..ffef2ccc53 100644 --- a/trytond/tox.ini +++ b/trytond/tox.ini @@ -9,9 +9,9 @@ commands = deps = coverage postgresql: psycopg2 >= 2.7.0 +passenv = * setenv = sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://} postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://} - sqlite: DB_NAME={env:SQLITE_NAME::memory:} - postgresql: DB_NAME={env:POSTGRESQL_NAME:test} -install_command = pip install --pre --find-links https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER:}.{env:CI_JOB_NUMBER:}} {opts} {packages} + sqlite: DB_NAME={env:DB_NAME::memory:} + postgresql: DB_NAME={env:DB_NAME:test}