bokeh / outreach-programs

A space to coordinate outreach programs like Outreachy and Google Season of Docs.
9 stars 12 forks source link

Project 1 bokeh #34

Open brodocode opened 1 year ago

brodocode commented 1 year ago

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.

brodocode commented 1 year ago

OK. You can join a Meet call here in the next 35 mins. That is, 6pm GMT+1

okay. thank you

Azaya89 commented 1 year ago

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.

brodocode commented 1 year ago

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

brodocode commented 1 year ago
Screenshot 2023-03-30 141420

the 5 set up point for pre commit is having error please help me figure this out. @pavithraes @bryevdv @PatChizzy @chinmaychahar @Azaya89

Azaya89 commented 1 year ago

Can you copy and paste the error code here please?

brodocode commented 1 year ago

(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 InstallHooks() File "C:\Users\hp\bokeh\scripts\hooks\install.py", line 5, in InstallHooks subprocess.run("pre-commit install --install-hooks --hook-type pre-push".split()) File "C:\Users\hp\anaconda3\lib\subprocess.py", line 503, in run with Popen(*popenargs, **kwargs) as process: File "C:\Users\hp\anaconda3\lib\subprocess.py", line 971, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\hp\anaconda3\lib\subprocess.py", line 1440, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

@Azaya89 @chinmaychahar @PatChizzy @mattpap

Azaya89 commented 1 year ago

Can you manually check your bokeh local repo if the file actually exists? It should be in this path bokeh/scripts/hooks/install.py

brodocode commented 1 year ago

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…]()

Azaya89 commented 1 year ago

No. The one in your computer. Your cloned copy of the Bokeh repo.

brodocode commented 1 year ago

No. The one in your computer. Your cloned copy of the Bokeh repo.

Screenshot 2023-03-30 143906

now what to do?

Azaya89 commented 1 year ago

OK. Open the install.py file on VScode, then on line 5, do CONTROL and CLICK on subprocess. See if it opens another file.

image

brodocode commented 1 year ago

OK. Open the install.py file on VScode, then on line 5, do CONTROL and CLICK on subprocess. See if it opens another file.

image

yes it did open it.

Screenshot 2023-03-30 151937

and then what to do?

Azaya89 commented 1 year ago

That means the files exist. It is possible this is a Timeout error. Try it again from your source directory (users/hp/bokeh).

bryevdv commented 1 year ago

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?

Azaya89 commented 1 year ago

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.

brodocode commented 1 year ago

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?

Screenshot 2023-03-31 192640

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

brodocode commented 1 year ago

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?

I'm installing the package now.

brodocode commented 1 year ago
Screenshot 2023-03-31 204019

it is showing this error what to do? @Azaya89 @bryevdv @PatChizzy

Azaya89 commented 1 year ago

Looks like you're not in your source directory. You should be in your hp/bokeh directory before trying it.

brodocode commented 1 year ago

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...

brodocode commented 1 year ago

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 File "C:\Users\hp\bokeh\src\bokeh__main.py", line 56, in main from bokeh.command.bootstrap import main as _main File "C:\Users\hp\bokeh\src\bokeh\command\bootstrap.py", line 56, in from . import subcommands File "C:\Users\hp\bokeh\src\bokeh\command\subcommands__init__.py", line 76, in all = _collect() File "C:\Users\hp\bokeh\src\bokeh\command\subcommands\init.py", line 60, in _collect mod = import_module("." + modname, package) File "C:\Users\hp\anaconda3\lib\importlib\init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "C:\Users\hp\bokeh\src\bokeh\command\subcommands\file_output.py", line 37, in from ..util import build_single_handler_applications, die File "C:\Users\hp\bokeh\src\bokeh\command\util.py", line 31, in from bokeh.application.handlers import ( File "C:\Users\hp\bokeh\src\bokeh\application\handlers\init__.py", line 25, in from .code import CodeHandler File "C:\Users\hp\bokeh\src\bokeh\application\handlers\code.py", line 47, in from ...io.doc import curdoc, patch_curdoc File "C:\Users\hp\bokeh\src\bokeh\io\init.py", line 24, in from .doc import curdoc File "C:\Users\hp\bokeh\src\bokeh\io\doc.py", line 30, in from .state import curstate File "C:\Users\hp\bokeh\src\bokeh\io\state.py", line 54, in from ..resources import Resources, ResourcesMode File "C:\Users\hp\bokeh\src\bokeh\resources.py", line 751, in CDN = Resources(mode="cdn") File "C:\Users\hp\bokeh\src\bokeh\resources.py", line 323, in init__ cdn = self._cdn_urls() File "C:\Users\hp\bokeh\src\bokeh\resources.py", line 384, in _cdn_urls return _get_cdn_urls(self.version, self.minified) File "C:\Users\hp\bokeh\src\bokeh\resources.py", line 710, in _get_cdn_urls sri_hashes = get_sri_hashes_for_version(version) File "C:\Users\hp\bokeh\src\bokeh\resources.py", line 179, in get_sri_hashes_for_version return hashes[version] KeyError: '0.0.1'

what to do now? @Azaya89

bryevdv commented 1 year ago

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:

https://github.com/bokeh/bokeh/blob/aaf3b8d651f5b71eef6a83ba21efa11ba160aed8/docs/bokeh/source/docs/dev_guide/setup.rst?plain=1#L612-L644

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)

brodocode commented 1 year ago

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:

https://github.com/bokeh/bokeh/blob/aaf3b8d651f5b71eef6a83ba21efa11ba160aed8/docs/bokeh/source/docs/dev_guide/setup.rst?plain=1#L612-L644

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.

bryevdv commented 1 year ago

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:

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.

brodocode commented 1 year ago

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>

bryevdv commented 1 year ago

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) ====================================================
brodocode commented 1 year ago

(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