Skip to content

Commit

Permalink
Merge pull request #67 from climatepolicyradar/fix/minify-main-requir…
Browse files Browse the repository at this point in the history
…ements

move unnecessary requirements for API to new dependency group; fix dockerfile
  • Loading branch information
kdutia authored May 2, 2024
2 parents 8bcaefb + 94b627a commit 0d0cd2d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN pip install --no-cache "poetry>=1.2.2,<1.3.0"
COPY poetry.lock pyproject.toml ./

# Install python dependencies
RUN poetry config virtualenvs.create false
RUN poetry install --with dev
RUN poetry export --with dev > requirements.txt
RUN pip install --no-cache -r requirements.txt

# Copy files to image
COPY data ./data
Expand Down
5 changes: 3 additions & 2 deletions poetry.lock

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

30 changes: 16 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,27 @@ authors = ["CPR-tech-team <[email protected]>"]
python = ">=3.9,<3.12"
uvicorn = {extras = ["standard"], version = "^0.20.0"}
fastapi = "^0.92.0"
python-dotenv = "^0.20.0"
opensearch-py = "^2.2.0"

[tool.poetry.dev-dependencies]
ruff = "^0.0.247"
black = "^22.1.0"
pyright = "^1.1.267"
pre-commit = "^2.17.0"
pytest = "^7.0.1"
pytest-dotenv = "^0.5.2"

[tool.poetry.group.dev.dependencies]
nbmake = "^1.4.1"
httpx = "^0.23.3"

[tool.poetry.group.other.dependencies]
cpr-data-access = {git = "https://github.com/climatepolicyradar/data-access.git", rev = "v0.2.9"}
openpyxl = "^3.1.1"
cloudpathlib = {version = "^0.13.0", extras = ["s3"]}
requests = "^2.28.2"
click = "^8.1.3"
opensearch-py = "^2.2.0"
openmock = "^2.2.0"
pycountry = "^22.3.5"
wbgapi = "^1.0.12"
Expand All @@ -30,19 +45,6 @@ rich = "^13.7.0"
awscli = "^1.29.28"
explorer = {git = "https://github.com/climatepolicyradar/explorer.git", rev = "96d2a244f4a0e3298a080f71edee6c4b96e5bd37"}

[tool.poetry.dev-dependencies]
ruff = "^0.0.247"
black = "^22.1.0"
pyright = "^1.1.267"
pre-commit = "^2.17.0"
python-dotenv = "^0.20.0"
pytest = "^7.0.1"
pytest-dotenv = "^0.5.2"

[tool.poetry.group.dev.dependencies]
nbmake = "^1.4.1"
httpx = "^0.23.3"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Expand Down

0 comments on commit 0d0cd2d

Please sign in to comment.