-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from mlexchange/organize
Organize
- Loading branch information
Showing
11 changed files
with
139 additions
and
33 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: mlex_latent_explorer | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
cache: 'pip' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
pip install .[dev] | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
test.py | ||
**cache** | ||
|
||
# output dir | ||
results/ | ||
|
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 @@ | ||
FROM python:3.9 | ||
LABEL maintainer="THE MLEXCHANGE TEAM" | ||
|
||
RUN ls | ||
|
||
RUN pip3 install --upgrade pip &&\ | ||
pip3 install -r . | ||
|
||
WORKDIR /app/work | ||
ENV HOME /app/work | ||
COPY src src | ||
|
||
CMD ["bash"] | ||
CMD python3 src/frontend.py |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[project] | ||
name = "mlex_latent_explorer" | ||
version = "0.0.1" | ||
authors = [ | ||
{ name="Runbo Jiang", email="[email protected]"} | ||
] | ||
description = "A web app to visualize latent vectors in 2D or 3D, supporting PCA and UMAP for dimension reduction." | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Operating System :: OS Independent", | ||
] | ||
|
||
dependencies = [ | ||
"dash==2.9.3", | ||
"dash-core-components==2.0.0", | ||
"dash-bootstrap-components==1.0.2", | ||
"dash-html-components==2.0.0", | ||
"dash-iconify==0.1.2", | ||
"plotly==5.14.1", | ||
"scikit-learn==1.3.0", | ||
"dash-uploader==0.6.0", | ||
"requests==2.26.0", | ||
"pyarrow==11.0.0", | ||
"diskcache==5.6.3", | ||
"dash_component_editor@git+https://github.com/mlexchange/mlex_dash_component_editor", | ||
"mlex_file_manager@git+https://github.com/mlexchange/mlex_file_manager", | ||
"Pillow", | ||
"pandas", | ||
"numpy", | ||
"python-dotenv", | ||
"prefect-client==2.14.21" | ||
] | ||
|
||
[project.optional-dependencies] | ||
# These are required for developing the package (running the tests, building | ||
# the documentation) but not necessarily required for _using_ it. | ||
dev = [ | ||
"dash[testing]", | ||
"flake8", | ||
"pre-commit", | ||
"pytest-mock", | ||
"tiled[all]", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/mlexchange/mlex_latent_explorer" | ||
Issues = "https://github.com/mlexchange/mlex_latent_explorer/issues/" | ||
|
||
[tool.isort] | ||
profile = "black" |
Empty file.
Empty file.
Empty file.
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,10 @@ | ||
from src.frontend import show_clustering_gui_layouts | ||
|
||
|
||
def test_clustering_layout(): | ||
layout = show_clustering_gui_layouts("KMeans") | ||
assert layout is not None | ||
layout = show_clustering_gui_layouts("DBSCAN") | ||
assert layout is not None | ||
layout = show_clustering_gui_layouts("HDBSCAN") | ||
assert layout is not None |