Skip to content

Commit

Permalink
replace requirements.txt with poetry, add justfiles for sub-projects
Browse files Browse the repository at this point in the history
  • Loading branch information
GyrosOfWar committed May 28, 2024
1 parent ec08cd6 commit 087f16a
Show file tree
Hide file tree
Showing 14 changed files with 595 additions and 223 deletions.
4 changes: 4 additions & 0 deletions backend/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set shell := ["nu", "-c"]

format:
mvn prettier:write
4 changes: 4 additions & 0 deletions frontend/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set shell := ["nu", "-c"]

format:
npm run format
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start": "remix-serve ./build/server/index.js",
"typecheck": "tsc",
"test": "vitest"
"test": "vitest",
"format": "prettier --write ."
},
"dependencies": {
"@remix-run/node": "^2.9.2",
Expand Down
5 changes: 0 additions & 5 deletions imagehive-ai/.dockerignore

This file was deleted.

162 changes: 2 additions & 160 deletions imagehive-ai/.gitignore
Original file line number Diff line number Diff line change
@@ -1,160 +1,2 @@
# Created by https://www.toptal.com/developers/gitignore/api/python,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=python,visualstudiocode

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

### VisualStudioCode ###
.vscode/*
#!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/python,visualstudiocode
__pycache__
*.pyc
32 changes: 7 additions & 25 deletions imagehive-ai/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
# Prerequisites

* Python 3.10.10
- Python 3.10.10
- Poetry

# Installation
# How to run

* Create a virtual environment

`python -m venv venv`

* Switch to the virtual environment

`./venv/Scripts/activate`

* Install the dependencies

`pip install -r requirements.txt`

# Run

* Switch to the virtual environment if you haven't done so already

`./venv/Scripts/activate`

* Run the app

`flask --app services run`

* The app should be reachable under http://localhost:5000
```
poetry install
poetry run flask --app imagehive_ai run
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

app = Flask(__name__)

import services.routes
import imagehive_ai.routes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from services import app
from imagehive_ai import app
from flask import jsonify, request
import ollama
from PIL import Image
Expand Down
4 changes: 4 additions & 0 deletions imagehive-ai/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set shell := ["nu", "-c"]

format:
poetry run black .
Loading

0 comments on commit 087f16a

Please sign in to comment.