BCDA-APS / use_bluesky

Tools to help APS use the Bluesky Framework (https://blueskyproject.io/)
8 stars 3 forks source link

new environment for 2022_1 #110

Closed prjemian closed 2 years ago

prjemian commented 2 years ago
prjemian commented 2 years ago

The nsls2forge channel provides a conda package for pyRestTable

prjemian commented 2 years ago

Specific version requirements:

package current conda version channel
adl2pydm 0.0.2 not available via PyPI or conda, only github
bluesky 1.8.1 conda-forge
bluesky-queueserver 0.0.8 conda-forge
bluesky-widgets 0.0.10 conda-forge
databroker 1.2.4 conda-forge
epics-base 7.0.5 conda-forge
hklpy 1.0.1 conda-forge
ophyd 1.6.3 conda-forge
pyEpics 3.5.0 conda-forge

The pip-installed requirements section may be commented out.

prjemian commented 2 years ago

All channel requirements should remain as-is at this time.

prjemian commented 2 years ago

The bluesky-kafka package is not needed as en environment requirement by us yet. We are not currently using kafka tools as a databroker document buffer in any production environment.

prjemian commented 2 years ago

Also, make environments for Mac and Windows. Here are the changes for the 2021_2 environments for each:

Mac (differences) ``` (bluesky_2021_2) prjemian@zap:~/.../use_bluesky/install$ diff -bB --side-by-side ./environment_2021_2.yml ./mac_2021_1.yml name: bluesky_2021_2 | name: bluesky_2021_1 < # use: < # date; conda env create --force -f ./environment_2021_2.ym < < channels: channels: - defaults - defaults - conda-forge - conda-forge - nsls2forge - nsls2forge - aps-anl-tag - aps-anl-tag | - pydm-tag > - pcds-tag dependencies: dependencies: # --- Python core packages < - python>=3.8 - python>=3.8 - ipython | # - anaconda - jupyter | - aps-dm-api - jupyterlab | - apstools - notebook | - area-detector-handlers - pip < - psutil < # --- testing and quality assurance < - black - black > - bluesky>=1.6.2 > # - caproto > - conda-build > - coverage > - databroker>=1.0.6 > - databroker-pack > # - epics-pydb - flake8 - flake8 - pylint < - pytest < # --- Qt < - pyqt=5 < - qt=5 < # --- support packages < - aps-dm-api < - epics-base>=7.0.5 < - h5py - h5py > # - happi > # - hklpy - imagecodecs-lite - imagecodecs-lite - ipympl | - ipython > - jupyter > - jupyterlab - lxml - lxml > - nexpy > - notebook > - ophyd>=1.5.1 - pandas - pandas > - pandoc - pint - pint - pyEpics>=3.4.3 | - pip - pymongo | - psutil - scikit-image < - xlrd < # --- Bluesky framework packages < - apstools < - area-detector-handlers < - bluesky>=1.6.7 < - bluesky-kafka < - databroker-pack < - databroker>=1.2.3 < - happi < - hklpy>=0.3.16 < - ophyd>=1.6.1 < - pydm < # --- user-requested packages < - nexpy < - punx - punx - pvview - pvview > - pydm > - pyEpics>=3.4.2 > - pylint - pymca - pymca > - pymongo > - pyqt=5 - pyRestTable - pyRestTable > - pytest > - qt=5 > - scikit-image - spec2nexus - spec2nexus - stdlogpj < - xrayutilities < # --- packaging and publishing < - conda-build < - coverage < - sphinx - sphinx - sphinxcontrib-napoleon - sphinxcontrib-napoleon - twine | - stdlogpj > # - twine > # - typhos - versioneer - versioneer > - xlrd - pip: - pip: - bluesky-queueserver | - bluesky-live # - bluesky-webclient is NOT Python software, don't insta | # - ipython-genutils==0.2.0 # https://github.com/bluesky/bluesky-webclient | - sphinx-rtd-theme - bluesky-widgets | - super-state-machine ```
Windows (differences) ``` (bluesky_2021_2) prjemian@zap:~/.../use_bluesky/install$ diff -bB --side-by-side ./environment_2021_2.yml ./win_2021_1.yml name: bluesky_2021_2 | name: bluesky_2021_1 < # use: < # date; conda env create --force -f ./environment_2021_2.ym < < channels: channels: - defaults - defaults - conda-forge - conda-forge - nsls2forge < - aps-anl-tag - aps-anl-tag | - nsls2forge > - pydm-tag > - pcds-tag dependencies: dependencies: # --- Python core packages | # - anaconda - python>=3.8 | - area-detector-handlers - ipython < - jupyter < - jupyterlab < - notebook < - pip < - psutil < # --- testing and quality assurance < - black - black > - bluesky>=1.6.2 > - caproto > - conda-build > - coverage > - databroker-pack > - databroker>=1.0.6 - flake8 - flake8 - pylint < - pytest < # --- Qt < - pyqt=5 < - qt=5 < # --- support packages < - aps-dm-api < - epics-base>=7.0.5 < - h5py - h5py > - happi - imagecodecs-lite - imagecodecs-lite - ipympl | - ipython > - jupyter > - jupyterlab - lxml - lxml > - nexpy > - notebook > - ophyd>=1.5.1 - pandas - pandas > - pandoc - pint - pint - pyEpics>=3.4.3 | - pip - pymongo | - psutil - scikit-image < - xlrd < # --- Bluesky framework packages < - apstools < - area-detector-handlers < - bluesky>=1.6.7 < - bluesky-kafka < - databroker-pack < - databroker>=1.2.3 < - happi < - hklpy>=0.3.16 < - ophyd>=1.6.1 < - pydm < # --- user-requested packages < - nexpy < - punx - punx - pvview - pvview > - pydm > - pyEpics>=3.4.2 > - pylint - pymca - pymca > - pymongo > - pyqt=5 - pyRestTable - pyRestTable > - pytest > - python > - qt=5 > - scikit-image - spec2nexus - spec2nexus - stdlogpj < - xrayutilities < # --- packaging and publishing < - conda-build < - coverage < - sphinx - sphinx - sphinxcontrib-napoleon - sphinxcontrib-napoleon > - stdlogpj - twine - twine > - typhos - versioneer - versioneer > - xlrd > # - aps-dm-api no windows package available > # - apstools pip install --no-deps apstools > # - epics-pydb no windows package available > # - hklpy no windows build of libhkl - pip: - pip: - bluesky-queueserver | - bluesky-live # - bluesky-webclient is NOT Python software, don't insta | # - ipython-genutils==0.2.0 # https://github.com/bluesky/bluesky-webclient | - sphinx-rtd-theme - bluesky-widgets | - super-state-machine ```
prjemian commented 2 years ago

Pip can install from a github repo. Examples from StackOverflow show how, such as:

pip install https://github.com/BCDA-APS/adl2pydm/archive/main.zip

Will this URL work in the conda environment.yml file? Try it. Ultimately, adl2pydm needs to publish (at least) to PyPI.

prjemian commented 2 years ago

Both bluesky-queueserver and bluesky-widgets are not required but rather exploratory at this time.

prjemian commented 2 years ago

Yowee, that worked (including the pip install from github)!

```bash (base) prjemian@zap:~/.../use_bluesky/install$ date; conda env create --force -f ./environment_2022_1.yml; date Fri 05 Nov 2021 12:41:36 PM CDT Collecting package metadata (repodata.json): done Solving environment: done Preparing transaction: done Verifying transaction: done Executing transaction: done Installing pip dependencies: - Ran pip subprocess with arguments: ['/home/prjemian/.conda/envs/bluesky_2022_1/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/prjemian/Documents/projects/BCDA-APS/use_bluesky/install/condaenv.7e4jmnq9.requirements.txt'] Pip subprocess output: Collecting https://github.com/BCDA-APS/adl2pydm/archive/main.zip (from -r /home/prjemian/Documents/projects/BCDA-APS/use_bluesky/install/condaenv.7e4jmnq9.requirements.txt (line 1)) Using cached https://github.com/BCDA-APS/adl2pydm/archive/main.zip Building wheels for collected packages: adl2pydm Building wheel for adl2pydm (setup.py): started Building wheel for adl2pydm (setup.py): finished with status 'done' Created wheel for adl2pydm: filename=adl2pydm-0+unknown-py3-none-any.whl size=41951 sha256=ebc87aad84ec7754d8780460daa1f155c43f865d0c1dcf2443ff786740c0eac1 Stored in directory: /tmp/pip-ephem-wheel-cache-09zcdmlp/wheels/98/14/b3/e67a7f4cbc573c135bca80cedbacceed682b128d0885366e8c Successfully built adl2pydm Installing collected packages: adl2pydm Successfully installed adl2pydm-0+unknown done # # To activate this environment, use # # $ conda activate bluesky_2022_1 # # To deactivate an active environment, use # # $ conda deactivate Fri 05 Nov 2021 12:44:08 PM CDT ``` Installed Python 3.9.7
prjemian commented 2 years ago

All work complete. Time for BUG reports.