Skip to content

Commit 19be438

Browse files
committed
Removed runtime.txt and fixed poetry.lock
1 parent 6bdac3d commit 19be438

File tree

8 files changed

+93
-63
lines changed

8 files changed

+93
-63
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,30 +48,26 @@ jobs:
4848
run: cat Aptfile | sudo xargs apt-get install
4949

5050
- name: Install poetry
51-
uses: snok/install-poetry@v1
52-
with:
53-
version: 1.5.1
54-
virtualenvs-create: true
55-
virtualenvs-in-project: true
51+
uses: snok/install-poetry@v1
52+
with:
53+
version: 1.5.1
54+
virtualenvs-create: true
55+
virtualenvs-in-project: true
5656

5757
- name: Set up Python
58-
uses: actions/setup-python@v2
58+
uses: actions/setup-python@v4
5959
with:
60-
python-version: "3.9.1"
60+
python-version: "3.9.17"
61+
cache: "poetry"
6162

62-
- id: cache
63-
uses: actions/cache@v1
64-
with:
65-
path: ~/.cache/pip
66-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/test_reqirements.txt') }}
67-
restore-keys: |
68-
${{ runner.os }}-pip-
63+
- name: Poetry lock check
64+
run: poetry lock --check
6965

7066
- name: Install dependencies
7167
run: poetry install --no-interaction
7268

7369
- name: Lint
74-
run: pylint ./**/*.py
70+
run: poetry run pylint ./**/*.py
7571

7672
# You must also add the Configure sysctl limits step, otherwise Opensearch will not be able to boot.
7773
- name: Configure sysctl limits
@@ -91,7 +87,7 @@ jobs:
9187
export MEDIA_ROOT="$(mktemp -d)"
9288
sudo mkdir /var/media
9389
sudo chown -R $USER:$USER /var/media
94-
tox
90+
poetry run tox
9591
env:
9692
DEBUG: 'False'
9793
NODE_ENV: 'production'

poetry.lock

Lines changed: 41 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[MASTER]
22
ignore=migrations,.git
33
load-plugins = pylint_django
4+
django-settings-module = micromasters.settings
45

56
[BASIC]
67
# Allow django's urlpatterns, and our log preference

pyproject.toml

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ django-hijack = "2.1.10"
2222
django-hijack-admin = "2.1.10"
2323
django-ipware = "3.0.0"
2424
django-redis = "5.2.0"
25-
django-robots = "4.0.0"
25+
django-robots = "~4.0.0"
2626
django-role-permissions = "2.2.0"
2727
django-server-status = "0.7.3"
2828
django-storages = "1.9.1"
@@ -32,8 +32,6 @@ edx-api-client = "1.2.0"
3232
edx-opaque-keys = "0.4"
3333
opensearch-py = "1.0.0"
3434
opensearch-dsl = "1.0.0"
35-
36-
faker = "0.9.1"
3735
html5lib = "0.999999999"
3836
l18n = "2021.3"
3937
ipython = "8.10.0"
@@ -42,19 +40,19 @@ jsonpatch = "1.16"
4240
newrelic = "6.0.1.155"
4341
open-discussions-client = "0.5.0"
4442
phonenumbers = "8.10.23"
45-
psycopg2 = "^2.9.5"
43+
psycopg2 = "2.8.6"
4644
pycountry = "16.11.27.1"
4745
python-dateutil = "2.5.3"
4846
sentry-sdk = "1.1.0"
4947
redis = "3.5.3"
50-
requests = "2.25.1"
48+
requests = "^2.25.1"
5149
setuptools = "67.6.1"
52-
six = "1.14.0"
50+
six = "^1.14.0"
5351
social-auth-app-django = "3.1.0"
5452
robohash = "1.0"
5553
static3 = "0.5.1"
56-
urllib3 = "1.26.5"
57-
uwsgi = "2.0.18"
54+
urllib3 = "^1.26.5"
55+
uwsgi = "^2.0.18"
5856
wagtail = "2.12.5"
5957
flaky = "3.7.0"
6058
pyOpenSSL = "^23.1.1"
@@ -66,19 +64,43 @@ astroid= "2.4.2"
6664
bpython = "^0.24"
6765
ddt = "^1.6.0"
6866
django-debug-toolbar = "^3.2.4"
67+
factory-boy = "^2.8.1"
68+
faker = "0.9.1"
6969
ipdb = "^0.13.13"
7070
nplusone = "^0.8.1"
7171
pdbpp = "^0.10.3"
7272
pip-tools = "^7.1.0"
73-
pylint = "^2.6.0"
74-
pylint-django = "^2.4.4"
75-
pylint-plugin-utils= "^0.6"
73+
pylint = "2.6.0"
74+
pylint-django = "2.1.0"
75+
pylint-plugin-utils = "0.6"
7676
pytest = "5.3.5"
7777
pytest-cov = "^4.1.0"
7878
pytest-django = "^3.8.0"
7979
pytest-mock = "^3.11.1"
8080
semantic-version = "^2.10.0"
81-
selenium= "3.141.0"
81+
selenium = "3.141.0"
8282
testfixtures = "7.1.0"
8383
tox = "3.28.0"
84-
isort= "4.3.21"
84+
isort = "4.3.21"
85+
86+
[tool.pytest.ini_options]
87+
addopts = '''
88+
--cov .
89+
--cov-report term
90+
--cov-report html
91+
--cov-report xml
92+
--ds=micromasters.settings
93+
--reuse-db'''
94+
norecursedirs = [
95+
"node_modules",
96+
".git",
97+
".tox",
98+
"static",
99+
"templates",
100+
".*",
101+
"CVS",
102+
"_darcs",
103+
"{arch}",
104+
"*.egg",
105+
"selenium_tests",
106+
]

pytest.ini

Lines changed: 0 additions & 3 deletions
This file was deleted.

pytest_minimal.ini

Lines changed: 0 additions & 3 deletions
This file was deleted.

runtime.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[tox]
22
envlist = py39
33
skipsdist = True
4+
isolated_build = true
45

56
[testenv]
6-
sitepackages = True
7-
deps =
8-
-r{toxinidir}/requirements.txt
9-
-r{toxinidir}/test_requirements.txt
7+
allowlist_externals = poetry
8+
commands_pre =
9+
poetry install
1010
commands =
1111
py.test {posargs}
1212
{toxinidir}/scripts/test/detect_missing_migrations.sh

0 commit comments

Comments
 (0)