Skip to content

Commit

Permalink
General improvements to docs and linters (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxschulz-COL authored Oct 12, 2023
1 parent 76c775e commit 70153f6
Show file tree
Hide file tree
Showing 26 changed files with 101 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
- [ ] I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

- I submit this contribution under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0.txt) and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
- I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.
- I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
- I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
- I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
8 changes: 5 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ repos:
entry: python tools/check_for_datafiles.py
language: python
pass_filenames: false
- id: check-spelling
name: check-spelling
- id: check-forbidden-words
name: check-forbidden-words
entry: tools/find_forbidden_words_in_repo.sh
language: script
pass_filenames: false

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli

# Linter for json, yaml, md, css and more
- repo: https://github.com/pre-commit/mirrors-prettier
Expand Down
12 changes: 6 additions & 6 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behaviour that contributes to creating a positive environment
Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
Expand All @@ -20,7 +20,7 @@ include:
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behaviour by participants include:
Examples of unacceptable behavior by participants include:

- The use of sexualised language or imagery and unwelcome sexual attention or
advances
Expand All @@ -34,13 +34,13 @@ Examples of unacceptable behaviour by participants include:
## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behaviour and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behaviour.
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviours that they deem inappropriate,
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope
Expand All @@ -54,7 +54,7 @@ further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behaviour may be
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ exclude_dirs = ["tests"]
line-length = 120
target-version = ["py38"]

[tool.codespell]
builtin = "clear,rare,en-GB_to_en-US"
dictionary = "tools/forbidden_words.txt"
ignore-words-list = "grey"

[tool.mypy]
# strict checks : strict = true
check_untyped_defs = true
Expand Down
15 changes: 7 additions & 8 deletions tools/find_forbidden_words_in_repo.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/bash

words=$"colour\|visualisation"
words_finder=$(grep -Irwno --exclude=find_forbidden_words_in_repo.sh --exclude-dir={.git,*cache*,*node_modules*,venv} . -e "$words")
# openai.api_base check
api_base_word="openai.api_base"
api_base_finder=$(grep -Irwno --exclude=find_forbidden_words_in_repo.sh --exclude-dir={.git,*cache*,*node_modules*,venv} . -e "$api_base_word")

if [[ $words_finder ]]
then
echo "Incorrect spelling for $words:
$words_finder"
# If openai.api_base is found
if [[ $api_base_finder ]]; then
echo "Please remove URL base for development:"
echo "$api_base_finder"
exit 1
else
echo "No $words found in the repo"
fi
1 change: 1 addition & 0 deletions tools/forbidden_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
quantumblack->Please do not refer specific entities
2 changes: 1 addition & 1 deletion vizro-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ See the fragment files in the [changelog.d directory](https://github.com/mckinse

- Optimize the client-server communication ([#34](https://github.com/mckinsey/vizro/pull/34))

- Eliminate most server side callbacks in favour of client-side callbacks
- Eliminate most server side callbacks in favor of client-side callbacks
- Add tests for client-side callbacks written in Node.js framework called `jest`.
- Add hatch command `hatch run test-js` that runs unit tests written in `jest`.
- Logging information now only displayed for action function carried out (no trigger or finished information)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Removed
- A bullet item for the Removed category.
-->
<!--
### Added
- A bullet item for the Added category.
-->
<!--
### Changed
- A bullet item for the Changed category.
-->
<!--
### Deprecated
- A bullet item for the Deprecated category.
-->
<!--
### Fixed
- A bullet item for the Fixed category.
-->
<!--
### Security
- A bullet item for the Security category.
-->
2 changes: 2 additions & 0 deletions vizro-core/docs/pages/development/authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

## Previous team members and code contributors

Natalia Kurakina,
[Leon Nallamuthu](https://github.com/leonnallamuthu),
[axa99](https://github.com/axa99),
[Jo Stichbury](https://github.com/stichbury),
[Juan Luis Cano Rodríguez](https://github.com/astrojuanlu),
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/docs/pages/development/contributing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Contributing guidelines

Contributions of all experience levels are welcome! There are many ways to contribute, and we appreciate all of them. Please use our [issues page](https://github.com/mckinsey/vizro/issues) to discuss any contributions.
Contributions of all experience levels are welcome! There are many ways to contribute, and we appreciate all of them. Please use our [issues page](https://github.com/mckinsey/vizro/issues) to discuss any contributions. Before opening a pull request, please ensure you've first opened an issue to discuss the contribution.

### Found a bug

Expand Down
Loading

0 comments on commit 70153f6

Please sign in to comment.