diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 9568ec85..e7ea7c1c 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,30 +1,35 @@ --- name: Bug Report about: Create a report to help us improve -title: \[BUG\] +title: \[BUG] labels: bug assignees: fmigneault - --- -**Describe the bug** +## Describe the bug + + + +## To Reproduce -**To Reproduce** Steps to reproduce the behavior: + 1. Deploy process with payload '...' 2. Execute using payload '....' 3. Result '....' 4. Error message '...' -**Expected behavior** +## Expected behavior + + -**Screenshots** -If applicable, add screenshots to help explain your problem. +## Environment -**Desktop (please complete the following information):** - - OS: \[e.g. Linux|Windows\] (if running locally) - - Browser \[e.g. chrome, safari\] (if running as a service) - - Instance: URL - - Version \["1.2.3", see `/version` endpoint\] +- OS: \[e.g. Linux|Windows] (if running locally) +- Browser \[e.g. chrome, safari] (if running as a service) +- Instance: URL +- Version \["1.2.3", see `/version` endpoint] diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 179274d9..bd0bef45 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,21 +1,31 @@ --- name: Feature Request about: Suggest an idea for this project -title: \[Feature\] +title: \[Feature] labels: feature assignees: fmigneault - --- -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. -Ex. I would like to be able to authenticate using \[...\] +## Describe the request + + + +## Expected behavior -**Describe the solution you'd like** -A clear and concise description of what you want to happen. + -**Describe alternatives you've considered** +## Alternatives considered + + + +## Additional context -**Additional context** + diff --git a/.gitignore b/.gitignore index e1c3cab4..9d2ae05d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ share ## Node node_modules -package.json +!package.json package-lock.json ## Makefile diff --git a/.remarkignore b/.remarkignore new file mode 100644 index 00000000..1b6d93e1 --- /dev/null +++ b/.remarkignore @@ -0,0 +1,13 @@ +# To save time scanning +.idea/ +.vscode/ +*.egg-info/ +downloads/ +env/ + +# actual items to ignore +.pytest_cache/ +node_modules/ +docs/_build/ +docs/build/ +reports/ diff --git a/.stylelintrc.json b/.stylelintrc.json deleted file mode 100644 index cb464aab..00000000 --- a/.stylelintrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "stylelint-config-standard", - "ignoreFiles": ["docs/_build/**"], - "rules": { - "block-no-empty": null, - "color-no-invalid-hex": true, - "color-hex-case": "upper", - "color-hex-length": "long", - "indentation": [4], - "no-descending-specificity": null, - "property-no-vendor-prefix": null - } -} diff --git a/Makefile b/Makefile index 31c3d8f0..6cf97dee 100644 --- a/Makefile +++ b/Makefile @@ -341,18 +341,24 @@ install-dev: conda-env install-xargs ## install package requirements for develop # install locally to ensure they can be found by config extending them .PHONY: install-npm -install-npm: ## install npm package manager if it cannot be found +install-npm: ## install npm package manager and dependencies if they cannot be found @[ -f "$(shell which npm)" ] || ( \ echo "Binary package manager npm not found. Attempting to install it."; \ apt-get install npm \ ) - @[ `npm ls 2>/dev/null | grep stylelint-config-standard | wc -l` = 1 ] || ( \ - echo "Install required libraries for style checks." && \ + +.PHONY: install-npm-stylelint +install-npm-stylelint: install-npm ## install stylelint dependency for 'check-css' target using npm + @[ `npm ls 2>/dev/null | grep stylelint-config-standard | grep -v UNMET | wc -l` = 1 ] || ( \ + echo "Install required dependencies for CSS checks." && \ npm install --save-dev \ - stylelint \ - stylelint-scss \ - stylelint-config-standard \ - stylelint-csstree-validator \ + ) + +.PHONY: install-npm-remarklint +install-npm-remarklint: install-npm ## install remark-lint dependency for 'check-md' target using npm + @[ `npm ls 2>/dev/null | grep remark-lint | grep -v UNMET | wc -l` = 1 ] || ( \ + echo "Install required dependencies for Markdown checks." && \ + npm install --save-dev ) ## --- Launchers targets --- ## @@ -512,7 +518,7 @@ mkdir-reports: # autogen check variants with pre-install of dependencies using the '-only' target references CHECKS_EXCLUDE ?= CHECKS_PYTHON := pep8 lint security doc8 docf links imports types -CHECKS_NPM := css +CHECKS_NPM := css md CHECKS_PYTHON := $(filter-out $(CHECKS_EXCLUDE),$(CHECKS_PYTHON)) CHECKS_NPM := $(filter-out $(CHECKS_EXCLUDE),$(CHECKS_NPM)) CHECKS := $(CHECKS_PYTHON) $(CHECKS_NPM) @@ -606,15 +612,34 @@ check-types-only: mkdir-reports ## run typing validation .PHONY: check-css-only check-css-only: mkdir-reports @echo "Running CSS style checks..." - @npx stylelint \ - --config "$(APP_ROOT)/.stylelintrc.json" \ + @npx --no-install stylelint \ + --config "$(APP_ROOT)/package.json" \ --output-file "$(REPORTS_DIR)/fixed-css.txt" \ "$(APP_ROOT)/**/*.css" +.PHONY: check-css +check-css: install-npm-stylelint check-css-only ## check CSS linting after dependency installation + +# must pass 2 search paths because '/.' are somehow not correctly detected with only the top-level +.PHONY: check-md-only +check-md-only: mkdir-reports ## check Markdown linting + @echo "Running Markdown style checks..." + @npx --no-install remark \ + --inspect --frail \ + --silently-ignore \ + --stdout --color \ + --rc-path "$(APP_ROOT)/package.json" \ + --ignore-path "$(APP_ROOT)/.remarkignore" \ + "$(APP_ROOT)" "$(APP_ROOT)/.*/" \ + > "$(REPORTS_DIR)/check-md.txt" + +.PHONY: check-md +check-md: install-npm-remarklint check-md-only ## check Markdown linting after dependency installation + # autogen fix variants with pre-install of dependencies using the '-only' target references FIXES_EXCLUDE ?= FIXES_PYTHON := imports lint docf fstring -FIXES_NPM := css +FIXES_NPM := css md FIXES_PYTHON := $(filter-out $(FIXES_EXCLUDE),$(FIXES_PYTHON)) FIXES_NPM := $(filter-out $(FIXES_EXCLUDE),$(FIXES_NPM)) FIXES := $(FIXES_PYTHON) $(FIXES_NPM) @@ -672,17 +697,32 @@ fix-fstring-only: mkdir-reports ## fix code string formats substitutions to f-s 1> >(tee "$(REPORTS_DIR)/fixed-fstring.txt")' .PHONY: fix-css -fix-css: install-npm fix-css-only +fix-css: install-npm-stylelint fix-css-only .PHONY: fix-css-only fix-css-only: mkdir-reports ## fix CSS styles problems automatically @echo "Fixing CSS style problems..." - @npx stylelint \ + @npx --no-install stylelint \ --fix \ - --config "$(APP_ROOT)/.stylelintrc.json" \ + --config "$(APP_ROOT)/package.json" \ --output-file "$(REPORTS_DIR)/fixed-css.txt" \ "$(APP_ROOT)/**/*.css" +# must pass 2 search paths because '/.' are somehow not correctly detected with only the top-level +.PHONY: fix-md-only +fix-md-only: mkdir-reports ## fix Markdown linting problems automatically + @echo "Running Markdown style checks..." + @npx --no-install remark \ + --output --frail \ + --silently-ignore \ + --rc-path "$(APP_ROOT)/package.json" \ + --ignore-path "$(APP_ROOT)/.remarkignore" \ + "$(APP_ROOT)" "$(APP_ROOT)/.*/" \ + 2>&1 | tee "$(REPORTS_DIR)/fixed-md.txt" + +.PHONY: fix-md +fix-md: install-npm-remarklint fix-md-only ## fix Markdown linting problems after dependency installation + ## --- Test targets --- ## .PHONY: test diff --git a/docker/hooks/README.md b/docker/hooks/README.md index 75d7507c..89bbba27 100644 --- a/docker/hooks/README.md +++ b/docker/hooks/README.md @@ -1,4 +1,4 @@ Files placed in this directory are for additional/override DockerHub auto-build hook procedures. -see: https://docs.docker.com/docker-hub/builds/advanced/ +see: [https://docs.docker.com/docker-hub/builds/advanced/](https://docs.docker.com/docker-hub/builds/advanced/) Hook directory must be placed as sibling to the referenced Dockerfile location in the automated build configuration. diff --git a/package.json b/package.json new file mode 100644 index 00000000..f805786a --- /dev/null +++ b/package.json @@ -0,0 +1,77 @@ +{ + "devDependencies": { + "remark-cli": "^12.0.0", + "remark-frontmatter": "^5.0.0", + "remark-gfm": "^4.0.0", + "remark-lint": "^9.1.2", + "remark-lint-checkbox-content-indent": "^4.1.2", + "remark-lint-maximum-line-length": "^3.1.3", + "remark-preset-lint-markdown-style-guide": "^5.1.3", + "remark-preset-lint-recommended": "^6.1.3", + "stylelint": "^15.11.0", + "stylelint-config-standard": "^34.0.0", + "stylelint-scss": "^5.3.2", + "stylelint-csstree-validator": "^3.0.0" + }, + "remarkConfig": { + "settings": { + "bullet": "-", + "fence": "`", + "fences": "true", + "listItemIndent": "mixed", + "incrementListMarker": "true", + "resourceLink": "true", + "rule": "-" + }, + "plugins": [ + "remark-gfm", + "remark-frontmatter", + "remark-preset-lint-markdown-style-guide", + "remark-preset-lint-recommended", + "remark-lint-list-item-content-indent", + "remark-lint-checkbox-content-indent", + [ + "lint-fenced-code-marker", + "`" + ], + [ + "lint-list-item-indent", + "mixed" + ], + [ + "lint-maximum-line-length", + 120 + ], + [ + "lint-ordered-list-marker-style", + "." + ], + [ + "lint-ordered-list-marker-value", + "ordered" + ], + [ + "lint-unordered-list-marker-style", + "consistent" + ] + ] + }, + "stylelint": { + "extends": "stylelint-config-standard", + "ignoreFiles": [ + "docs/_build/**", + "docs/build/**" + ], + "rules": { + "block-no-empty": null, + "color-no-invalid-hex": true, + "color-hex-case": "upper", + "color-hex-length": "long", + "indentation": [ + 4 + ], + "property-no-vendor-prefix": null, + "no-descending-specificity": null + } + } +}