Skip to content
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

Feature/57 prepare action inputs for several regimes #72

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6907482
Action yaml enabling more regimes.
MobiTikula Nov 26, 2024
a78f48d
New project structure supporting multiple regimes.
MobiTikula Nov 26, 2024
bdf03e2
Logic to implement use of regimes.
MobiTikula Nov 26, 2024
fe4ffb8
Test coverage added for new logic with new project folder structure.
MobiTikula Nov 26, 2024
35502e7
Logic for correct enabling LivDoc regime mining.
MobiTikula Nov 28, 2024
bc91438
Implementing the tests for the new logic.
MobiTikula Nov 28, 2024
4f7e74b
Updated documentation for new project structure preparing for better …
MobiTikula Nov 28, 2024
7bbb1c5
Removing feature for enabling to user to choose their own output_path.
MobiTikula Dec 2, 2024
1be806c
Updating tests for new logic disabling user to choose their own outpu…
MobiTikula Dec 2, 2024
22593b3
Implementing GH comments for the liv-doc README.md.
MobiTikula Dec 3, 2024
b09c30f
Try to fix github workflow bug.
MobiTikula Dec 3, 2024
46f1bf1
Implementing GH comments mainly for the project README.md.
MobiTikula Dec 3, 2024
8ad6a0f
Implementing GH comments mainly for the project README.md.
MobiTikula Dec 3, 2024
fdd3591
Improving DEBUG logging.
MobiTikula Dec 3, 2024
ae71977
Test fix.
MobiTikula Dec 3, 2024
579f19a
Implementing review comments.
MobiTikula Dec 4, 2024
107bd99
Implementing review comments.
MobiTikula Dec 4, 2024
165ad6f
Implementing README TODOs.
MobiTikula Dec 9, 2024
2d44555
Revert "Implementing README TODOs."
MobiTikula Dec 9, 2024
62efb91
Implementing README comment.
MobiTikula Dec 9, 2024
5cde52f
Fixing the bug.
MobiTikula Dec 9, 2024
031ceb1
Fixing the bug.
MobiTikula Dec 9, 2024
ec7c677
Fixing the bug.
MobiTikula Dec 9, 2024
abc92fc
Fixing the bug.
MobiTikula Dec 9, 2024
abd38b7
Fixing the bug.
MobiTikula Dec 12, 2024
5b49ac4
Fixing the bug.
MobiTikula Dec 12, 2024
d3dc120
Fixing the bug.
MobiTikula Dec 12, 2024
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
51 changes: 27 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,27 @@ See the full example of action step definition (in example are used non-default
liv-doc-regime: true # living documentation regime de/activation
verbose-logging: true # project verbose (debug) logging feature de/activation

# Living Documentation Regime configuration
liv-doc-repositories: |
[
{
"organization-name": "fin-services",
"repository-name": "investment-app",
"query-labels": ["feature", "enhancement"],
"projects-title-filter": []
},
{
"organization-name": "health-analytics",
"repository-name": "patient-data-analysis",
"query-labels": ["functionality"],
"projects-title-filter": ["Health Data Analysis Project"]
},
{
"organization-name": "open-source-initiative",
"repository-name": "community-driven-project",
"query-labels": ["improvement"],
"projects-title-filter": ["Community Outreach Initiatives", "CDD Project"]
}
]
# LivDoc Regime configuration
liv-doc-repositories: '[
{
"organization-name": "fin-services",
"repository-name": "investment-app",
"query-labels": ["feature", "enhancement"],
"projects-title-filter": []
},
{
"organization-name": "health-analytics",
"repository-name": "patient-data-analysis",
"query-labels": ["functionality"],
"projects-title-filter": ["Health Data Analysis Project"]
},
{
"organization-name": "open-source-initiative",
"repository-name": "community-driven-project",
"query-labels": ["improvement"],
"projects-title-filter": ["Community Outreach Initiatives", "CDD Project"]
}
]'
liv-doc-project-state-mining: true # project state mining feature de/activation
liv-doc-structured-output: true # structured output feature de/activation
liv-doc-group-output-by-topics: true # group output by topics feature de/activation
Expand Down Expand Up @@ -218,7 +217,7 @@ export INPUT_GITHUB_TOKEN=$(printenv GITHUB_TOKEN)
export INPUT_LIV_DOC_REGIME=true
export INPUT_VERBOSE_LOGGING=true

# Environment variables for Living Documentation regime functionality
# Environment variables for LivDoc regime functionality
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Environment variables for LivDoc regime functionality
# Environment variables for Living Documentation (LivDoc) regime functionality

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of next issue: #75 (comment).

