Skip to content

Commit

Permalink
further update of template files
Browse files Browse the repository at this point in the history
  • Loading branch information
dontseyit committed Oct 13, 2023
1 parent edb2e83 commit 4925567
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[paths]
source =
src
/workspace/src
**/lib/python*/site-packages
1 change: 1 addition & 0 deletions .deprecated_files
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

.github/workflows/check_mandatory_and_static_files.yaml
.github/workflows/dev_cd.yaml
.github/workflows/unit_and_int_tests.yaml

scripts/check_mandatory_and_static_files.py
scripts/update_static_files.py
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
name: Unit and Integration Tests
name: Tests

on: push

jobs:
unit_and_int_tests:
tests:
runs-on: ubuntu-latest
name: Unit and Integration Tests
name: Tests

steps:
- uses: actions/checkout@v3

- id: common
uses: ghga-de/gh-action-common@v3

- name: Run pytest
- id: pytest
run: |
export ${{ steps.common.outputs.CONFIG_YAML_ENV_VAR_NAME }}="${{ steps.common.outputs.CONFIG_YAML }}"
pytest \
--cov="${{ steps.common.outputs.MAIN_SRC_DIR }}" \
--cov-report=xml
--cov="${{ steps.common.outputs.PACKAGE_NAME }}" \
--cov-report=xml \
tests
- id: coveralls
name: Upload coverage to coveralls
Expand Down
3 changes: 2 additions & 1 deletion .static_files
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ scripts/README.md
.github/workflows/check_config_docs.yaml
.github/workflows/check_template_files.yaml
.github/workflows/static_code_analysis.yaml
.github/workflows/unit_and_int_tests.yaml
.github/workflows/tests.yaml
.github/workflows/check_openapi_spec.yaml
.github/workflows/check_readme.yaml
.github/workflows/cd.yaml

example_data/README.md

.coveragerc
.editorconfig
.gitattributes
.gitignore
Expand Down
9 changes: 4 additions & 5 deletions scripts/license_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# pylint: skip-file

"""This script checks that the license and license headers
exists and that they are up to date.
exist and that they are up to date.
"""

import argparse
Expand Down Expand Up @@ -48,6 +46,7 @@
"sdist",
"wheels",
"pip-wheel-metadata",
".coveragerc",
".git",
".github",
".flake8",
Expand Down Expand Up @@ -237,7 +236,7 @@ def normalized_text(text: str, chars_to_trim: list[str] = COMMENT_CHARS) -> str:


def format_copyright_template(copyright_template: str, author: str) -> str:
"""Formats license header by inserting the specified author for every occurence of
"""Formats license header by inserting the specified author for every occurrence of
"{author}" in the header template.
"""
return normalized_text(copyright_template.replace("{author}", author))
Expand Down Expand Up @@ -330,7 +329,7 @@ def check_copyright_notice(
author (str, optional):
The author that shall be included in the license header.
It will replace any appearance of "{author}" in the license
header. This defaults to an auther info for GHGA.
header. This defaults to an author info for GHGA.
"""
# If the global_copyright is already set, check if the current copyright is
Expand Down

0 comments on commit 4925567

Please sign in to comment.