Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Documentation updates and fixes #43

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

Merged
merged 7 commits into from
Jun 9, 2020

Conversation

rpanderson
Copy link
Member

@rpanderson rpanderson commented Jun 5, 2020

  • Restore intro to installation docs (paras beginning 'We're excited to announce...').
  • Fix broken links in changes.md.
  • Fix collapsable code blocks (bibtex) that were never being converted from md to rst properly.
  • Include main.md before toctree in index (otherwise it gets rendered at the end of printable docs).
  • Populate What to do if you had custom code in a fork on BitBucket section of archive.md.
  • Show table-of-contents on installation index.
  • Decrease navigation_depth of sidebar to 3.
  • Use custom.css for darkening console input/output and spacing describe tags.
  • Drop local version.
  • Rename development-*.rst to developer-*.rst to be consistent with terminology used elsewhere.
  • Rename migrating-regular-to-development.rst to regular-to-development.rst for brevity, and hide this section for now.
  • Wrote Regular installation (Anaconda Cloud) section.
  • Use sphinx.ext.autosectionlabel extension with autosectionlabel_prefix_document=True to prefix each automatically-created section label with the name of the document it is in and a colon, e.g.
    :ref:`installation/setting-up-an-environment:Anaconda Python`
  • Replace single-quotes with apostrophes in rst source (that get rendered as single-quotes).
  • Rewording for brevity.
  • Put instructions for installing from test label on Anaconda Cloud or from PyPI in TODO (requires further discussion).
  • Change conda environment name in example from labscript_suite_py38 as this name is used in the shortcut suffix by desktop-app, and the labscript_suite_ prefix is inessential.
  • More cross-referencing and external links.
  • Coming soon! on Developer installation (Anaconda Cloud) page.
  • Feedback needed: Search block and admonition blocks styled using muted labscript livery (aRGB hex) and drop shadowed screenshots
  • Omit installation directory from conda environment instructions

Preview changes here: https://rpanderson-labscriptsuite.readthedocs.io

Copy link
Member

@philipstarkey philipstarkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(apparently I started a review instead of leaving individual comments...?? Sorry if this makes it confusing)

@rpanderson rpanderson force-pushed the master branch 2 times, most recently from 9ed1731 to 53712ea Compare June 5, 2020 06:23
@rpanderson rpanderson changed the title Docs updates and fixes after #42 Documentation updates and fixes Jun 5, 2020
@rpanderson
Copy link
Member Author

rpanderson commented Jun 5, 2020

Now that labscript-suite/labscript-utils#38 allows the profile directory to exist when running labscript-profile-create, should we recommend that users create their .venv there if using one? We currently use C:\labscript-suite in the examples for (non-Anaconda) Python, which would only contain the virtual environment in the case of a regular installation. The profile directory seems like a better choice for the virtual environment in this instance. The profile directory isn't a bad choice for a developer installation either, and it would be nice to not have the recommended (or even example) directory for this depend on regular/developer installation.

@chrisjbillington
Copy link
Member

I'm in favour of using the profile directory for the recommended venv and dev install.

@chrisjbillington
Copy link
Member

chrisjbillington commented Jun 5, 2020

We are mixing unix and Windows quick start command line instructions. Should we stick to one?
Edit: Or put in both rather than commenting on differences of line continuation characters?

@chrisjbillington
Copy link
Member

How about we recommend users add our anaconda channel rather than adding the channel name to install commands?

conda config --add channels labscript-suite

@philipstarkey
Copy link
Member

We are mixing unix and Windows quick start command line instructions. Should we stick to one?
Edit: Or put in both rather than commenting on differences of line continuation characters?

I don't think we should waste the space on both. I suggest windows only - it's the most likely OS to be used due to drivers. Also Linux users should be adept enough to translate the commands to Linux, but I doubt the reverse is necessarily true.

I also have a plan to see if I can add some Javascript to the quickstart section of the developer install to allow people to generate the command for their forks so that they don't have to find/replace the github username. This could potentially also change the line continuation character for a selected OS. It'll be harder to integrate that if we start double up on example code for multiple platforms.

How about we recommend users add our anaconda channel rather than adding the channel name to install commands?

conda config --add channels labscript-suite

How does this play out if people want to take dependencies from other channels that they've also added. Which takes precedence? Does specifying the channel at install time change the channel precedence vs adding it as a channel to the whole environment?

@philipstarkey
Copy link
Member

Also, was there a reason for changing the conda env name from labscript_suite_py38 to just py38? I was aiming for something that indicated this env should only be used for the labscript suite. For the PyPI docs, that's established by creating the .venv in a labscript suite folder, but that doesn't apply to conda installs. Happy for it to not be labscript_suite_py38 but I would like it to be more specific than just py38.

@rpanderson rpanderson mentioned this pull request Jun 6, 2020
3 tasks
@rpanderson
Copy link
Member Author

rpanderson commented Jun 6, 2020

We are mixing unix and Windows quick start command line instructions. Should we stick to one?

Yep! I'm all for this per @philipstarkey's comment above about Windows being the lowest common denominator (I'm paraphrasing, and I don't mean this with any disparaing/condescending connotations).

Edit: Or put in both rather than commenting on differences of line continuation characters?

I think that would fit into the documentation category of programmers enumerating all of the permutations to a fault, especially in this instance as the differences are minor.

@rpanderson
Copy link
Member Author

How about we recommend users add our anaconda channel rather than adding the channel name to install commands?

conda config --add channels labscript-suite

How does this play out if people want to take dependencies from other channels that they've also added. Which takes precedence? Does specifying the channel at install time change the channel precedence vs adding it as a channel to the whole environment?

Isn't this moot, since we strongly recommend users create a dedicated conda environment for the labscripte suite? Why then would they want to take dependencies from other channels?

@rpanderson
Copy link
Member Author

Also, was there a reason for changing the conda env name from labscript_suite_py38 to just py38? I was aiming for something that indicated this env should only be used for the labscript suite. For the PyPI docs, that's established by creating the .venv in a labscript suite folder, but that doesn't apply to conda installs. Happy for it to not be labscript_suite_py38 but I would like it to be more specific than just py38.

Naming the conda environment labscript_suite_py38:

  • Results in verbose shortcut names, e.g. 'runmanager - the labscript suite (labscript_suite_py38)', etc; and
  • Is inessential. Novice users could get the impression that the conda environment name must include 'labscript_suite'. In such documentation, I think it's important to only require such conventions where they are necessary or strongly recommended, not least since 'labscript_suite' appears so voluminously throughout. In accord with the lowest-common-demominotor ethos (above), users who don't know better won't require a more specific name; and those that do will know to.

@philipstarkey
Copy link
Member

How about we recommend users add our anaconda channel rather than adding the channel name to install commands?

conda config --add channels labscript-suite

How does this play out if people want to take dependencies from other channels that they've also added. Which takes precedence? Does specifying the channel at install time change the channel precedence vs adding it as a channel to the whole environment?

Isn't this moot, since we strongly recommend users create a dedicated conda environment for the labscripte suite? Why then would they want to take dependencies from other channels?

Their labscript/lyse usercode may depend on 3rd party packages (e.g. optimisation routines) and that code currently runs in the same Python environment.

Also, was there a reason for changing the conda env name from labscript_suite_py38 to just py38? I was aiming for something that indicated this env should only be used for the labscript suite. For the PyPI docs, that's established by creating the .venv in a labscript suite folder, but that doesn't apply to conda installs. Happy for it to not be labscript_suite_py38 but I would like it to be more specific than just py38.

Naming the conda environment labscript_suite_py38:

  • Results in verbose shortcut names, e.g. 'runmanager - the labscript suite (labscript_suite_py38)', etc; and
  • Is inessential. Novice users could get the impression that the conda environment name must include 'labscript_suite'. In such documentation, I think it's important to only require such conventions where they are necessary or strongly recommended, not least since 'labscript_suite' appears so voluminously throughout. In accord with the lowest-common-demominotor ethos (above), users who don't know better won't require a more specific name; and those that do will know to.

Those are good points that I hadn't considered. Probably best to leave it as py38 then. Maybe we can just double check that we're consistently emphasising that the environment should only be used for labscript suite related things?

@chrisjbillington
Copy link
Member

chrisjbillington commented Jun 6, 2020

I suggest windows only - it's the most likely OS to be used due to drivers. Also Linux users should be adept enough to translate the commands to Linux, but I doubt the reverse is necessarily true.

Sounds good. Windows command-line syntax it is then.

conda config --add channels labscript-suite

How does this play out if people want to take dependencies from other channels that they've also added. Which takes precedence? Does specifying the channel at install time change the channel precedence vs adding it as a channel to the whole environment?

Isn't this moot, since we strongly recommend users create a dedicated conda environment for the labscripte suite? Why then would they want to take dependencies from other channels?

Conda's default behaviour is to prefer channels by priority, and then by version number of the package. Channel priority can be controlled by different ways of spelling conda config --add channels , this form prepends the channel list making it highest priority - you can also append. I think this is unlikely to be an issue since our channel either mirrors packages available elsewhere exactly or provides packages not available elsewhere. Priority therefore should not matter.

FWIW though I've discovered that conda config --add channels labscript-suite adds the channel user-wide, not just to the current conda environment. To add only to the current conda environment it should be:

conda config --env --add channels labscript-suite

This should probably be how this line is spelled even if one is using the base conda environment, as I argue in favour of in #45

*Coming soon!*
$ source .venv/bin/activate
(.venv) $ pip install \
--src . -e git+https://github.com/wkheisenberg/blacs#egg=blacs \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fictitious GitHub user is not so fictitious 😕

@chrisjbillington
Copy link
Member

Let's merge and make further changes on top.

@chrisjbillington chrisjbillington merged commit 314fbbb into labscript-suite:master Jun 9, 2020
This was referenced Jun 25, 2020
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.

3 participants