Merge pull request #50 from anthonywu/project-setup-recs
`pyproject.toml` to be authoritative source of deps, soft introduce `ruff` linter/formatter
This commit is contained in:
commit
3daf4bc7de
12
README.md
12
README.md
@ -40,12 +40,18 @@ This creates and activates a virtual environment in the `mflux` folder. After th
|
|||||||
```
|
```
|
||||||
2. Navigate to the project and set up a virtual environment:
|
2. Navigate to the project and set up a virtual environment:
|
||||||
```
|
```
|
||||||
cd mflux && python3 -m venv .venv && source .venv/bin/activate
|
cd mflux
|
||||||
|
python3 -m venv .venv # alternative: `uv venv`
|
||||||
|
source .venv/bin/activate
|
||||||
```
|
```
|
||||||
3. Install the required dependencies:
|
3. Install the required dependencies in [development mode](https://setuptools.pypa.io/en/latest/userguide/development_mode.html) as defined in `pyproject.toml`:
|
||||||
```
|
```
|
||||||
pip install -r requirements.txt
|
pip install -e .
|
||||||
```
|
```
|
||||||
|
4. Follow format and lint checks prior to submitting Pull Requests. Install the `ruff` tool as a common resource somewhere else in your system external to this project.
|
||||||
|
- [`uv tool install ruff`](https://github.com/astral-sh/uv) OR [`pipx install ruff`](https://github.com/pypa/pipx).
|
||||||
|
- [`ruff check` and `ruff check --fix`](https://github.com/astral-sh/ruff?tab=readme-ov-file#usage) any linter warnings generated from your PR diff.
|
||||||
|
- [`ruff format`](https://github.com/astral-sh/ruff?tab=readme-ov-file#usage) any added or modified files in your PR diff.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### Generating an image
|
### Generating an image
|
||||||
|
|||||||
@ -7,25 +7,32 @@ name = "mflux"
|
|||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
description = "A MLX port of FLUX based on the Huggingface Diffusers implementation."
|
description = "A MLX port of FLUX based on the Huggingface Diffusers implementation."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [
|
keywords = ["diffusers", "flux", "mlx"]
|
||||||
{ name = "Filip Strand", email = "strand.filip@gmail.com" }
|
authors = [{ name = "Filip Strand", email = "strand.filip@gmail.com" }]
|
||||||
]
|
maintainers = [{ name = "Filip Strand", email = "strand.filip@gmail.com" }]
|
||||||
classifiers = [
|
requires-python = ">=3.10"
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"Operating System :: MacOS",
|
|
||||||
]
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"huggingface-hub>=0.24.5",
|
||||||
"mlx>=0.16.0",
|
"mlx>=0.16.0",
|
||||||
"numpy>=2.0.0",
|
"numpy>=2.0.1",
|
||||||
|
"opencv-python>=4.10.0",
|
||||||
|
"piexif>=1.1.3",
|
||||||
"pillow>=10.4.0",
|
"pillow>=10.4.0",
|
||||||
"transformers>=4.44.0",
|
"safetensors>=0.4.4",
|
||||||
"sentencepiece>=0.2.0",
|
"sentencepiece>=0.2.0",
|
||||||
"torch>=2.3.1",
|
"torch>=2.3.1",
|
||||||
"tqdm>=4.66.5",
|
"tqdm>=4.66.5",
|
||||||
"huggingface-hub>=0.24.5",
|
"transformers>=4.44.0",
|
||||||
"safetensors>=0.4.4",
|
]
|
||||||
"piexif>=1.1.3",
|
classifiers = [
|
||||||
"opencv-python>=4.10.0",
|
"Framework :: MLX",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"Operating System :: MacOS",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Programming Language :: Python :: 3.12",
|
||||||
|
"Programming Language :: Python :: 3.13",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
|
|||||||
@ -1,11 +1,3 @@
|
|||||||
mlx>=0.16.0
|
# direct habitual `pip install -r requirements.txt`
|
||||||
numpy>=2.0.1
|
# users to `pyproject.toml` defined req list
|
||||||
pillow>=10.4.0
|
-e .
|
||||||
transformers>=4.44.0
|
|
||||||
sentencepiece>=0.2.0
|
|
||||||
torch>=2.3.1
|
|
||||||
tqdm>=4.66.5
|
|
||||||
huggingface-hub>=0.24.5
|
|
||||||
safetensors>=0.4.4
|
|
||||||
piexif>=1.1.3
|
|
||||||
opencv-python>=4.10.0
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user