export INPUT_LIV_DOC_REPOSITORIES='[
{
"organization-name": "Organization Name",
Expand All @@ -234,9 +233,13 @@ export INPUT_LIV_DOC_GROUP_OUTPUT_BY_TOPICS=true

### Running the script locally

For running the GitHub action incorporate this command into the shell script and save it.
For running the GitHub action incorporate these commands into the shell script and save it.
```
cd src || exit 1

python3 main.py

cd .. || exit 1
```

### Make the Script Executable
Expand Down
13 changes: 4 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,18 @@ runs:

- name: Prepare environment based on mining regimes
run: |
# Set base env variables common for all regimes
echo "INPUT_GITHUB_TOKEN=${{ inputs.GITHUB-TOKEN }}" >> $GITHUB_ENV
# Set base env variables common for all regimes
echo "INPUT_GITHUB_TOKEN=${{ env.GITHUB-TOKEN }}" >> $GITHUB_ENV
echo "INPUT_LIV_DOC_REGIME=${{ inputs.liv-doc-regime }}" >> $GITHUB_ENV
echo "INPUT_VERBOSE_LOGGING=${{ inputs.verbose-logging }}" >> $GITHUB_ENV

# Add LivDoc-specific env variables if the regime is enabled
# Add LivDoc-specific env variables if the regime is enabled
if [[ "${{ inputs.liv-doc-regime }}" == "true" ]]; then
echo "INPUT_LIV_DOC_REPOSITORIES=${{ inputs.liv-doc-repositories }}" >> $GITHUB_ENV
echo "INPUT_LIV_DOC_REPOSITORIES=$(echo '${{ inputs.liv-doc-repositories }}' | jq -c .)" >> $GITHUB_ENV
echo "INPUT_LIV_DOC_PROJECT_STATE_MINING=${{ inputs.liv-doc-project-state-mining }}" >> $GITHUB_ENV
echo "INPUT_LIV_DOC_STRUCTURED_OUTPUT=${{ inputs.liv-doc-structured-output }}" >> $GITHUB_ENV
echo "INPUT_LIV_DOC_GROUP_OUTPUT_BY_TOPICS=${{ inputs.liv-doc-group-output-by-topics }}" >> $GITHUB_ENV
fi

# # Add CI-specific environment variables if the regime is enabled
# if [[ "${{ inputs.ci-regime }}" == "true" ]]; then
# echo "INPUT_CI_ENV_VAR=${{ inputs.ci_env_var }}" >> $GITHUB_ENV
# fi
shell: bash

- name: Run Living Documentation Generator
Expand Down
151 changes: 74 additions & 77 deletions living_documentation_regime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,26 @@ See the default minimal Living Documentation regime action step definition:
GITHUB-TOKEN: ${{ secrets.REPOSITORIES_ACCESS_TOKEN }}
with:
liv-doc-regime: true # living documentation regime de/activation
liv-doc-repositories: |
[
{
"organization-name": "health-analytics",
"repository-name": "patient-data-analysis",
"query-labels": ["functionality"],
"projects-title-filter": ["Health Data Analysis Project"]
},
{
"organization-name": "open-source-initiative",
"repository-name": "community-driven-project",
"query-labels": ["improvement"],
"projects-title-filter": ["Community Outreach Initiatives", "CDD Project"]
}
]
liv-doc-repositories: '[
{
"organization-name": "fin-services",
"repository-name": "investment-app",
"query-labels": ["feature", "enhancement"],
"projects-title-filter": []
},
{
"organization-name": "health-analytics",
"repository-name": "patient-data-analysis",
"query-labels": ["functionality"],
"projects-title-filter": ["Health Data Analysis Project"]
},
{
"organization-name": "open-source-initiative",
"repository-name": "community-driven-project",
"query-labels": ["improvement"],
"projects-title-filter": ["Community Outreach Initiatives", "CDD Project"]
}
]'
```

See the full example of Living Documentation regime step definition (in example are used non-default values):
Expand All @@ -72,21 +77,26 @@ See the full example of Living Documentation regime step definition (in example
liv-doc-regime: true # living documentation regime de/activation
verbose-logging: true # project verbose (debug) logging feature de/activation

liv-doc-repositories: |
[
{
"organization-name": "health-analytics",
"repository-name": "patient-data-analysis",
"query-labels": ["functionality"],
"projects-title-filter": ["Health Data Analysis Project"]
},
{
"organization-name": "open-source-initiative",
"repository-name": "community-driven-project",
"query-labels": ["improvement"],
"projects-title-filter": ["Community Outreach Initiatives", "CDD Project"]
}
]
liv-doc-repositories: '[
{
"organization-name": "fin-services",
"repository-name": "investment-app",
"query-labels": ["feature", "enhancement"],
"projects-title-filter": []
},
{
"organization-name": "health-analytics",
"repository-name": "patient-data-analysis",
"query-labels": ["functionality"],
"projects-title-filter": ["Health Data Analysis Project"]
},
{
"organization-name": "open-source-initiative",
"repository-name": "community-driven-project",
"query-labels": ["improvement"],
"projects-title-filter": ["Community Outreach Initiatives", "CDD Project"]
}
]'
liv-doc-project-state-mining: true # project state mining feature de/activation
liv-doc-structured-output: true # structured output feature de/activation
liv-doc-group-output-by-topics: true # group output by topics feature de/activation
Expand All @@ -104,21 +114,26 @@ Configure the Living Documentation regime by customizing the following parameter
- **Example**:
```yaml
with:
liv-doc-repositories: |
[
{
"organization-name": "health-analytics",
"repository-name": "patient-data-analysis",
"query-labels": ["functionality"],
"projects-title-filter": ["Health Data Analysis Project"]
},
{
"organization-name": "open-source-initiative",
"repository-name": "community-driven-project",
"query-labels": ["improvement"],
"projects-title-filter": ["Community Outreach Initiatives", "CDD Project"]
}
]
liv-doc-repositories: '[
{
"organization-name": "fin-services",
"repository-name": "investment-app",
"query-labels": ["feature", "enhancement"],
"projects-title-filter": []
},
{
"organization-name": "health-analytics",
"repository-name": "patient-data-analysis",
"query-labels": ["functionality"],
"projects-title-filter": ["Health Data Analysis Project"]
},
{
"organization-name": "open-source-initiative",
"repository-name": "community-driven-project",
"query-labels": ["improvement"],
"projects-title-filter": ["Community Outreach Initiatives", "CDD Project"]
}
]'
```

- **liv-doc-project-state-mining** (optional, `default: false`)
miroslavpojer marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -159,33 +174,19 @@ The Living Documentation Generator in Living Documentation regime is designed to
### Index Page Example

```markdown
---
title: Features
toolbar_title: Features
description_title: Living Documentation
description: >
This is a comprehensive list and brief overview of all mined features.
date: 2024-12-04
weight: 0
---

