Skip to content

Commit

Permalink
added ipython to rtd requirments file (#309)
Browse files Browse the repository at this point in the history
* added ipython to rtd requirments file

* format and typos

* configure RTD to use poetry

* update lock file

* update poetry commands with docs

* specify sphinx ~7.1

* specific with add-ons

---------

Co-authored-by: Gregory Way <[email protected]>
  • Loading branch information
axiomcura and gwaybio authored Sep 15, 2023
1 parent 09b2c79 commit 74e6c63
Show file tree
Hide file tree
Showing 8 changed files with 480 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env bash
python -m pip install poetry
poetry config virtualenvs.in-project true --local
poetry install --all-extras
poetry install --with cell_locations,collate,dev
poetry run pre-commit install --install-hooks
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --all-extras
run: poetry install --no-interaction --no-root --all-extras --without docs
#----------------------------------------------
# install pycytominer
#----------------------------------------------
Expand Down
12 changes: 11 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
# Tell poetry to not use a virtual environment
- poetry config virtualenvs.create false
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install --with docs

python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt

sphinx:
builder: html
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
sphinx
sphinx-autobuild
sphinx-autoapi
ipython
groundwork-sphinx-theme
sphinx_copybutton
nbsphinx
Expand Down
457 changes: 453 additions & 4 deletions poetry.lock

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ codecov = ">=2.1.12"
pytest-cov = "^4.1.0"
pre-commit = ">=3.3.2"

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
mkdocs = "*"
sphinx = "~7.1"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down
6 changes: 3 additions & 3 deletions walkthroughs/nbconverted/single_cell_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@
#
# Currently, the NF1 morphology `SQLite` dataset was generated by using [CellProfiler's](https://github.com/CellProfiler/CellProfiler) [ExportToDatabase](https://cellprofiler-manual.s3.amazonaws.com/CellProfiler-4.2.5/modules/fileprocessing.html?highlight=exporttodatabase#module-cellprofiler.modules.exporttodatabase) function, where each table represents a different compartment, such as Image, Cell, Nucleus, and Cytoplasm.
#
# To achieve this, we will utilize the SingleCells class, which offers a range of functionalities specifically designed for single-cell analysis. You can find detailed documentation on these functionalities [here](https://pycytominer.readthedocs.io/en/latest/pycytominer.cyto_utils.html#pycytominer.cyto_utils.cells.SingleCells).
# To achieve this, we will utilize the `SingleCells` class, which offers a range of functionalities specifically designed for single-cell analysis. You can find detailed documentation on these functionalities [here](https://pycytominer.readthedocs.io/en/latest/pycytominer.cyto_utils.html#pycytominer.cyto_utils.cells.SingleCells).
#
# However, for our purpose in this walkthrough, we will focus on using the SingleCells class to merge all the tables within the NF1 sqlite file into a merged single-cell morphology dataset.
# However, for our purpose in this walkthrough, we will focus on using the `SingleCells` class to merge all the tables within the NF1 sqlite file into a merged single-cell morphology dataset.
#
# ### Updating defaults
# Before we proceed further, it is important to update the default parameters in the `SingleCells`class to accommodate the table name changes in our NF1 dataset.
Expand Down Expand Up @@ -136,7 +136,7 @@

# Now that we have created our merged single-cell profile, let's move on to the next step: loading our `platemaps`.
#
# Platemaps provide us with additional information that is crucial for our analysis. They contain details such as well positions, genotypes, gene names, perturbation types, and more. In other words, platemaps serve as a valuable source of metadata for our single-cell morphology profile.
# `Platemaps` provide us with additional information that is crucial for our analysis. They contain details such as well positions, genotypes, gene names, perturbation types, and more. In other words, platemaps serve as a valuable source of metadata for our single-cell morphology profile.
#

# In[5]:
Expand Down
6 changes: 3 additions & 3 deletions walkthroughs/single_cell_usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@
"\n",
"Currently, the NF1 morphology `SQLite` dataset was generated by using [CellProfiler's](https://github.com/CellProfiler/CellProfiler) [ExportToDatabase](https://cellprofiler-manual.s3.amazonaws.com/CellProfiler-4.2.5/modules/fileprocessing.html?highlight=exporttodatabase#module-cellprofiler.modules.exporttodatabase) function, where each table represents a different compartment, such as Image, Cell, Nucleus, and Cytoplasm.\n",
"\n",
"To achieve this, we will utilize the SingleCells class, which offers a range of functionalities specifically designed for single-cell analysis. You can find detailed documentation on these functionalities [here](https://pycytominer.readthedocs.io/en/latest/pycytominer.cyto_utils.html#pycytominer.cyto_utils.cells.SingleCells).\n",
"To achieve this, we will utilize the `SingleCells` class, which offers a range of functionalities specifically designed for single-cell analysis. You can find detailed documentation on these functionalities [here](https://pycytominer.readthedocs.io/en/latest/pycytominer.cyto_utils.html#pycytominer.cyto_utils.cells.SingleCells).\n",
"\n",
"However, for our purpose in this walkthrough, we will focus on using the SingleCells class to merge all the tables within the NF1 sqlite file into a merged single-cell morphology dataset.\n",
"However, for our purpose in this walkthrough, we will focus on using the `SingleCells` class to merge all the tables within the NF1 sqlite file into a merged single-cell morphology dataset.\n",
"\n",
"### Updating defaults\n",
"Before we proceed further, it is important to update the default parameters in the `SingleCells`class to accommodate the table name changes in our NF1 dataset.\n",
Expand Down Expand Up @@ -187,7 +187,7 @@
"source": [
"Now that we have created our merged single-cell profile, let's move on to the next step: loading our `platemaps`. \n",
"\n",
"Platemaps provide us with additional information that is crucial for our analysis. They contain details such as well positions, genotypes, gene names, perturbation types, and more. In other words, platemaps serve as a valuable source of metadata for our single-cell morphology profile.\n"
"`Platemaps` provide us with additional information that is crucial for our analysis. They contain details such as well positions, genotypes, gene names, perturbation types, and more. In other words, platemaps serve as a valuable source of metadata for our single-cell morphology profile.\n"
]
},
{
Expand Down

0 comments on commit 74e6c63

Please sign in to comment.