Skip to content

prncevince/my-prof

Repository files navigation

My Profile

To be installed on a new MacOS ... or one restored from OS with all the installs already.

Can help you mirror between multiple MacOS machines.

'Manual' Installs

'Auto' Installs

export HOMEBREW_NO_AUTO_UPDATE=1
brew install coreutils make
git clone https://github.com/prncevince/my-prof.git && cd my-prof
make
brew bundle --global

Vim Plugins

Run :PlugInstall

Tmux Plugins

Run prefix I

Miniconda (aka Miniforge w/ Mamba)

Instead of Anaconda / Conda, we can install a version of Miniforge with Mamba. Mamba has faster dependency resolution.

We can do this using a Homebrew cask, e.g. brew install miniforge or brew install mambaforge. There should be one in the ~/.Brewfile. If miniforge is installed, then we also need to perform a conda install -n base mamba.

Jupyter Lab

To be able to use virtual environments within Python. See Using Jupyter Notebook Extensions

Note, Anaconda is monolithic, so it's probably best to create a new environment to manage your JupyterLab installation.

Make sure to activate the environment that you install JupyterLab into when you use it to run other virtual environments.

In addition, the JupyterLab plotly extension must be installed into the same environment as JupyterLab, so a plotly install can take care of this. The same goes for the JupyterLab leaflet extension. However, this does not seem to cover all the dependency versions for say geemap, so it's better to install geemap with jupyter into it's own environment and use that version of jupyter. This can be done by installing pygis.

mamba install -n pygis pygis

If you'd like Math TeX docstring rendered, you can install the docrepr package within the activated environment & cofigure it for interactive sessions. Your mileage may vary, but SHIFT+TAB is typically more reliant than ⌘+I & the Contextual Pane for parsing docstring.

# just don't install anything into the base environment 
# a smarter move - create a jupyterlab environment 
conda create -n juplab -c conda-forge nb_conda jupyterlab plotly ipyleaflet
# to use the python environment's kernel from myenv within your juplab environment
conda install -n myenv ipykernel
# to get html parsed docstring for myenv - downloads sphinx dependent utilites
conda install -n myenv docrepr 

Within interactive JupyterLab session:

ip = get_ipython()
ip.sphinxify_docstring = True
ip.enable_html_pager = True

Troubleshooting

Hombrew Auto-Updates

Scenario: Hombrew runs brew update --preinstall and everything seems to break after ~15 minutes of installs.

If the pipx python utilities are dysfunctional due to a brew installation of python, reinstall them:

pipx reinstall-all

If your tmux session seems to be broken, kill the tmux server:

tksv 
# or 
tmux kill-server