Skip to content

Commit

Permalink
Udate to using poetry version >=2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdvllrs committed Jan 23, 2025
1 parent e65a676 commit 67232db
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 48 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The project requires Python 3.11. Make sure that you have a compatible version.
Using [Pyenv](https://github.com/pyenv/pyenv) is an easy way to get the right
python version.

We use [poetry](https://python-poetry.org/) as our package manager,
We use [poetry](https://python-poetry.org/) (version >= 2) as our package manager,
so make sure it is installed and you have run `poetry install` in your directory.

When you add features or change APIs, update `CHANGELOG.md` to track new changes.
Expand All @@ -25,7 +25,7 @@ This project is fully typed, so any contribution should provide typing annotatio

To run the tools locally, make sure that you have installed dependencies with dev group:
```sh
poetry install --sync
poetry sync --with dev
```

Then you can run:
Expand Down
8 changes: 3 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ shimmer@git+https://github.com/ruflab/shimmer.git@main
Or in your `pyproject.toml` following your package manager instructions.
This project uses [poetry](https://python-poetry.org/).

Using poetry, you can add:
```toml
shimmer = {git = "git@github.com:ruflab/shimmer.git", rev = "main"}
Using poetry, you can do:
```
poetry add [email protected]:ruflab/shimmer.git
```

in the `tool.poetry.dependencies` section.

# For contributing
If you want to contribute for bug correction or new features, follow instructions in [CONTRIBUTING.md](../CONTRIBUTING.md).
Expand Down
22 changes: 11 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 36 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,48 @@
[tool.poetry]
[project]
name = "shimmer"
version = "0.6.0.dev"
description = "A light GLoW"
authors = ["bdvllrs <[email protected]>"]
license = "MIT"
license = { file = "LICENSE" }
readme = "README.md"
authors = [
{ name = "Benjamin Devillers", email="[email protected]" },
]
maintainers = [
{ name = "Benjamin Devillers", email="[email protected]" },
]
requires-python = ">=3.11"
dependencies = [
"numpy (>=1.26.0,<2.0.0)",
"pandas (>=2.2.2,<3.0.0)",
"matplotlib (>=3.9.1,<4.0.0)",
"migrate-ckpt @ git+https://github.com/bdvllrs/[email protected]",
"click (>=8.1.7,<9.0.0)",
"lightning (>=2.1.0,<3.0.0)",
"torch (>=2.0.1,<3.0.0)",
]


[project.scripts]
shimmer = "shimmer.cli:cli"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


[tool.poetry.dependencies]
python = "~3.11"
numpy = "^1.26"
pandas = "^2.2.2"
matplotlib = "^3.9.1"
migrate-ckpt = {git = "https://github.com/bdvllrs/migrate-ckpt.git", rev = "v0.2.0"}
click = "^8.1.7"
lightning = ">=2.1.0"
torch = "^2.0.1"

[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
mypy = "^1.12.1"
ruff = "^0.7.0"
pre-commit = "^4.0.1"
pdoc = "^15.0.0"
types-tqdm = "^4.65.0.1"
lxml-stubs = "^0.5.1"
pandas-stubs = "^2.2.3.241009"
Expand All @@ -26,31 +52,11 @@ types-setuptools = "^75.2.0.20241019"
types-tabulate = "^0.9.0.2"
types-dataclasses = "^0.6.6"
types-pyyaml = "^6.0.12.20240808"
mypy = "^1.12.1"
ruff = "^0.7.0"
pre-commit = "^4.0.1"
types-protobuf = "^5.28.0.20240924"
types-redis = "^4.6.0.20241004"
types-python-dateutil = "^2.9.0.20241206"
types-six = "^1.17.0.20241205"

[tool.poetry.group.test.dependencies]
pytest = "^8.2.2"


[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
pdoc = "^15.0.0"

[tool.poetry.scripts]
shimmer = "shimmer.cli:cli"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


[tool.mypy]
Expand Down

0 comments on commit 67232db

Please sign in to comment.