Skip to content

Commit

Permalink
Merge branch 'skipping-improvements' into 'master'
Browse files Browse the repository at this point in the history
Allow to skip specific parts of the analyse. Load module list from stdin....

See merge request Python/odoo-analyse!15
  • Loading branch information
fkantelberg committed Oct 5, 2023
2 parents 5eb65a6 + 98d7602 commit 17b34da
Show file tree
Hide file tree
Showing 9 changed files with 352 additions and 169 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ disable=bad-inline-option,


[IMPORTS]
ignored-modules=lxml,odoo,pytest
ignored-modules=lxml,odoo,pytest,radon,odoo_analyse
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Or if you want to output it to `stdout`:

`--test-filter` .. Include module starting with `test_`

`--estimate-state` .. Estimate the state of a module (installed/uninstalled) only using dependencies and auto_install flags.

`--state-filter installed` .. Only modules with a specific state. This connects to a database to determine the state of a module. The connection information are extracted from a configuration file or using the database parameters

`--full-graph` .. If set all the above filters are only used for the starting nodes and not for the base modules
Expand Down Expand Up @@ -77,6 +79,22 @@ These options can be used to extract instance specific information about modules

`--db-password` .. If specified a password prompt will ask for the password to connect to the database

### Skipping

These options control what is analysed and can result in a faster analyse.

`--skip-all` .. All of the below

`--skip-assets` .. Skip analysing assets (JS, CSS, Web Templates, ...)

`--skip-data` .. Skip analysing CSV and XML data

`--skip-language` .. Skip analysing the lines of code

`--skip-python` .. Skip analysing python files (controllers, models, ...)

`--skip-readme` .. Skip reading the readme files

## Examples

### Usage as library
Expand Down Expand Up @@ -112,4 +130,7 @@ $ odoo_analyse -l /path/to/cache.json --modules 'sale_*' --show-dependency --ful

# Connect to the database from the odoo.cfg and create the dependency graph of all installed modules
$ odoo_analyse -l /path/to/cache.json -c /path/to/odoo.cfg --state-filter installed --show-dependency

# Estimate the state using the module dependencies and auto_install flags based on the `modules` given via stdin. Output the analysed installed modules to `analyse.json`.
$ cat modules.txt | odoo_analyse -p odoo --modules - --analyse analyse.json --estimate-state --state-filter installed
```
2 changes: 1 addition & 1 deletion src/odoo_analyse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"geometric_mean",
]

VERSION = "1.5.0"
VERSION = "1.6.0"
Loading

0 comments on commit 17b34da

Please sign in to comment.