bregman-arie / bregman-arie/devops-exercises

Add a command to run `run_ci.sh` in CONTRIBUTING.md

Open
#212 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
84.4k
Forks
20.3k
PR merge metrics
No merged PRs in 30d

Description

Hi, I would like to ask about this section.

>## Before submitting the pull request
>You can test your changes locally with the script `run_ci.sh` in scripts directory.

---

I would like to add a command to run `run_ci.sh` :

>## Before submitting the pull request
>You can test your changes locally with the script `run_ci.sh` in scripts directory. Run the command below in project root directory :
> ```shell
> $ sh scripts/run_ci.sh
> ```


## Reason

This is the content of `run_ci.sh` :
```shell
#!/bin/bash
# These are the same steps we are running in Travis CI

python tests/syntax_lint.py
flake8 --max-line-length=100 . && echo "PEP8 Passed"
```

If I execute `sh run_ci.sh` in `scripts` directory, it will throw an error :
```shell
/home/user/pyenv/versions/3.8.12/bin/python: can't open file 'tests/syntax_lint.py': [Errno 2] No such file or directory
PEP8 Passed
```


## Proposed Solution

Either :
1) Ask users to execute `sh scripts/run_ci.sh` in project root directory.

or

2) Change `run_ci.sh` :
```diff
#!/bin/bash
# These are the same steps we are running in Travis CI

-python tests/syntax_lint.py
+python ../tests/syntax_lint.py
flake8 --max-line-length=100 . && echo "PEP8 Passed"
```

Thank you. Any suggestion is appreciated.

Contributor guide

Open the contributing guide

Research direction

Read the relevant section of CONTRIBUTING.md and inspect scripts/run_ci.sh alongside tests/syntax_lint.py. Document the command that runs the script from the project root, then verify the documented command matches the repository layout and script behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.