AICoE / s2i-custom-notebook

An s2i container image for JupyterHub with custom notebooks and dependencies
GNU General Public License v3.0
4 stars 12 forks source link

update README and added supplementary doc #36

Closed MichaelClifford closed 4 years ago

MichaelClifford commented 4 years ago

Related Issues and Dependencies

This PR is related to #35 regarding adding additional documentation to help users build and test their images locally. …

This introduces a breaking change

This Pull Request implements

Updates the Readme.md and adds a supplemental docs/RHEL8_docker_install.md file to address some common issues users were running into.

Description

This PR adds additional documentation to help users build and test their images locally. Specifically, it makes clear that the build and test process relies on s2i, docker and podam and provides links and additional instructions for installing these prerequisites. The additional documentation is a direct result of members of the AI CoE troubleshooting their own issues (specifically on RHEL8) and the information they would have found helpful.

sesheta commented 4 years ago
Pre-Commit Test failed! Click here ``` [INFO] Initializing environment for git://github.com/Lucas-C/pre-commit-hooks. [INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for git://github.com/pycqa/pydocstyle.git. [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy. [INFO] Initializing environment for https://github.com/psf/black. [INFO] Initializing environment for https://gitlab.com/PyCQA/flake8. [INFO] Initializing environment for https://gitlab.com/PyCQA/flake8:pep8-naming. [INFO] Installing environment for git://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for git://github.com/pycqa/pydocstyle.git. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/psf/black. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitlab.com/PyCQA/flake8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... Tabs remover.............................................................Passed Trim Trailing Whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing README.md Fixing docs/RHEL8_docker_install.md Check for merge conflicts................................................Passed Fix End of Files.........................................................Failed - hook id: end-of-file-fixer - exit code: 1 - files were modified by this hook Fixing docs/RHEL8_docker_install.md Tests should end in _test.py.........................(no files to check)Skipped Check for added large files..............................................Passed Check for byte-order marker..............................................Passed Check for case conflicts.................................................Passed Check docstring is first.................................................Passed Check JSON...............................................................Passed Check for broken symlinks............................(no files to check)Skipped Detect Private Key.......................................................Passed Check python ast.........................................................Passed Debug Statements (Python)................................................Passed pydocstyle...............................................................Passed Check Toml...............................................................Passed Check Yaml...............................................................Passed Fix End of Files.........................................................Passed Trim Trailing Whitespace.................................................Passed mypy.....................................................................Passed black....................................................................Passed flake8...................................................................Passed ```
MichaelClifford commented 4 years ago

How do I fix the "pre-commit-check" test issues?

tumido commented 4 years ago

@MichaelClifford

you can run it locally and fix your commits. https://pre-commit.com/

$ pip install --user pre-commit
$ cd <REPO>
$ pre-commit install  # adds a git commit hook to run precommit before it allows you to commit
$ pre-commit run  # run manually on git staged changes
$ pre-commit run -a  # run on all git tracked files

Some hooks will fix the violations themselves (like black, trailing-whitespace, end-of-file-fixer), some just report the violation to you and leave it up to you to fix them. You just fix it, stage it into the commit, and run git commit. This will execute the pre-commit hook once again and if it passes, it allows you to create the commit (you force skip those checks by running git commit -n instead).

Your particular pre-commit log reports violations from hooks that can modify files by themselves. For you no manual fixing should be required, just run pre-commit and it'll modify those files. You then just stage and commit them. :wink:

MichaelClifford commented 4 years ago

@tumido :smiley: Thanks for the help with "pre-commit". I was confused by the Shesheta output - files were modified by this hook. Seemed like it fixed the issues automatically, but obviously not. :)

Anyways, used the tool locally, and it should pass now. :crossed_fingers:

SankBad commented 4 years ago

Hi Michael,

It's working perfectly. This is great work. I spent an entire day finding out a solution on RHEL and end up being working on ubuntu VM. This doc is definitely useful.

Thanks!

MichaelClifford commented 4 years ago

This PR also addresses #11

MichaelClifford commented 4 years ago

@4n4nd I think I addressed all your suggestions. Take a look and let me know if not : )

sesheta commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 4n4nd, tumido

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/AICoE/s2i-custom-notebook/blob/master/OWNERS)~~ [4n4nd] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment