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

removed ruby/gem dependencies in env.ps1 and updated the docs, added markdownlint-hook.ps1, docs.ps1, and docker.ps1 #636

Open
wants to merge 5 commits into
base: feature/distributed-demo
Choose a base branch
from

Conversation

aryanbhosale
Copy link

No description provided.

script/env.ps1 Outdated
# Install markdownlint
gem install mdl
choco install markdownlint-cli
Copy link
Contributor

Choose a reason for hiding this comment

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

The markdownlint-cli package is related to markdownlint by David Anson. This package is good but is different from the markdownlint package used by codeclimate. So unfortunately we have to keep the mdl installation.

Copy link
Author

Choose a reason for hiding this comment

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

The markdownlint-cli package is related to markdownlint by David Anson. This package is good but is different from the markdownlint package used by codeclimate. So unfortunately we have to keep the mdl installation.

Oh okay, so should i revoke the changes and make it like it was before with the ruby and gem install?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes

# This script is used by the pre-commit hook to check the markdown files without exiting the commit process.

# Invoke markdownlint and capture the output
$output = markdownlint $args
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a mistake in the existing bash script. Even though we are installing mdl, the script uses markdownlint. We need to use mdl here.
The mdl has pre-commit hooks available. We couldn't find a way to leave a warning message for a check of pre-commit. So the markdown check has been moved to a script to turn errors into warnings. It is advantageous to use a python script (named mdl-check.py) to run the mdl command to make the script cross-platform.

Copy link
Author

Choose a reason for hiding this comment

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

There is a mistake in the existing bash script. Even though we are installing mdl, the script uses markdownlint. We need to use mdl here. The mdl has pre-commit hooks available. We couldn't find a way to leave a warning message for a check of pre-commit. So the markdown check has been moved to a script to turn errors into warnings. It is advantageous to use a python script (named mdl-check.py) to run the mdl command to make the script cross-platform.

okay got it

script/docs.ps1 Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

please update the instructions in docs/PUBLISH.md as well

@aryanbhosale
Copy link
Author

Sir could you give me a brief of what all changes I need to revoke and the ones that I need to add

@prasadtalasila
Copy link
Contributor

Sir could you give me a brief of what all changes I need to revoke and the ones that I need to add

@aryanbhosale The list of changes required are:

  1. Revert changes for mdl
  2. Check to successful execution of mkdocs on Windows. If there are any errors, please fix env.ps1 and env.sh
  3. Replace markdownlint-hook.sh with markdownlint-hook.py which works on both Windows and Linux

…lint-hooks for crossplatform, added mdl-check.py
@@ -57,7 +57,7 @@ scripts.
1. Install Ruby from
[official Ruby website](https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.2-1/rubyinstaller-devkit-3.1.2-1-x64.exe)
and follow all the defaults during the installation.

Copy link

Choose a reason for hiding this comment

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

Trailing spaces

Copy link

codeclimate bot commented Mar 29, 2024

Code Climate has analyzed commit f460288 and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2
Style 2

View more on Code Climate.

import subprocess
import sys

def markdownlint_hooks(files):
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there an advantage to having two separate python programs? Can the mdl command be executed in this function?


# Generate and publish documents
Write-Output "Generate and publish documents..."
& mkdocs build --config-file mkdocs.yml --site-dir "site/online/$Version"
Copy link
Contributor

Choose a reason for hiding this comment

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

is the mkdocs build and serve problem with weasyprint solved?

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