File tree Expand file tree Collapse file tree 7 files changed +85
-3
lines changed Expand file tree Collapse file tree 7 files changed +85
-3
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name : Upload Python Package
10
+
11
+ on :
12
+ release :
13
+ types : [published]
14
+
15
+ permissions :
16
+ contents : read
17
+
18
+ jobs :
19
+ deploy :
20
+
21
+ runs-on : ubuntu-latest
22
+
23
+ steps :
24
+ - uses : actions/checkout@v3
25
+ - name : Set up Python
26
+ uses : actions/setup-python@v3
27
+ with :
28
+ python-version : ' 3.x'
29
+ - name : Install dependencies
30
+ run : |
31
+ python -m pip install --upgrade pip
32
+ pip install build
33
+ - name : Build package
34
+ run : python -m build
35
+ - name : Publish package
36
+ uses : pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
37
+ with :
38
+ user : __token__
39
+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change
1
+ * .egg-info /
2
+ dist /
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ cnes-pylint-extension checks the following rules :
18
18
19
19
cnes-pylint-extension checks the following metrics :
20
20
- R5301 - too-high-complexity (default < 25)
21
- - R5302 - too-high-complexity-simplified (defailt < 20)
21
+ - R5302 - too-high-complexity-simplified (default < 20)
22
22
- R5201 - too-few-comments (default > 20%)
23
23
24
24
# Available versions :
@@ -30,11 +30,16 @@ cnes-pylint-extension checks the following metrics :
30
30
31
31
# To use these checkers:
32
32
33
- ## Install Pylint
33
+ ## Install from PIP
34
+ ` pip install cnes-pylint-extension `
35
+
36
+ ## Install from sources
37
+
38
+ ### Install Pylint
34
39
35
40
` pip install pylint==2.5.0 `
36
41
37
- ## Install CNES Pylint extension checkers
42
+ ### Install CNES Pylint extension checkers
38
43
39
44
Download the project's code source then add the checkers subdirectory to your PYTHONPATH :
40
45
@@ -52,6 +57,8 @@ load-plugins=cnes_checker
52
57
...
53
58
```
54
59
60
+ ## Usage
61
+
55
62
Pylint is now able to use the extension.
56
63
57
64
Otherwise, add ` --load-plugins=cnes_checker ` to your pylint command line in order to activate it.
Original file line number Diff line number Diff line change
1
+ from .cnes_checker import register
2
+
3
+ def register (linter ):
4
+ cnes_checker .register (linter )
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ import setuptools
2
+
3
+ with open ("README.md" , "r" ) as fh :
4
+ long_description = fh .read ()
5
+
6
+ setuptools .setup (
7
+ name = "cnes-pylint-extension" ,
8
+ version = "5.0.0" ,
9
+ author = "CNES CatLab" ,
10
+ description = "A PyLint plugin to add coding CNES specific checks" ,
11
+ long_description = long_description ,
12
+ long_description_content_type = "text/markdown" ,
13
+ url = "https://github.com/cnescatlab/cnes-pylint-extension" ,
14
+ packages = setuptools .find_packages (where = 'checkers' ),
15
+ package_dir = {'' : 'checkers' },
16
+ license_file = 'LICENSE' ,
17
+ classifiers = [
18
+ "Programming Language :: Python :: 3" ,
19
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)" ,
20
+ "Operating System :: OS Independent" ,
21
+ ],
22
+ python_requires = '>=3.6' ,
23
+ install_requires = [
24
+ "pylint-plugin-utils==0.7" ,
25
+ "pylint==2.5.0"
26
+ ],
27
+ project_urls = {
28
+ 'Bug Reports' : 'https://github.com/cnescatlab/cnes-pylint-extension/issues'
29
+ }
30
+ )
You can’t perform that action at this time.
0 commit comments