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

chore(deps): Update dependencies #230

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
30 changes: 18 additions & 12 deletions .circleci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,49 @@ version: 2.1
jobs:
check_python_format:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "ci-requirements.txt" }}
- run:
name: "Check format of .py with ufmt"
command: |
pip install black==22.12.0
pip install usort==1.0.5
pip install ufmt==2.0.1
python3 -m venv venv
source venv/bin/activate
pip install -r ci-requirements.txt
ufmt check .
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "ci-requirements.txt" }}
check_type_annotation:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}
- v1-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "ci-requirements.txt" }}
- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pip install -r dev-requirements.txt
source venv/bin/activate
pip install -r requirements.txt -r dev-requirements.txt
- run:
name: "mypy"
command: |
. venv/bin/activate
source venv/bin/activate
mkdir .mypy_cache
mypy --install-types --non-interactive ./ --cache-dir=.mypy_cache/
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}
key: v1-dependencies-{{ checksum "requirements.txt" }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "ci-requirements.txt" }}

workflows:
frontend:
jobs:
- check_python_format
- check_python_format
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily" # Update pip dependencies daily
3 changes: 3 additions & 0 deletions ci-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
black==24.4.2
usort==1.0.8.post1
ufmt==2.5.1
7 changes: 3 additions & 4 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
black==22.12.0
usort==1.0.5
ufmt==2.0.1
mypy==1.3.0
-r ci-requirements.txt
mypy==1.10.0
setuptools==69.5.1
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# This software may be used and distributed according to the terms of the Llama 2 Community License Agreement.

from pkg_resources import parse_requirements
from setuptools import find_packages, setup


def get_requirements(path: str):
return [l.strip() for l in open(path)]
with open(path) as requirements:
return [r.project_name for r in parse_requirements(requirements)]


setup(
Expand Down