-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add detailed steps on how to create and add conda environments to jupyter notebook #198
base: main
Are you sure you want to change the base?
Add detailed steps on how to create and add conda environments to jupyter notebook #198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, but we can't accept a copy-pasted text from medium.com unless an open license is specified in the article and in this case it is not.
As far as the general workflow. The article is a good one to follow, but the workflow needs to be modified for this to fulfill the role of documentation for this project.
I commented on specific lines and the comments can guide you when creating your own text. Additionally, can you please add that as a separate file under docs
where we have the other files (instead of the readme)?
Sorry I was excited to contribute and got ahead of myself. I will make these changes now |
…l header format. Changed steps to h3s. Made the information more specific to PopsBorder. Tested for correctness too
I made the requested changes and tested the steps in conda. I also got the example notebook files to run in jupyter notebook. Thanks for working with me to provide corrections. Hope this meets standards! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes.
See the Super-Linter check which is failing. You can ignore the other two as they are not related to your changes.
docs/conda_windows_install.md
Outdated
Now that your virtual environment is created, navigate into it with | ||
```bat | ||
pipenv shell | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? (esp. in context of using conda install.) We want to minimize number of commands people need to run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After running some tests this does seem to be needed as pipenv installs the dependencies inside its virtual environment. The only other way would be putting pipenv run before the rest of the commands. But I can leave that up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose the option to reduce the number of commands like you said. I also tested this and ensured it worked on the notebook examples.
I made the changes and fixed leading headers and spacing, waiting for the super linter to be approved. Is there a way I can check that on my side before I push? |
Yes and no. You can see what markdown check is Super-Linter running and run that or run some other tool which may check like 80% of the same things. I use Prettier but it may change other places in the file, so you may need to clean up before you commit. |
This one passed super lint. Woohoo! Is there any other improvements I can make? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This markdown is about using conda to set up an environment and install popsborder. No need for all of these instructions using pipenv. Please revise this PR so that the instructions for adding the environment to Jupyter are incorporated into the example already in this markdown. Really all we need are two additional lines in the code given for setting up the conda environment.
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=popsborder_env
You can also include a few sentences explaining what these lines do and how to select the correct environment once you open the Jupyter notebook.
@@ -17,3 +17,67 @@ conda deactivate | |||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new lines for installing ipykernel and adding the env to Jupyter to the code chunk at line 16.
@@ -17,3 +17,67 @@ conda deactivate | |||
``` | |||
|
|||
To use your environment, run the command "conda activate popsborder_env" or select the popsborder_env environment from your IDE (e.g. VS Code, Atom, PyCharm). | |||
|
|||
## Adding Conda Environments to Jupyter Notebook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this section and incorporate additions into section above.
Based on the issue #197 which requested to "Add to conda windows install docs instructions for how to add conda environment to Jupyter notebook.".
I added a new section to the readme.md file titled "Adding Conda Environments to Jupyter Notebook" which details five steps on how to create environments in conda, install packages, specifically pipenv, link your environment to jupyter notebook, and finally open it up.