Skip to content

Commit a250cc0

Browse files
author
Ilan Piperno
authored
Merge pull request #45 from lumapps/prepare_new_release
Preparing new release + correcting some typos
2 parents 7341803 + 233bd54 commit a250cc0

File tree

3 files changed

+37
-24
lines changed

3 files changed

+37
-24
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ You can also see [other installation methods](https://github.com/lumapps/dep-che
3232

3333
## Usage
3434

35-
### Build your config file
35+
### Build your configuration file
3636

3737
```sh
3838
dep_check build <ROOT_DIR> [-o config.yaml] [--lang LANG]
@@ -44,7 +44,7 @@ ROOT_DIR | The project root directory, containing the source files | :x: | *N/A*
4444
-o / --output | The output file (yaml format) | :heavy_check_mark: | dependency_config.yaml
4545
--lang | The language the project is written in | :heavy_check_mark: | python
4646

47-
This command lists the imports of each module in a yaml file. Use this fileas as a starting point to write dependency rules on which module can import what, using wildcards.
47+
This command lists the imports of each module in a yaml file. Use this file as a starting point to write dependency rules on which module can import what, using wildcards.
4848

4949
Here is an example of additional rules added to the initial yaml file:
5050

@@ -81,9 +81,9 @@ local_init: false
8181

8282
Here, for instance, the configuration file defines that `dep_check.infra.io` can import `dep_check.use_cases`, along with `dep_check.use_cases.build`, `dep_check.use_cases.check`, and so on.
8383

84-
*To see all the supported wildcards, check the [User Manual](https://github.com/lumapps/dep-check/blob/master/doc/usage.md#writing-your-own-configuration-file).*
84+
*To see all the supported wildcards, check the [User Manual](https://github.com/lumapps/dep-check/blob/master/doc/usage.md#write-your-own-configuration-file).*
8585

86-
### Check your config
86+
### Check your configuration
8787

8888
Once your config file is ready, run
8989

@@ -93,7 +93,7 @@ dep_check check <ROOT_DIR> [-c config.yaml] [--lang LANG]
9393

9494
Argument | Description | Optional | Default
9595
-------- | ----------- | -------- | -------
96-
ROOT_DIR | The root directory of your project, containing the source files | :x: | *N/A*
96+
ROOT_DIR | The project root directory, containing the source files | :x: | *N/A*
9797
-c / --config | The yaml file in which you wrote the dependency rules | :heavy_check_mark: | dependency_config.yaml
9898
--lang | The language the project is written in | :heavy_check_mark: | python
9999

@@ -113,14 +113,14 @@ dep_check graph <ROOT_DIR> [-o file.svg/dot] [-c config.yaml] [--lang LANG]
113113

114114
Argument | Description | Optional | Default
115115
-------- | ----------- | -------- | -------
116-
ROOT_DIR | The project root directory of, containing your source files | :x: | *N/A*
116+
ROOT_DIR | The project root directory, containing the source files | :x: | *N/A*
117117
-o / --output | The output file you want (svg or dot format) | :heavy_check_mark: | dependency_graph.svg
118118
-c / --config | The graph configuration file containing options (yaml format) | :heavy_check_mark:| None
119119
--lang | The language the project is written in | :heavy_check_mark: | python
120120

121121
*Note : if you generate a svg file, a dot file is also created in `/tmp/graph.dot`*
122122

123-
A lot of options are available to customize your graph (hide some modules, add layers etc.). Check the [User Manual](https://github.com/lumapps/dep-check/blob/master/doc/usage.md#adding-options) for more information.
123+
A lot of options are available to customize your graph (hide some modules, add layers etc.). Check the [User Manual](https://github.com/lumapps/dep-check/blob/master/doc/usage.md#add-options) for more information.
124124

125125
## Contributing
126126

doc/CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
# History
1+
# CHANGELOG
2+
3+
## 1.0.0 (2019-08-20)
4+
5+
### Modified
6+
7+
- The tool now writes a full report, displaying the number of errors, warnings and files.
8+
- The commands have been simplified, to avoid too long command lines
9+
10+
### Added
11+
12+
- The tool now supports Go language
13+
- Better documentation
214

315
## 0.2.0 (2019-07-16)
416

doc/usage.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ dep_check build <ROOT_DIR> [-o config.yaml] [--lang LANG]
1717

1818
Argument | Description | Optional | Default
1919
-------- | ----------- | -------- | -------
20-
ROOT_DIR | The root directory of your project, containing you source files | :x: | *N/A*
21-
-o / --output | The output file you want (yaml format) | :heavy_check_mark: | dependency_config.yaml
22-
--lang | The language your project is written in | :heavy_check_mark: | python
20+
ROOT_DIR | The project root directory, containing the source files | :x: | *N/A*
21+
-o / --output | The output file (yaml format) | :heavy_check_mark: | dependency_config.yaml
22+
--lang | The language the project is written in | :heavy_check_mark: | python
2323

24-
This command lists the imports of each module in a yaml file. Using this file, write some dependency rules on which module can import what, using wildcards.
24+
This command lists the imports of each module in a yaml file. Use this file as a starting point to write dependency rules on which module can import what, using wildcards.
2525

26-
Here is an example:
26+
Here is an example of additional rules added to the initial yaml file:
2727

2828
```yaml
2929
---
@@ -63,7 +63,7 @@ You can build your own configuration file, using wildcards. Here are those suppo
6363
* `[d-y]` corresponds to any character between 'd' and 'y'
6464
* `[!d-y]` corresponds to any character which is **not** between 'd' and 'y'
6565
* `[!abc]` corresponds to any character except 'a', 'b' or 'c'
66-
* Using the `%` character after a module name (e.g. `my_module%`) includes this module along with its sub-modules.
66+
* Use `%` after a module name (e.g. `my_module%`) to include this module along with its sub-modules.
6767

6868
### Examples
6969

@@ -74,7 +74,7 @@ mymodule:
7474
- othermodul?_[0-9]
7575
```
7676

77-
With those rules, we tell the tool that `mymodule` can import:
77+
Here, the rules define that `mymodule` can import:
7878

7979
* `mymodule`
8080
* `mymodule.anything.moduleagain`
@@ -106,37 +106,38 @@ dep_check check <ROOT_DIR> [-c config.yaml] [--lang LANG]
106106

107107
Argument | Description | Optional | Default
108108
-------- | ----------- | -------- | -------
109-
ROOT_DIR | The root directory of your project, containing you source files | :x: | *N/A*
110-
-c / --config | The input file in which you wrote the dependency rules (yaml format) | :heavy_check_mark: | dependency_config.yaml
111-
--lang | The language your project is written in | :heavy_check_mark: | python
109+
ROOT_DIR | The project root directory, containing the source files | :x: | *N/A*
110+
-c / --config | The yaml file in which you wrote the dependency rules | :heavy_check_mark: | dependency_config.yaml
111+
--lang | The language the project is written in | :heavy_check_mark: | python
112112

113-
The command reads the configuration file, and parse every source file. It then verifies, for each file, that every `import` is authorized by the rules in the configuration file.
113+
The command reads the configuration file, and parses each source file. It then verifies, for each file, that every `import` is authorized by the rules defined in the configuration file.
114114

115115
When it's done, it writes a report on the console, listing import errors by module and unused rules:
116116

117117
![report](images/report.png)
118118

119119
## Draw a dependency graph
120120

121+
**You need to have graphviz installed to run this command**
122+
121123
```sh
122-
# You need to have graphviz installed to run this
123124
dep_check graph <ROOT_DIR> [-o file.svg/dot] [-c config.yaml] [--lang LANG]
124125
```
125126

126127
Argument | Description | Optional | Default
127128
-------- | ----------- | -------- | -------
128-
ROOT_DIR | The root directory of your project, containing you source files | :x: | *N/A*
129+
ROOT_DIR | The project root directory, containing the source files | :x: | *N/A*
129130
-o / --output | The output file you want (svg or dot format) | :heavy_check_mark: | dependency_graph.svg
130-
-c / --config | The graph configuration file, to write options that you want (yaml format) | :heavy_check_mark:| None
131-
--lang | The language your project is written in | :heavy_check_mark: | python
131+
-c / --config | The graph configuration file containing options (yaml format) | :heavy_check_mark:| None
132+
--lang | The language the project is written in | :heavy_check_mark: | python
132133

133134
*Note : if you generate a svg file, a dot file is created in `/tmp/graph.dot`*
134135

135136
![simple_graph](images/dependency_graph.svg)
136137

137138
### Add options
138139

139-
The graph you'll get may seem unreadable if your project is pretty big. If that's the case, add options to the graph you want to draw, using a YAML config file.
140+
The graph you'll get may seem unreadable if your project is pretty big. If that's the case, add options to the graph you want to draw, using a YAML configuration file.
140141

141142
Here is a config example:
142143

0 commit comments

Comments
 (0)