8000 Feature/1 introduce serde and base classes by miroslavpojer · Pull Request #2 · AbsaOSS/living-doc-utilities · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature/1 introduce serde and base classes #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3660dbe
Initial repo setup.
miroslavpojer May 6, 2025
e4083be
Update of DEVELOPER.md file. Check solo file commands.
miroslavpojer May 7, 2025
c3d0e74
Update README.md and DEVELOPER.md.
miroslavpojer May 7, 2025
3a7eda9
Fixed all issues from pylint, black and mypy.
miroslavpojer May 7, 2025
67b3fd9
Add unit tests.
miroslavpojer May 7, 2025
a81d887
Add a workflow with basic checks.
miroslavpojer May 7, 2025
2193d45
Fix workflows.
miroslavpojer May 7, 2025
4b0f133
Fix workflows.
miroslavpojer May 7, 2025
eb534b0
Fix workflows.
miroslavpojer May 7, 2025
f8b4828
Testing.
miroslavpojer May 7, 2025
5e8f1f8
Testing.
miroslavpojer May 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Copyright 2025 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true

[*.xml]
indent_size = 4
indent_style = space
insert_final_newline = true

[*.{java,scala,js,json,css}]
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120

[*.md]
trim_trailing_whitespace = false

[*.{cmd,bat}]
end_of_line = crlf
insert_final_newline = true
28 changes: 28 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Copyright 2025 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

###############################
# Git Line Endings #
###############################

# Set default behaviour to automatically normalize line endings.
* text=auto

# Force the following filetypes to have unix eols, Windows can usually handle it well
*.* text eol=lf

# Force batch scripts to always use CRLF line endings as they in some cases might not work correctly.
# Also if a repo is accessed in Windows via a file share from Linux, the scripts will work too
*.cmd text eol=crlf
*.bat text eol=crlf
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @miroslavpojer @Zejnilovic @OlivieFranklova
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
labels: 'bug'

---

## Describe the bug
A clear and concise description of what the bug is.

## To Reproduce
Steps to reproduce the behavior OR commands run:
1. Go to '...'
2. Click on '....'
3. Enter value '...'
4. See error

## Expected behavior
A clear and concise description of what you expected to happen.

## Screenshots
If applicable, add screenshots to help explain your problem.

## Additional context
Add any other context about the problem here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this project
labels: 'enhancement'

---

## Background
A clear and concise description of where the limitation lies.

## Feature
A description of the requested feature.

## Example [Optional]
A simple example if applicable.

## Proposed Solution [Optional]
Solution Ideas:
1.
2.
3.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Question
about: Ask a question
labels: 'question'

---

## Background [Optional]
A clear explanation of the reason for raising the question.
This gives us a better understanding of your use cases and how we might accommodate them.

## Question
A clear and concise inquiry
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/spike_task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Spike
about: Issue template for spikes, research and investigation tasks
labels: 'spike'

---

## Background
A clear and concise description of the problem or a topic we need to understand.

Feel free to add information about why it's needed and what assumptions you have at the moment.

## Questions To Answer

1.
2.
3.

## Desired Outcome

The list of desired outcomes of this spike ticket.

```[tasklist]
### Tasks
- [ ] Questions have been answered or we have a clearer idea of how to get to our goal
- [ ] Discussion with the team
- [ ] Documentation
- [ ] Create recommendations and new implementation tickets
- [ ] item here..
```

## Additional Info/Resources [Optional]

1.
2.
3.
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
> Add information about goal of Pull Request.

---
> **Note:** Remember to link this PR to the related issue by adding `Closes #issue_number` to the description above.

Closes #issue_number
39 changes: 39 additions & 0 deletions .github/workflows/check_pr_release_notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Copyright 2025 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Check PR Release Notes in Description

on:
pull_request:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
branches: [ master ]

jobs:
check-release-notes:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@v5.1.1
with:
python-version: '3.12'

- name: Check presence of release notes in PR description
uses: AbsaOSS/release-notes-presence-check@v0.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
github-repository: ${{ github.repository }}
pr-number: ${{ github.event.number }}
135 changes: 135 additions & 0 deletions .github/workflows/static_analysis_and_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
#
# Copyright 2025 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: "Static analysis & tests"

on:
push:
branches: [ "master" ]
pull_request:

jobs:
analysis:
runs-on: ubuntu-latest
name: Pylint Analysis
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.5
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
cache: 'pip'

- name: Install dependencies
run: |
pip install -r requirements.txt

- name: Analyze code with Pylint
id: analyze-code
run: |
pylint_score=$(pylint $(git ls-files '*.py') | grep 'rated at' | awk '{print $7}' | cut -d'/' -f1)
echo "PYLINT_SCORE=$pylint_score" >> $GITHUB_ENV

- name: Check Pylint score
run: |
if (( $(echo "$PYLINT_SCORE < 9.5" | bc -l) )); then
echo "Failure: Pylint score is below 9.5 (project score: $PYLINT_SCORE)."
exit 1
else
echo "Success: Pylint score is above 9.5 (project score: $PYLINT_SCORE)."
fi

code-format-check:
runs-on: ubuntu-latest
name: Black Format Check
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.5
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
cache: 'pip'

- name: Install dependencies
run: |
pip install -r requirements.txt

- name: Check code format with Black
id: check-format
run: |
black --check $(git ls-files '*.py')

mypy-check:
runs-on: ubuntu-latest
name: Mypy Type Check
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.5
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
cache: 'pip'

- name: Install dependencies
run: |
pip install -r requirements.txt

- name: Check types with Mypy
id: check-types
run: |
mypy .

python-tests:
runs-on: ubuntu-latest
name: Python Tests
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.5
with:
fetch-depth: 0
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
cache: 'pip'

- name: Install dependencies
run: |
pip install -r requirements.txt

- name: Check code coverage with Pytest
working-directory: ${{ github.workspace }}
run: |
pwd
ls -l
export PYTHONPATH="${{ github.workspace }}"
export
pytest --cov=. -v tests/ --cov-fail-under=80
shell: bash
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,13 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

run_script.sh
output/
Loading
Loading
0