Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Python Package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON Templates
Python Package
Commits
69073f94
Commit
69073f94
authored
2 years ago
by
Klaas Kliffen
Browse files
Options
Downloads
Plain Diff
Merge branch '
CWG-11
-auto-format-linting' into 'main'
CWG-11
: linting auto format and appropriate documentation Closes
CWG-11
See merge request
!6
parents
503f3055
db585c89
Branches
Branches containing commit
No related tags found
1 merge request
!6
CWG-11: linting auto format and appropriate documentation
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+16
-1
16 additions, 1 deletion
README.md
tests/requirements.txt
+1
-0
1 addition, 0 deletions
tests/requirements.txt
tox.ini
+5
-1
5 additions, 1 deletion
tox.ini
with
22 additions
and
2 deletions
README.md
+
16
−
1
View file @
69073f94
...
@@ -22,7 +22,22 @@ cool_module.greeter() # prints "Hello World"
...
@@ -22,7 +22,22 @@ cool_module.greeter() # prints "Hello World"
## Contributing
## Contributing
To contribute, please create a feature branch and a "Draft" merge request.
To contribute, please create a feature branch and a "Draft" merge request.
Upon completion, the merge request should be marked as ready and a reviewer should be assigned.
Upon completion, the merge request should be marked as ready and a reviewer
should be assigned.
Verify your changes locally and be sure to add tests. Verifying local
changes is done through
`tox`
.
```
pip install tox```
With tox the same jobs as run on the CI/CD pipeline can be ran. These
include unit tests and linting.
```
tox
```
To automatically apply most suggested linting changes execute:
```
tox -e format
```
## License
## License
This project is licensed under the Apache License Version 2.0
This project is licensed under the Apache License Version 2.0
This diff is collapsed.
Click to expand it.
tests/requirements.txt
+
1
−
0
View file @
69073f94
black
black
build
build
flake8
flake8
autopep8 >= 1.7.0 # MIT
pylint
pylint
pytest
pytest
pytest-cov
pytest-cov
This diff is collapsed.
Click to expand it.
tox.ini
+
5
−
1
View file @
69073f94
...
@@ -25,7 +25,7 @@ commands =
...
@@ -25,7 +25,7 @@ commands =
# Use generative name and command prefixes to reuse the same virtualenv
# Use generative name and command prefixes to reuse the same virtualenv
# for all linting jobs.
# for all linting jobs.
[testenv:{pep8,black,pylint}]
[testenv:{pep8,black,pylint
,format
}]
usedevelop
=
False
usedevelop
=
False
envdir
=
{toxworkdir}/linting
envdir
=
{toxworkdir}/linting
commands
=
commands
=
...
@@ -35,6 +35,10 @@ commands =
...
@@ -35,6 +35,10 @@ commands =
black:
{envpython}
-m
black
--check
--diff
.
black:
{envpython}
-m
black
--check
--diff
.
pylint:
{envpython}
-m
pylint
--version
pylint:
{envpython}
-m
pylint
--version
pylint:
{envpython}
-m
pylint
map
tests
pylint:
{envpython}
-m
pylint
map
tests
format:
{envpython}
-m
autopep8
-v
-aa
--in-place
--recursive
map
format:
{envpython}
-m
autopep8
-v
-aa
--in-place
--recursive
tests
format:
{envpython}
-m
black
-v
.
[testenv:build]
[testenv:build]
usedevelop
=
False
usedevelop
=
False
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment