Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DeclanGazil02
Copy link

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.

Copy link
Member

@wenzeslaus wenzeslaus left a 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)?

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@DeclanGazil02
Copy link
Author

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

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!

Copy link
Member

@wenzeslaus wenzeslaus left a 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 Show resolved Hide resolved
Comment on lines 55 to 58
Now that your virtual environment is created, navigate into it with
```bat
pipenv shell
```
Copy link
Member

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.

Copy link
Author

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.

Copy link
Author

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.

@DeclanGazil02
Copy link
Author

DeclanGazil02 commented Sep 28, 2023

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?

@wenzeslaus
Copy link
Member

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.

@wenzeslaus wenzeslaus self-requested a review September 28, 2023 03:15
@DeclanGazil02
Copy link
Author

This one passed super lint. Woohoo! Is there any other improvements I can make? :)

Copy link
Contributor

@kellynm kellynm left a 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
```
Copy link
Contributor

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

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.

@kellynm kellynm linked an issue Oct 2, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add instructions for adding conda env to Jupyter notebook
3 participants