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
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM python:3.11 AS base
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV PYTHONPATH=.
RUN mkdir /app
WORKDIR /app

RUN python3 -m venv $VIRTUAL_ENV

RUN apt-get update && \
apt-get install -y \
--no-install-recommends \
make python3-dev

RUN pip install poetry
COPY README.md pyproject.toml poetry.lock ./
RUN poetry run pip install setuptools wheel packaging
RUN poetry install --no-root --compile --no-dev

COPY auto_dev auto_dev
RUN poetry install --compile --no-dev

ENV PATH="$VIRTUAL_ENV/bin:$PATH"


RUN echo $VIRTUAL_ENV
RUN poetry env info
ENTRYPOINT ["poetry", "run"]
ENV PYTHONUNBUFFERED=TRUE

CMD ["--help"]

47 changes: 47 additions & 0 deletions Dockerfile.wip
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM pypy:3.10 AS base
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV PYTHONPATH=.
ENV PYTHONUNBUFFERED=TRUE
ENV PATH="/root/.cargo/bin:$PATH"

RUN mkdir /app
WORKDIR /app

RUN python3 -m venv $VIRTUAL_ENV

RUN apt-get update && \
apt-get install -y \
--no-install-recommends \
make python3-dev

RUN curl https://sh.rustup.rs -sSf | bash -s -- -y

RUN pip install poetry
COPY README.md pyproject.toml poetry.lock ./
RUN poetry run pip install -U setuptools wheel packaging pip


# We need to make sure we have all the necessary deps to build cffi
RUN apt-get install build-essential curl gcc libffi-dev libssl-dev -y

# Get Rust

RUN rustc --version
RUN cargo install --locked maturin

RUN poetry run pip install -U setuptools yarl
RUN poetry install --only-main

COPY auto_dev auto_dev
RUN poetry install

RUN poetry run python -m pip install maturin




ENTRYPOINT ["poetry", "run"]

CMD ["--help"]

8 changes: 6 additions & 2 deletions auto_dev/fmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from multiprocessing import Pool

import isort
import isort.files
import requests
from rich.progress import track

Expand Down Expand Up @@ -63,6 +65,10 @@ def run_format(path, verbose=False):
@staticmethod
def run_sort(path, verbose=False):
"""Run sort on the path."""

@staticmethod
def run_autoflake8(path, verbose=False):
"""Run autoflake8 on the path."""
command = CommandExecutor(
[
"poetry",
Expand All @@ -79,7 +85,6 @@ def run_sort(path, verbose=False):
)
return command.execute(verbose=verbose)


def single_thread_fmt(paths, verbose, logger, remote=False):
"""Run the formatting in a single thread."""
results = {}
Expand All @@ -96,7 +101,6 @@ def single_thread_fmt(paths, verbose, logger, remote=False):
results[package] = result
return results


def multi_thread_fmt(paths, verbose, num_processes, remote=False):
"""Run the formatting in multiple threads."""
formatter = Formatter(verbose, remote=remote)
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ classifiers = [
[[tool.poetry.packages]]
include = "auto_dev"

[[tool.poetry.packages]]
include = "tests"
format = "sdist"

[tool.black]
line-length = 120
skip-string-normalization = true
Expand All @@ -46,6 +42,7 @@ open-aea-ledger-cosmos = "==1.60.0"
open-aea-cli-ipfs = "==1.60.0"
web3 = ">=6.0.0,<7.0.0"
ipfshttpclient = "==0.8.0a2"
web3 = "<7,>=6.0.0"
typing_extensions = ">=3.10.0.2"
protobuf = ">=3.19.1,<4.25.0"
hypothesis = "==6.122.3"
Expand Down
Loading