original_docstring: 
      registers the new environment with a .bashrc entry alias for easy venv entry
      :param activate_path: path to virtual env activation script
      :param py_version: string representation of two-digit python version (ie 37)
      :param lib_name: name of library
      :return: bash alias to enter venv
      
docstring: registers the new environment with a .bashrc entry alias for easy venv entry
docstring_tokens: registers the new environment with a . bashrc entry alias for easy venv entry
code: def register_venv(activate_path: pathlib.Path, lib_name: str, py_version: str) -> str:
      """
      registers the new environment with a .bashrc entry alias for easy venv entry
      :param activate_path: path to virtual env activation script
      :param py_version: string representation of two-digit python version (ie 37)
      :param lib_name: name of library
      :return: bash alias to enter venv
      """
  
      lib_path: pathlib.Path = pathlib.Path(__file__).parent.parent.parent.absolute()
  
      bash_alias = f"env_go-{lib_name}-{py_version}"
  
      command = f'alias {bash_alias}=\'cd "{lib_path}";source "{activate_path}"\''
  
      if PLATFORM == "Darwin":
          bash_rc_path = pathlib.Path("~/.bash_aliases").expanduser()
      elif PLATFORM == "Linux":
          bash_rc_path = pathlib.Path("~/.bash_aliases").expanduser()
      else:
          raise RuntimeError("operating system not supported for venv creation")
  
      if bash_rc_path.exists():
          bash_rc_text = bash_rc_path.read_text()
      else:
          bash_rc_text = ""
  
      if command in bash_rc_text:
          return bash_alias
  
      bash_rc_text += (
          f"\n"
          f"\n# {lib_name} development virtual env entry for Python {py_version}"
          f"\n{command}"
      )
  
      with bash_rc_path.open(mode="w") as f:
          f.write(bash_rc_text)
  
      return bash_alias
code_tokens: def register_venv ( activate_path : pathlib . Path , lib_name : str , py_version : str ) -> str : lib_path : pathlib . Path = pathlib . Path ( __file__ ) . parent . parent . parent . absolute ( ) bash_alias = f"env_go-{lib_name}-{py_version}" command = f'alias {bash_alias}=\'cd "{lib_path}";source "{activate_path}"\'' if PLATFORM == "Darwin" : bash_rc_path = pathlib . Path ( "~/.bash_aliases" ) . expanduser ( ) elif PLATFORM == "Linux" : bash_rc_path = pathlib . Path ( "~/.bash_aliases" ) . expanduser ( ) else : raise RuntimeError ( "operating system not supported for venv creation" ) if bash_rc_path . exists ( ) : bash_rc_text = bash_rc_path . read_text ( ) else : bash_rc_text = "" if command in bash_rc_text : return bash_alias bash_rc_text += ( f"\n" f"\n# {lib_name} development virtual env entry for Python {py_version}" f"\n{command}" ) with bash_rc_path . open ( mode = "w" ) as f : f . write ( bash_rc_text ) return bash_alias
short_docstring: registers the new environment with a .bashrc entry alias for easy venv entry
short_docstring_tokens: registers the new environment with a . bashrc entry alias for easy venv entry
comment: """
      registers the new environment with a .bashrc entry alias for easy venv entry
      :param activate_path: path to virtual env activation script
      :param py_version: string representation of two-digit python version (ie 37)
      :param lib_name: name of library
      :return: bash alias to enter venv
      """