Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Project 1 bokeh #34

Open
brodocode opened this issue Mar 20, 2023 · 77 comments
Open

Project 1 bokeh #34

brodocode opened this issue Mar 20, 2023 · 77 comments

Comments

@brodocode
Copy link

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.

@Azaya89
Copy link
Member

Azaya89 commented Mar 22, 2023

Hi, What do you need to do and what have you done so far?

@brodocode
Copy link
Author

I have installed bokeh and understood the basics of it but I have no knowledge how to work on the micro task

@PatChizzy
Copy link

I have installed bokeh and understood the basics of it but I have no knowledge how to work on the micro task

Have you decided on which project to work on? I'll link all 3 below.
Each one has its own set of microtask. Read through the instructions for project of choice, and tackle the tasks one microtask at a time using the associated microtask link.

The links are in a parent-child structure

  1. [Project] Improve Bokeh's documentation using the Diátaxis framework #1
  2. [Project] Create a blog post series: "Fundamentals of Data Visualization in Bokeh" #2
  3. [Project] Improve the accessibility of Bokeh's Gallery examples #3

@PatChizzy
Copy link

I have installed bokeh and understood the basics of it but I have no knowledge how to work on the micro task

Have you decided on which project to work on? I'll link all 3 below. Each one has its own set of microtask. Read through the instructions for project of choice, and tackle the tasks one microtask at a time using the associated microtask link.

The links are in a parent-child structure

  1. [Project] Improve Bokeh's documentation using the Diátaxis framework #1
  2. [Project] Create a blog post series: "Fundamentals of Data Visualization in Bokeh" #2
  3. [Project] Improve the accessibility of Bokeh's Gallery examples #3

Also, if you need help from the mentors, its easiier to tag them to your post

@Azaya89
Copy link
Member

Azaya89 commented Mar 22, 2023

I have installed bokeh and understood the basics of it but I have no knowledge how to work on the micro task

Have you decided on which project to work on? I'll link all 3 below. Each one has its own set of microtask. Read through the instructions for project of choice, and tackle the tasks one microtask at a time using the associated microtask link.
The links are in a parent-child structure

  1. [Project] Improve Bokeh's documentation using the Diátaxis framework #1
  2. [Project] Create a blog post series: "Fundamentals of Data Visualization in Bokeh" #2
  3. [Project] Improve the accessibility of Bokeh's Gallery examples #3

Also, if you need help from the mentors, its easiier to tag them to your post

@brodocode You could decide on a project from this linked list and we can guide you on how to start any of them.

@brodocode
Copy link
Author

I have installed bokeh and understood the basics of it but I have no knowledge how to work on the micro task

Have you decided on which project to work on? I'll link all 3 below. Each one has its own set of microtask. Read through the instructions for project of choice, and tackle the tasks one microtask at a time using the associated microtask link.

The links are in a parent-child structure

  1. [Project] Improve Bokeh's documentation using the Diátaxis framework #1
  2. [Project] Create a blog post series: "Fundamentals of Data Visualization in Bokeh" #2
  3. [Project] Improve the accessibility of Bokeh's Gallery examples #3

I apologise as i didn't know how to reach to these links.
I think I'm new to this open source projects so it will be good to start with the base so, I'll be going with the third project.
Thank you.

@brodocode
Copy link
Author

I have installed bokeh and understood the basics of it but I have no knowledge how to work on the micro task

Have you decided on which project to work on? I'll link all 3 below. Each one has its own set of microtask. Read through the instructions for project of choice, and tackle the tasks one microtask at a time using the associated microtask link.
The links are in a parent-child structure

  1. [Project] Improve Bokeh's documentation using the Diátaxis framework #1
  2. [Project] Create a blog post series: "Fundamentals of Data Visualization in Bokeh" #2
  3. [Project] Improve the accessibility of Bokeh's Gallery examples #3

Also, if you need help from the mentors, its easiier to tag them to your post

@brodocode You could decide on a project from this linked list and we can guide you on how to start any of them.

It will be great to work under your guidance.
Please guide me towards the successful completion of this project.
Thank you.

@Azaya89
Copy link
Member

Azaya89 commented Mar 22, 2023

OK @brodocode, first of all, you need to check out the project tasks, and take the first steps, which in this case is learning the basics of Bokeh.

I think a good way to get help is to be specific with your enquiry. State what you want to do, what you have tried and what is not working for you.

@brodocode
Copy link
Author

OK @brodocode, first of all, you need to check out the project tasks, and take the first steps, which in this case is learning the basics of Bokeh.

I think a good way to get help is to be specific with your enquiry. State what you want to do, what you have tried and what is not working for you.

Yes sure, I have started working on the initial steps according to [Micro task] Set up your local development environment for Bokeh #4 and have installed conda.

@brodocode
Copy link
Author

OK @brodocode, first of all, you need to check out the project tasks, and take the first steps, which in this case is learning the basics of Bokeh.
I think a good way to get help is to be specific with your enquiry. State what you want to do, what you have tried and what is not working for you.

