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

Update requirements #39

Merged
merged 2 commits into from
Nov 3, 2020
Merged
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
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
command: |
python3 -m venv venv
source ./venv/bin/activate
pip install -U pip
pip install -r ./requirements.txt
- save_cache:
key: python-deps-v1-{{ checksum "./requirements.txt" }}
Expand All @@ -50,6 +51,7 @@ jobs:
python3 -m venv ~/project/build/.env
source ~/project/build/.env/bin/activate
cd ~/project/build/awesome
pip install -U pip
pip install fabric invoke pip-tools
fab pip.compile
fab pip.sync
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
Create python virtual environment. We recommend to use [pyenv](https://github.com/pyenv/pyenv) & [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv):

```bash
pyenv install 3.8.5
pyenv virtualenv 3.8.5 my_project
pyenv install 3.8.6
pyenv virtualenv 3.8.6 my_project
pyenv activate my_project
```

Expand Down
7 changes: 3 additions & 4 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class GenerateRequirementsInFileHook(AbstractHook):

def __init__(self):
self._project_requirements_with_versions_need_to_be_pinned = (
"Celery",
"Django",
"django-environ",
"django-filter",
"djangorestframework",
Expand All @@ -28,7 +30,7 @@ def __init__(self):
"redis",
"sentry-sdk",
)
self._project_requirements_with_versions_do_not_need_to_be_pinned = ("Celery==4.4.6", "Django==3.0.9", "pytz")
self._project_requirements_with_versions_do_not_need_to_be_pinned = ("pytz", )
self._dev_requirements_with_versions_need_to_be_pinned = (
"Pygments",
"Werkzeug",
Expand All @@ -49,11 +51,8 @@ def __init__(self):
"pylint",
"pylint-celery",
"pylint-django",
"pytest-bandit",
"pytest-black",
"pytest-cov",
"pytest-django",
"pytest-isort",
"pytest-mock",
"pytest",
"radon",
Expand Down
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[pytest]
testpaths = tests
python_files = tests.py test_*.py *_test
bandit_skip_tests = B101
18 changes: 9 additions & 9 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cookiecutter==1.6.0
coverage==5.0
docker-compose==1.25.0
invoke==1.3.0
packaging==19.2
pip-tools==4.3.0
pytest==5.3.2
pytest-cov==2.8.1
pytest-mock==1.13.0
cookiecutter==1.7.2
coverage==5.3
docker-compose==1.27.4
invoke==1.4.1
packaging==20.4
pip-tools==5.3.1
pytest==6.1.1
pytest-cov==2.10.1
pytest-mock==3.3.1
498 changes: 258 additions & 240 deletions requirements.txt

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions tests/test_generate_requirements_in_file_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def test_get_project_packages(mocker):
packages = hook._get_project_packages()

assert packages == [
"Celery==4.4.6",
"Django==3.0.9",
"Celery==<mocked>",
"Django==<mocked>",
"django-environ==<mocked>",
"django-filter==<mocked>",
"djangorestframework==<mocked>",
Expand Down Expand Up @@ -51,11 +51,8 @@ def test_get_dev_packages(mocker):
"pylint-celery==<mocked>",
"pylint-django==<mocked>",
"pylint==<mocked>",
"pytest-bandit==<mocked>",
"pytest-black==<mocked>",
"pytest-cov==<mocked>",
"pytest-django==<mocked>",
"pytest-isort==<mocked>",
"pytest-mock==<mocked>",
"pytest==<mocked>",
"radon==<mocked>",
Expand Down
2 changes: 0 additions & 2 deletions {{ cookiecutter.project_slug }}/api/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[pytest]
DJANGO_SETTINGS_MODULE = {{ cookiecutter.project_slug }}.settings
python_files = tests.py test_*.py *_test
bandit_skip_tests = B101
junit_family = xunit2