Skip to content

Commit

Permalink
ci: improve management of dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lyz-code committed Oct 15, 2021
1 parent c61a4ea commit 4d3cb41
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
@@ -1,6 +1,6 @@
{
"template": "git@github.com:lyz-code/cookiecutter-python-project.git",
"commit": "f38de85495097610a17385287260e26668d159cc",
"commit": "f2d6860498002278bdb94df7b16b0b6758219111",
"context": {
"cookiecutter": {
"project_name": "Autoimport",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Expand Up @@ -45,6 +45,7 @@ jobs:
python-version: 3.7
- name: Install dependencies
run: >-
pip install -r requirements.txt
pip install -r ./docs/requirements.txt
pip install -e .
- name: Build the Documentation
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Expand Up @@ -4,8 +4,8 @@ black = black --exclude assets --target-version py37 src docs/examples tests set

.PHONY: install
install:
python -m pip install -U setuptools pip
pip install -r requirements-dev.txt
python -m pip install -U setuptools pip pip-tools
python -m piptools sync requirements.txt requirements-dev.txt docs/requirements.txt
pip install -e .
pre-commit install

Expand All @@ -15,6 +15,9 @@ update:
@echo "- Updating dependencies -"
@echo "-------------------------"

# Sync your virtualenv with the expected state
python -m piptools sync requirements.txt requirements-dev.txt docs/requirements.txt

pip install -U pip

rm requirements.txt
Expand All @@ -29,7 +32,10 @@ update:
touch requirements-dev.txt
pip-compile -Ur --allow-unsafe requirements-dev.in --output-file requirements-dev.txt

pip install -r requirements-dev.txt
# Sync your virtualenv with the new state
python -m piptools sync requirements.txt requirements-dev.txt docs/requirements.txt

pip install -e .

@echo ""

Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.in
@@ -1,4 +1,4 @@
-r requirements.txt
-c requirements.txt

mkdocs
mkdocs-git-revision-date-localized-plugin
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.in
@@ -1,5 +1,5 @@
-r requirements.txt
-r docs/requirements.in
-c requirements.txt
-c docs/requirements.in

# Testing
pytest
Expand Down

0 comments on commit 4d3cb41

Please sign in to comment.