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

fix documentation workflow and added script.py for typedoc MPX compatible #1314

Closed
wants to merge 2 commits into from

Conversation

dhiraj0911
Copy link
Contributor

@dhiraj0911 dhiraj0911 commented Dec 28, 2023

What kind of change does this PR introduce?

  • Bugfix for the automated documentation GitHub action PUSH workflow.
  • Standardizes package manager to npm for both talawa-api and talawa-admin.
  • Adds a Python script (script.py) to ensure Markdown files are MPX compatible.

Issue Number: #1279


Did you add tests for your changes?

  • No new tests added. The changes pertain to the GitHub Actions workflow and documentation updates.
  • Manual testing was conducted to ensure functionality and MPX compatibility.

If relevant, did you update the documentation?

  • Documentation updated to reflect the shift from npm to yarn and the integration of script.py.
  • Details on workflow changes and MPX compatibility considerations with Docusaurus v3 included.

Summary

  • Addresses issues with GitHub action for automated documentation generation.
  • Resolves inconsistencies in package managers and non-compliance with Docusaurus v3's MPX standards.
  • Includes transition to yarn and introduction of script.py for Typedoc-generated Markdown files.

Does this PR introduce a breaking change?

  • No breaking changes introduced.
  • Focuses on resolving workflow issues and enhancing compatibility, not affecting core software functionality.

Have you read the contributing guide?

  • Yes, the contributing guidelines have been followed.

Copy link

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link
Contributor

@palisadoes palisadoes left a comment

Choose a reason for hiding this comment

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

See comments

# Process each Markdown file in the directory
for root, _, files in os.walk(args.directory):
for file in files:
if file.endswith(".md"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Make this case insensitive. Do this for the other PR too

@@ -0,0 +1,94 @@
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
Copy link
Contributor

Choose a reason for hiding this comment

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

Change the name of the script to be more self-explanatory. Do this for the other PR too

# Escape MPX characters
new_content = escape_mpx_characters(content)

# Write the processed content back to the file
Copy link
Contributor

Choose a reason for hiding this comment

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

Only do this if there is a change. Do this for the other PR too.

.github/workflows/push.yml Outdated Show resolved Hide resolved
@dhiraj0911
Copy link
Contributor Author

Made necessary changes

Copy link
Contributor

@palisadoes palisadoes left a comment

Choose a reason for hiding this comment

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

  1. This works if there is only one update to the PR.
  2. What happens if a person submits a PR and then does multiple commits so that this script is run multiple times? It would add an excessive number of \ characters to the files.
  3. You will need to ensure that \<, \>, \{, and \} are not replaced with \\<, \\>, \\{, and \\}

Copy link

codecov bot commented Dec 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a7e4663) 96.30% compared to head (601d40e) 96.30%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1314   +/-   ##
========================================
  Coverage    96.30%   96.30%           
========================================
  Files          137      137           
  Lines         3387     3387           
  Branches       949      949           
========================================
  Hits          3262     3262           
  Misses         119      119           
  Partials         6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dhiraj0911 dhiraj0911 closed this by deleting the head repository Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants