Skip to content
Open
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
1 change: 1 addition & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export PYTHONWARNINGS="ignore"
export PYTHONPATH=.
export COVERAGE_WARNINGS="ignore"
22 changes: 22 additions & 0 deletions auto_dev/commands/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
from pathlib import Path
from dataclasses import dataclass

import pip
import pkg_resources
import toml
import yaml
import requests
Expand Down Expand Up @@ -231,6 +233,10 @@ def get_latest_version(self) -> str:
if self.location == DependencyLocation.LOCAL:
return self.version
return self._get_latest_remote_version()

def get_installed_version(self) -> str:
"""Use pip to get the installed version."""
return pkg_resources.get_distribution(self.name).version

def _get_latest_remote_version(self) -> str:
"""Get the latest remote version."""
Expand Down Expand Up @@ -578,6 +584,19 @@ def get_update_command(poetry_dependencies: Dependency, strict: bool = False) ->
cmd += f"{plugin}@{expected_version} "
return cmd, issues

def update_pyproject_with_current_versions(version_set_loader: VersionSetLoader) -> None:
"""
We collect the actual versions of everything installed
by iteracting over the version set loader
we then write this to the adev config file.
"""
for dependency in version_set_loader.poetry_dependencies.poetry_dependencies:

current_version = dependency.get_installed_version()
dependency.version = current_version
click.echo("Updating the adev config file with the current versions.")
version_set_loader.write_config()


@deps.command()
@click.option(
Expand Down Expand Up @@ -656,6 +675,9 @@ def bump(
os.system(cmd) # noqa
changes.append("poetry dependencies")


update_pyproject_with_current_versions(version_set_loader)

handle_output(issues, changes)


Expand Down
20 changes: 10 additions & 10 deletions poetry.lock

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

17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ exclude = "/(\n \\.eggs\n | \\.git\n | \\.hg\n | \\.mypy_cache\n | \\.tox

[tool.poetry.dependencies]
python = ">=3.9,<3.12"
open-autonomy = "==0.18.4"
open-aea = "==1.60.0"
open-aea-test-autonomy = "==0.18.4"
open-aea-ledger-ethereum = "==1.60.0"
open-aea-ledger-solana = "==1.60.0"
open-aea-ledger-cosmos = "==1.60.0"
open-aea-cli-ipfs = "==1.60.0"
open-autonomy = "<=0.18.4"
open-aea = "<=1.61.0"
open-aea-test-autonomy = "<=0.18.4"
open-aea-ledger-ethereum = "<=1.61.0"
open-aea-ledger-solana = "<=1.61.0"
open-aea-ledger-cosmos = "<=1.61.0"
open-aea-cli-ipfs = "<=1.61.0"
web3 = ">=6.0.0,<7.0.0"
ipfshttpclient = "==0.8.0a2"
typing_extensions = ">=3.10.0.2"
Expand Down Expand Up @@ -111,4 +111,5 @@ adev = "auto_dev.cli:cli"


[tool.pytest.ini_options]
addopts = "--cov=auto_dev --cov-report html"
addopts = "--cov=auto_dev --cov-report html"
filterwarnings = ["ignore:.*CoverageWarning.*:Warning"]
Loading