<h1>Feature Summary page</h1>

Our project is designed with a myriad of features to ensure seamless user experience, top-tier functionality, and efficient operations.
Here, you'll find a summarized list of all these features, their brief descriptions, and links to their detailed documentation.
# Issue Summary page
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the meta data were removed?
Are you presenting the Preview of expected output or raw data?

Copy link
Collaborator Author

@MobiTikula MobiTikula Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you requested to rollback the changes, I implemented, cause they are not the part of solution for this PR. I do update them back in the next issue: #75 (comment).


<h2>Feature Overview</h2>
Our project is designed with a myriad of issues to ensure seamless user experience, top-tier functionality, and efficient operations.
Here, you'll find a summarized list of all these issues, their brief descriptions, and links to their detailed documentation.

<div class="cps-table sortable searchable filterableByColumns paginator">
## Issue Overview

| Organization name| Repository name | Issue 'Number - Title' | Linked to project | Project Status | Issue URL |
|------------------|----------------------------|------------------------------|-------------------|----------------|------------|
| AbsaOSS | living-doc-example-project | [#89 - Test issue 2](...) | 🔴 | --- |[GitHub](#) |
| AbsaOSS | living-doc-example-project | [#88 - Test issue](...) | 🟢 | Todo |[GitHub](#) |
| AbsaOSS | living-doc-example-project | [#41 - Initial commit.](...) | 🟢 | Done |[GitHub](#) |
| AbsaOSS | living-doc-example-project | [#33 - Example bugfix](...) | 🔴 | --- |[GitHub](#) |

</div>
| Organization name| Repository name | Issue 'Number - Title' | Linked to project | Project Status | Issue URL |
|------------------|----------------------------|--------------------------------|-------------------|----------------|------------|
| AbsaOSS | living-doc-example-project | [#89 - Test issue 2](89_test_issue_2.md) | 🔴 | --- |[GitHub](#) |
| AbsaOSS | living-doc-example-project | [#88 - Test issue](88_test_issue.md) | 🟢 | Todo |[GitHub](#) |
| AbsaOSS | living-doc-example-project | [#41 - Initial commit.](41_initial_commit.md) | 🟢 | Done |[GitHub](#) |
| AbsaOSS | living-doc-example-project | [#33 - Example bugfix](33_example_bugfix.md) | 🔴 | --- |[GitHub](#) |
```

- **Project Status** can have various values depending on the project, such as: Todo, Done, Closed, In Progress, In Review, Blocked, etc.
Expand All @@ -195,12 +196,7 @@ These values can vary from project to project.
### Issue Page Example

```markdown
---
title: "Advanced Book Search"
date: 2024-12-04
weight: 1
---

# FEAT: Advanced Book Search
| Attribute | Content |
|-------------------|---------------------------------------|
| Organization name | AbsaOSS |
Expand All @@ -216,11 +212,12 @@ weight: 1
| Status | Todo |
| Priority | P1 |
| Size | S |
| MoSCoW | --- |
| MoSCoW | N/A |

<h3>Issue Content</h3>
## Issue Content
Users often struggle to find specific books in a large catalog. An advanced search feature would streamline this process, enhancing user experience.

### Background
...
```

Expand Down
Loading