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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON Templates
Python Package
Commits
d6d9372c
Commit
d6d9372c
authored
2 years ago
by
Klaas Kliffen
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' into 'requirements-info'
# Conflicts: # tests/requirements.txt
parents
68ec691d
69073f94
No related branches found
No related tags found
1 merge request
!7
Add minimal versions and licensing information for requirements
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
.gitlab-ci.yml
+13
-0
13 additions, 0 deletions
.gitlab-ci.yml
README.md
+16
-1
16 additions, 1 deletion
README.md
tests/requirements.txt
+1
-0
1 addition, 0 deletions
tests/requirements.txt
tox.ini
+11
-2
11 additions, 2 deletions
tox.ini
with
43 additions
and
3 deletions
.gitignore
+
2
−
0
View file @
d6d9372c
...
...
@@ -3,3 +3,5 @@ dist/*
*.pyc
.coverage
coverage.xml
htmlcov/*
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
13
−
0
View file @
d6d9372c
...
...
@@ -45,6 +45,19 @@ run_pylint:
# script:
# - echo "build fortran/c/cpp extension source code"
run_unit_tests_coverage
:
stage
:
test
image
:
python:3.7
script
:
-
tox -e coverage
artifacts
:
reports
:
coverage_report
:
coverage_format
:
cobertura
path
:
coverage.xml
paths
:
-
htmlcov/*
run_unit_tests
:
stage
:
test
image
:
python:3.${PY_VERSION}
...
...
This diff is collapsed.
Click to expand it.
README.md
+
16
−
1
View file @
d6d9372c
...
...
@@ -22,7 +22,22 @@ cool_module.greeter() # prints "Hello World"
## Contributing
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
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 @
d6d9372c
autopep8 >= 1.7.0 # MIT
black >= 22.0.0 # MIT
build >= 0.8.0 # MIT
flake8 >= 5.0.0 # MIT
...
...
This diff is collapsed.
Click to expand it.
tox.ini
+
11
−
2
View file @
d6d9372c
...
...
@@ -16,11 +16,16 @@ deps =
-r{toxinidir}/tests/requirements.txt
commands
=
{envpython}
--version
{envpython}
-m
pytest
--cov
=
map
{envpython}
-m
pytest
[testenv:coverage]
commands
=
{envpython}
--version
{envpython}
-m
pytest
--cov-report
xml
--cov-report
html
--cov
=
map
# Use generative name and command prefixes to reuse the same virtualenv
# for all linting jobs.
[testenv:{pep8,black,pylint}]
[testenv:{pep8,black,pylint
,format
}]
usedevelop
=
False
envdir
=
{toxworkdir}/linting
commands
=
...
...
@@ -30,6 +35,10 @@ commands =
black:
{envpython}
-m
black
--check
--diff
.
pylint:
{envpython}
-m
pylint
--version
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]
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