Yes sure, I have started working on the initial steps according to [Micro task] Set up your local development environment for Bokeh #4 and have installed conda.

While working on the Fork and clone the repository my git is unable to find the remote repositoryas a result of which I cannot proceed further.

@PatChizzy
Copy link

OK @brodocode, first of all, you need to check out the project tasks, and take the first steps, which in this case is learning the basics of Bokeh.
I think a good way to get help is to be specific with your enquiry. State what you want to do, what you have tried and what is not working for you.

Yes sure, I have started working on the initial steps according to [Micro task] Set up your local development environment for Bokeh #4 and have installed conda.

While working on the Fork and clone the repository my git is unable to find the remote repositoryas a result of which I cannot proceed further.

@brodocode please attach a screenshot of the error message.

The usual step for that is

  • fork bokehs' repo
  • clone the forked version to your local machine

the forked repo will be in your own repo. Use the code provided there to do the git clone.

image

@Azaya89
Copy link
Member

Azaya89 commented Mar 23, 2023

OK @brodocode, first of all, you need to check out the project tasks, and take the first steps, which in this case is learning the basics of Bokeh.
I think a good way to get help is to be specific with your enquiry. State what you want to do, what you have tried and what is not working for you.

Yes sure, I have started working on the initial steps according to [Micro task] Set up your local development environment for Bokeh #4 and have installed conda.

While working on the Fork and clone the repository my git is unable to find the remote repository as a result of which I cannot proceed further.

When you do git remote -v from your command line, what do you see?

@brodocode
Copy link
Author

OK @brodocode, first of all, you need to check out the project tasks, and take the first steps, which in this case is learning the basics of Bokeh.
I think a good way to get help is to be specific with your enquiry. State what you want to do, what you have tried and what is not working for you.

Yes sure, I have started working on the initial steps according to [Micro task] Set up your local development environment for Bokeh #4 and have installed conda.

While working on the Fork and clone the repository my git is unable to find the remote repository as a result of which I cannot proceed further.

When you do git remote -v from your command line, what do you see?

fatal: not a git repository (or any of the parent directories): .git

this is displayed

@brodocode
Copy link
Author

OK @brodocode, first of all, you need to check out the project tasks, and take the first steps, which in this case is learning the basics of Bokeh.
I think a good way to get help is to be specific with your enquiry. State what you want to do, what you have tried and what is not working for you.

Yes sure, I have started working on the initial steps according to [Micro task] Set up your local development environment for Bokeh #4 and have installed conda.

While working on the Fork and clone the repository my git is unable to find the remote repositoryas a result of which I cannot proceed further.

@brodocode please attach a screenshot of the error message.

The usual step for that is

  • fork bokehs' repo
  • clone the forked version to your local machine

the forked repo will be in your own repo. Use the code provided there to do the git clone.

image

I did that but it is not following the further remote repo

@chinmaychahar
Copy link

chinmaychahar commented Mar 23, 2023

@brodocode have you forked bokeh's repository? I can't see one here

Edit: Saw that you've named it Spoon-Knife. Why don't you try git clone https://github.com/brodocode/Spoon-Knife.git on your cmd?

@Azaya89
Copy link
Member

Azaya89 commented Mar 23, 2023

fatal: not a git repository (or any of the parent directories): .git

this is displayed

OK, so that means you haven't added any upstream yet.

Here's a complete guide on how to set-up your dev environment for this project https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html

You can clone your forked repository by following the steps here https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository

After that, you can set the main bokeh/bokeh repository as an additional upstream by doing git remote add upstream https://github.com/bokeh/bokeh.git per the steps in the setup link.

Let me know how it goes.

@brodocode
Copy link
Author

@brodocode have you forked bokeh's repository? I can't see one here

Edit: Saw that you've named it Spoon-Knife. Why don't you try git clone https://github.com/brodocode/Spoon-Knife.git on your cmd?

it is showing this: fatal: destination path 'Spoon-Knife' already exists and is not an empty directory.

@chinmaychahar
Copy link

it is showing this: fatal: destination path 'Spoon-Knife' already exists and is not an empty directory.

Okay, that means you've already cloned it. You should do cd Spoon-Knife from your cmd next and try to open the directory in your code editor like VS Code or something.

@brodocode
Copy link
Author

it is showing this: fatal: destination path 'Spoon-Knife' already exists and is not an empty directory.

Okay, that means you've already cloned it. You should do cd Spoon-Knife from your cmd next and try to open the directory in your code editor like VS Code or something.

yeap did that..now the new problem is that it is not able to create conda environment.

@brodocode
Copy link
Author

fatal: not a git repository (or any of the parent directories): .git
this is displayed

OK, so that means you haven't added any upstream yet.

Here's a complete guide on how to set-up your dev environment for this project https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html

You can clone your forked repository by following the steps here https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository

After that, you can set the main bokeh/bokeh repository as an additional upstream by doing git remote add upstream https://github.com/bokeh/bokeh.git per the steps in the setup link.

