Open brodocode opened 1 year ago
OK. You can join a Meet call here in the next 35 mins. That is, 6pm GMT+1
okay. thank you
OK. You can join a Meet call here in the next 35 mins. That is, 6pm GMT+1
okay. thank you
I'm actually available now If you are. Just click on the link.
OK. You can join a Meet call here in the next 35 mins. That is, 6pm GMT+1
okay. thank you
I'm actually available now If you are. Just click on the link.
okay I am joining it then
the 5 set up point for pre commit is having error please help me figure this out. @pavithraes @bryevdv @PatChizzy @chinmaychahar @Azaya89
Can you copy and paste the error code here please?
(base) PS C:\Users\hp> cd bokeh
(base) PS C:\Users\hp\bokeh> python scripts/hooks/install.py
Traceback (most recent call last):
File "C:\Users\hp\bokeh\scripts\hooks\install.py", line 9, in
@Azaya89 @chinmaychahar @PatChizzy @mattpap
Can you manually check your bokeh local repo if the file actually exists? It should be in this path bokeh/scripts/hooks/install.py
Can you manually check your bokeh local repo if the file actually exists? It should be in this path
bokeh/scripts/hooks/install.py
yes it does exist ![Uploading Screenshot 2023-03-30 143906.png…]()
No. The one in your computer. Your cloned copy of the Bokeh repo.
No. The one in your computer. Your cloned copy of the Bokeh repo.
now what to do?
OK. Open the install.py
file on VScode, then on line 5, do CONTROL and CLICK on subprocess
. See if it opens another file.
OK. Open the
install.py
file on VScode, then on line 5, do CONTROL and CLICK onsubprocess
. See if it opens another file.
yes it did open it.
and then what to do?
That means the files exist. It is possible this is a Timeout error. Try it again from your source directory (users/hp/bokeh
).
subprocess.run
is trying to execute the pre-commit
program. The error is stating that pre-commit
was not found. Have you installed the pre-commit
package? Do you have the correct python environment where it was installed activated?
Yeah @brodocode, from your screenshot it looks like your conda environment is not activated. Activate it by running conda activate bkdev
before re-trying it. You should have (bkdev)
where (base)
is showing once activated.
subprocess.run
is trying to execute thepre-commit
program. The error is stating thatpre-commit
was not found. Have you installed thepre-commit
package? Do you have the correct python environment where it was installed activated?I did so @Azaya89 but again the same and yes @bryevdv I did try it with the environment activated but the pre commit file was not found
subprocess.run
is trying to execute thepre-commit
program. The error is stating thatpre-commit
was not found. Have you installed thepre-commit
package? Do you have the correct python environment where it was installed activated?
I'm installing the package now.
it is showing this error what to do? @Azaya89 @bryevdv @PatChizzy
Looks like you're not in your source directory. You should be in your hp/bokeh
directory before trying it.
Looks like you're not in your source directory. You should be in your
hp/bokeh
directory before trying it.
OOKAY i'll try again it worked thank you...
I did all the steps correctly but after installing pip install -e . command. After bokeh sample data it showed the following error and the code is written below:
(base) PS C:\Users\hp\bokeh> bokeh sampledata
Traceback (most recent call last):
File "C:\Users\hp\anaconda3\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\hp\anaconda3\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\hp\anaconda3\Scripts\bokeh.exe__main.py", line 7, in
what to do now? @Azaya89
Hi @brodocode Your fork of the repository is missing tags history, that is required for the build machinery. There was a recent update to the dev docs that covered this situation, but it's only in the tree, is it not published anywhere yet. But you can see the relevant FAQ here:
The relevant new info about cloning, in the linked section at the then:
While forking, make sure to uncheck the checkbox that limits copying to a specific branch (for example "Copy the branch-3.2 branch only").
We have advised others in this situation to delete their clone and fork, and re-fork with that checkbox unhecked. There is probably also some git command that would allow to fetch the full tag history into your existing fork and clone, but I am not sure what it is.
Edit: this might work to fetch the tag history:
git fetch upstream --tags
(and then probably git push --tags
to update your fork on GH as well)
Hi @brodocode Your fork of the repository is missing tags history, that is required for the build machinery. There was a recent update to the dev docs that covered this situation, but it's only in the tree, is it not published anywhere yet. But you can see the relevant FAQ here:
The relevant new info about cloning, in the linked section at the then:
While forking, make sure to uncheck the checkbox that limits copying to a specific branch (for example "Copy the branch-3.2 branch only").
We have advised others in this situation to delete their clone and fork, and re-fork with that checkbox unhecked. There is probably also some git command that would allow to fetch the full tag history into your existing fork and clone, but I am not sure what it is.
Edit: this might work to fetch the tag history:
git fetch upstream --tags
(and then probably
git push --tags
to update your fork on GH as well) The command still shows error saying that no such directory exists.
The command still shows error saying that no such directory exists.
Hi @brodocode you've had several different problems in this one issues. We want to help you, but it is confusing and difficult unless you are specific every time. E.g. it's not clear to me if the above refers to:
pre-commit
problem (again)Please report the (new) steps you've taken, as well as the full error text, every time.
Edit: also please always post the error messages as text, and not images. Images of text are not accessible to everyone, and are also not copy-pasteable in case that is necessary for helping to debug.
The command still shows error saying that no such directory exists.
Hi @brodocode you've had several different problems in this one issues. We want to help you, but it is confusing and difficult unless you are specific every time. E.g. it's not clear to me if the above refers to:
- the original env / missing
pre-commit
problem (again)- the problem you had when you ran commands outside the repo (again)
- a git problem from the latest suggestion
- something else
Please report the (new) steps you've taken, as well as the full error text, every time.
Edit: also please always post the error messages as text, and not images. Images of text are not accessible to everyone, and are also not copy-pasteable in case that is necessary for helping to debug.
I faced a problem again in the hooks. I'm so tired of this environment it is getting very confusing for a beginner. (base) PS C:\Users\hp> cd bokeh (base) PS C:\Users\hp\bokeh> python scripts/hooks/install.py pre-commit installed at .git\hooks\pre-push An error has occurred: InvalidConfigError: =====> .pre-commit-config.yaml is not a file Check the log at C:\Users\hp.cache\pre-commit\pre-commit.log (base) PS C:\Users\hp\bokeh>
Hi @brodocode pre-commit
is any extremely widely used tool in the OSS world, and as far as I know, there is nothing special or unusual about our setup. I am not sure why you are having this latest diffculty, but I can imagine it is frutrating. So let me offer you an alternative. The main purpose of the pre-commit
hooks is to run the "codebase" checks before pushing to GitHub. It is important to run these checks locally, before pushing to GitHub, because relying on GitHub CI to flag the issues is extremely time and resource intensive.
So, instead of installing pre-commit
, you can run the "codebase" checks by hand. At the top level of the repo, with the dev conda enviroment activated:
dev-311 ❯ pytest tests/codebase
==================================================================== test session starts =====================================================================
platform darwin -- Python 3.11.0, pytest-7.2.0, pluggy-1.0.0
rootdir: /Users/bryan/work/bokeh, configfile: pyproject.toml
plugins: anyio-3.6.1, html-3.2.0, flaky-3.7.0, xdist-3.0.2, cov-4.0.0, asyncio-0.20.1, metadata-2.0.4
asyncio: mode=Mode.STRICT
collected 23 items
tests/codebase/test_code_quality.py . [ 4%]
tests/codebase/test_eslint.py . [ 8%]
tests/codebase/test_importlib_metadata.py . [ 13%]
tests/codebase/test_isort.py ...... [ 39%]
tests/codebase/test_js_license_set.py s [ 43%]
tests/codebase/test_json.py . [ 47%]
tests/codebase/test_license.py . [ 52%]
tests/codebase/test_no_client_server_common.py .. [ 60%]
tests/codebase/test_no_ipython_common.py . [ 65%]
tests/codebase/test_no_pandas_common.py . [ 69%]
tests/codebase/test_no_request_host.py . [ 73%]
tests/codebase/test_no_selenium_common.py . [ 78%]
tests/codebase/test_no_tornado_common.py . [ 82%]
tests/codebase/test_no_typing_extensions_common.py . [ 86%]
tests/codebase/test_python_execution_with_OO.py . [ 91%]
tests/codebase/test_ruff.py . [ 95%]
tests/codebase/test_windows_reserved_filenames.py . [100%]
==================================================== 22 passed, 1 skipped, 2 warnings in 62.15s (0:01:02) ====================================================
(bkdev) PS C:\Users\hp\bokeh> pytest tests/codebase pytest : The term 'pytest' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
+ CategoryInfo : ObjectNotFound: (pytest:String)
[], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
this error is occuring now. @bryevdv
I followed up on Pavithra ma'am's comment but the issue is I'm still having trouble from where and how to start. please help me figure this out.