Skip to content

Commit

Permalink
package files and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelFay committed Oct 30, 2021
1 parent ae16d7d commit 4749c99
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 8 deletions.
17 changes: 17 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
MIT License
Copyright (c) 2018 YOUR NAME
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,8 @@ Embedding files:
- Integrate with local version control (git-lfs ?)

Frontend:
- Overall UX and design changes
- Overall UX and design changes
- Enable Image upload

Deployment:
- Dockerize and orchestrate containers (image uploader, storage, indexation pipeline, inference)
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
packages=find_packages(include=["image_searcher", "image_searcher.*"]),
install_requires=[
"torch",
"numpy",
"ftfy",
"transformers",
"Pillow",
Expand Down
File renamed without changes.
Binary file added tests/test_data/bird.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/test_data/car.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/test_data/car2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/test_data/elephant.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/test_data/friends.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/test_data/minesweeper.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/test_data/profile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/test_data/traffic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TestEmbedder(unittest.TestCase):
def setUp(self):
self.loader = ImageLoader(image_dir_path="/home/manu/Downloads", traverse=True)
self.loader = ImageLoader(image_dir_path="./tests/test_data", traverse=True)
self.embedder = ClipEmbedder()

def test_image_embedder(self):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

class TestLoader(unittest.TestCase):
def setUp(self):
self.loader = ImageLoader(image_dir_path="/home/manu/Downloads")
self.loader = ImageLoader(image_dir_path="./tests/test_data")

def test_loader(self):
images = self.loader.search_tree()
self.assertTrue(len(images)>10)
self.assertTrue(len(images) > 5)
self.assertIsInstance(images, list)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
class TestSearch(unittest.TestCase):
def setUp(self):
logging.basicConfig(filename=None, level=logging.INFO)
self.image_dir_path = "/home/manu/perso/ImageSearcher/data/"
# self.image_dir_path = "/home/manu/Downloads/"
self.image_dir_path = "./tests/test_data"
self.tearDown()

def tearDown(self) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
class TestSearch(unittest.TestCase):
def setUp(self):
logging.basicConfig(filename=None, level=logging.INFO)
self.image_dir_path = "/home/manu/perso/ImageSearcher/data/"
# self.image_dir_path = "/home/manu/Downloads/"
self.image_dir_path = "./tests/test_data"
self.tearDown()

def tearDown(self) -> None:
Expand Down

0 comments on commit 4749c99

Please sign in to comment.