Let me know how it goes.

yes I followed it from the start and did it but now I'm stuck at creating the conda environment.. still figuring it out.

@chinmaychahar
Copy link

yeap did that..now the new problem is that it is not able to create conda environment.

can you show the error message?

Fyi, you just have to go step by step through the guide - https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html
Everything is mentioned in great detail here and if you're still stuck with some issues, I would recommend pinging the mentors because they would be help you out the best!

@brodocode
Copy link
Author

Screenshot 2023-03-24 125212

yeap did that..now the new problem is that it is not able to create conda environment.

can you show the error message?

Fyi, you just have to go step by step through the guide - https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html Everything is mentioned in great detail here and if you're still stuck with some issues, I would recommend pinging the mentors because they would be help you out the best!

@chinmaychahar
Copy link

You don't have conda installed on your system :)

Please visit https://www.anaconda.com/products/distribution and install it.

@brodocode
Copy link
Author

You don't have conda installed on your system :)

Please visit https://www.anaconda.com/products/distribution and install it.

got it working on it.

@PatChizzy
Copy link

Screenshot 2023-03-24 125212

yeap did that..now the new problem is that it is not able to create conda environment.

can you show the error message?
Fyi, you just have to go step by step through the guide - https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html Everything is mentioned in great detail here and if you're still stuck with some issues, I would recommend pinging the mentors because they would be help you out the best!

This terminal looks like git bash. After installing Anaconda, use anaconda prompt to run the code instead of git bash

@brodocode
Copy link
Author

Screenshot 2023-03-24 125212 > > yeap did that..now the new problem is that it is not able to create conda environment. > > > can you show the error message? > Fyi, you just have to go step by step through the guide - https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html Everything is mentioned in great detail here and if you're still stuck with some issues, I would recommend pinging the mentors because they would be help you out the best!

This terminal looks like git bash. After installing Anaconda, use anaconda prompt to run the code instead of git bash

Yes i did that and currently Ihave no problem.

@chinmaychahar
Copy link

chinmaychahar commented Mar 24, 2023

You forgot to put a .

The command is pip install -e .

@brodocode
Copy link
Author

You've forgot to put a .

The command is pip install -e .

OOH! OKAY thank you

@brodocode
Copy link
Author

You forgot to put a .

The command is pip install -e .

it is still showing the error.
Screenshot 2023-03-24 222057

@chinmaychahar
Copy link

Put a space between e and .

@brodocode
Copy link
Author

From your screenshot, it looks like you created the environment in your home directory. You're supposed to create the environment in the directory where you cloned Bokeh (users\hp\bokeh). That's why the first command didn't work.
Edit: If you can get on a Google Meet call, I could guide you on how to set it up correctly via screensharing.

yes sure, that is great.

Screenshot 2023-03-29 215432

and this happened and is still loading . i think i messed it all up. please tell me the suitable time so that i can get u on the google meet call.

@brodocode
Copy link
Author

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

okay. thank you

@Azaya89
Copy link
Member

Azaya89 commented Mar 29, 2023

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
Copy link
Author

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
Copy link
Author

brodocode commented Mar 30, 2023

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
Copy link
Member

Azaya89 commented Mar 30, 2023

Can you copy and paste the error code here please?

@brodocode
Copy link
Author

brodocode commented Mar 30, 2023

(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
Copy link
Member

Azaya89 commented Mar 30, 2023

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
Copy link
Author

brodocode commented Mar 30, 2023

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
Copy link
Member

Azaya89 commented Mar 30, 2023

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

@brodocode
Copy link
Author

brodocode commented Mar 30, 2023

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

Screenshot 2023-03-30 143906

now what to do?

@Azaya89
Copy link
Member

Azaya89 commented Mar 30, 2023

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
Copy link
Author

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
Copy link
Member

Azaya89 commented Mar 30, 2023

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

@bryevdv
Copy link
Member

bryevdv commented Mar 30, 2023

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
Copy link
Member

Azaya89 commented Mar 30, 2023

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 brodocode reopened this Mar 31, 2023
@brodocode
Copy link
Author

brodocode commented Mar 31, 2023

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
Copy link
Author

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
Copy link
Author

brodocode commented Mar 31, 2023

Screenshot 2023-03-31 204019

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

@Azaya89
Copy link
Member

Azaya89 commented Mar 31, 2023

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

@brodocode
Copy link
Author

brodocode commented Mar 31, 2023

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
Copy link
Author

brodocode commented Mar 31, 2023

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
Copy link
Member

bryevdv commented Mar 31, 2023

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
Copy link
Author

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
Copy link
Member

bryevdv commented Mar 31, 2023

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.

@brodocode
Copy link
Author

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
Copy link
Member

bryevdv commented Apr 1, 2023

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
Copy link
Author

(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

  • pytest tests/codebase
  •   + CategoryInfo          : ObjectNotFound: (pytest:String)
     [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

this error is occuring now. @bryevdv

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants