-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add proper python packaging and command line entrypoint
* Move code into `mcquant/` subdirectory to define the package name. * Refactor CommandSingleCellExtraction.py into cli.py. * Add pyproject.toml to define build tooling, dependencies, metadata, etc. * Define command-line entrypoint `mcquant`. * Use setuptools_scm to extract our version number directly from git tags. * Add --version argument to cli. Fixes #45. * Edit Dockerfile to build and install our package as a wheel rather than explicitly specifying all dependencies directly.
- Loading branch information
Showing
8 changed files
with
50 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
mcquant/_version.py | ||
.DS_Store | ||
|
||
# Byte-compiled / optimized / DLL files | ||
|
This file was deleted.
Oops, something went wrong.
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,5 +1,8 @@ | ||
FROM python:3.11 | ||
|
||
RUN pip install --no-cache-dir h5py pandas numpy pathlib 'scikit-image>=0.23.2' imagecodecs | ||
COPY . src | ||
|
||
COPY . /app/ | ||
RUN pip install --no-cache-dir build \ | ||
&& python -m build -w src \ | ||
&& pip install --no-cache-dir src/dist/mcquant*.whl \ | ||
&& rm -r src |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
try: | ||
from ._version import version as __version__ | ||
except ImportError: | ||
__version__ = "unknown" |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#Script for parsing command line arguments and running single-cell | ||
#data extraction functions | ||
#Joshua Hess | ||
from . import ParseInput | ||
from . import SingleCellDataExtraction | ||
|
||
def main(): | ||
#Parse the command line arguments | ||
args = ParseInput.ParseInputDataExtract() | ||
#Run the MultiExtractSingleCells function | ||
SingleCellDataExtraction.MultiExtractSingleCells(**args) | ||
|
||
if __name__ == '__main__': | ||
main() |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[build-system] | ||
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "mcquant" | ||
dynamic = ["version"] | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"h5py", | ||
"pandas", | ||
"numpy", | ||
"scikit-image>=0.23.2", | ||
"imagecodecs", | ||
] | ||
|
||
[project.scripts] | ||
mcquant = "mcquant.cli:main" | ||
|
||
[tool.setuptools] | ||
packages = ["mcquant"] | ||
|
||
[tool.setuptools_scm] | ||
version_file = "mcquant/_version.py" |