Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove package version wildcard ranges #97

Merged
merged 10 commits into from
Jun 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,36 @@ To deactivate the environment:
(fact) $ exit
```

To upgrade all dependencies to their latest versions:
### Update Dependencies

To upgrade all dependencies in `poetry.lock` to their latest semantic version compatible releases:

```bash
$ poetry update
```

(Applications only) To upgrade all dependencies, other than those pinned to exact versions, in
both `pyproject.toml` and `poetry.lock` to their latest versions (regardless of semantic version)
using [`poetryup`](https://github.com/MousaZeidBaker/poetryup):

```bash
(fact) $ nox -s update_latest
```

This is useful for _applications_ as an alternative to using wildcard versions (`"*"`) for allowing
the developer to avoid manually checking for new major release versions for all top level
dependencies. Putting tight version constraints in `pyproject.toml` can greatly reduce the time
for Poetry to resolve lockfile changes during updates. _Libraries_ should generally avoid pinning
to the latest versions in `project.toml` to allow users of their library the greatest flexibility
in selecting the final dependencies for their applications.

To upgrade only dev dependencies to their latest versions (which is a more appropriate operation
for libraries):

```bash
(fact) $ nox -s update_latest -- --group dev
```

## Packaging

This project is designed as a Python package, meaning that it can be bundled up and redistributed
Expand Down
5 changes: 5 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
nox.options.sessions = ["fmt_check", "lint", "type_check", "test", "docs"]


@session(venv_backend="none")
def update_latest(s: Session) -> None:
s.run("poetryup", "--latest", "--skip-exact", *s.posargs)


@session(python=["3.8", "3.9", "3.10"])
def test(s: Session) -> None:
s.install(".", "pytest", "pytest-cov")
Expand Down
Loading