-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds the ability to install spras as a python module using pip, which is something we'll need for running in remote environments such as on the OSPool. The installation "instructions" used by pip during building are laid out in `pyproject.toml`. While I chose to use setup-tools as a builder backend in this first pass, other builder backends with more robust build features are available and may eventually be switched to (eg flit, poetry). Several additional files had to be modified to adhere to python packaging guidelines, the most notable of which was changing `src` to spras, and referencing the new spras directory instead of src. Several lines of omicsintegrator2.py were also modified becasue they were dealing with an absolute path, which made the workflow un-runnable outside of the repo. I verified that all tests and the entirety of the snakefile still run both in the conda environment from the repo root (which is how the tool is currently used) and in a separate directory with spras installed where the input data, snakefile, and config file have been brought along. For testing, install spras using `pip install .` in the repo root. If the extra development packages are needed, spras can be installed with the command `pip install .[dev]`. Spras can also be installed via `pip install -e .` to make the installation editable. That is, when installed via this command, you can continue to edit spras in the repo and have those changes reflected anywhere you run spras on the machine. Note that several package versions had to be modified (they're noted in pyproject.toml) to get past a few versioning issues between conda and pypi. To the extent of my knowledge and testing, these changes didn't affect the way spras runs. Famous last words?
1 parent
17af0e9
commit 60d7ce8
Showing
30 changed files
with
100 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,56 @@ | ||
[project] | ||
name = "SPRAS" | ||
version = "v0.0.1" | ||
description = "Signaling Pathway Reconstruction Analysis Streamliner (SPRAS)" | ||
authors = [ | ||
{ name = "Anthony Gitter", email = "[email protected]" }, | ||
] | ||
license = { file = "LICENSE" } | ||
readme = "README.md" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"adjusttext==0.7.3", | ||
"snakemake==7.19.1", | ||
"docker==5.0.3", # Switched from docker-py to docker because docker-py is not maintained in pypi. This appears to have no effect | ||
"matplotlib==3.5", | ||
"networkx==2.8", | ||
"pandas==1.4", | ||
"pip==22.1", | ||
"requests==2.28", | ||
"scikit-learn==1.2", #Version bumped from 1.1-->1.2 to get past compilation errors. No other errors encountered | ||
"seaborn==0.12", | ||
"spython==0.2", | ||
# Only required for GraphSpace | ||
"commonmark==0.9", | ||
"docutils", #==0.18 | ||
"jinja2==3.1", | ||
"mock==4.0", | ||
"recommonmark==0.7", | ||
"sphinx==5.0", | ||
"graphspace_python==1.3.1", | ||
"sphinx-rtd-theme==1.0.0", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
# Only required for development | ||
"pre-commit==2.20", | ||
"pytest==7.1", | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/Reed-CompBio/spras" | ||
"Bug Tracker" = "https://github.com/Reed-CompBio/spras/issues" | ||
|
||
[build-system] | ||
requires = ["setuptools>=64.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.ruff] | ||
target-version = "py38" | ||
# Autofix errors when possible | ||
|
@@ -16,3 +69,9 @@ select = [ | |
"I", # isort | ||
"W292", # missing-newline-at-end-of-file | ||
] | ||
|
||
[tool.setuptools] | ||
# py-modules tells setuptools which directory is our actual module | ||
py-modules = ["spras"] | ||
# packages tells setuptools what the exported package is called (ie allows import spras) | ||
packages = ["spras", "spras.analysis"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters