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

Removed runtime.txt and fixed poetry.lock #5349

Open
wants to merge 2 commits into
base: master
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
28 changes: 12 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,26 @@ jobs:
run: cat Aptfile | sudo xargs apt-get install

- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.9.1"
python-version: "3.9.17"
cache: "poetry"

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

- name: Install dependencies
run: poetry install --no-interaction

- name: Lint
run: pylint ./**/*.py
run: poetry run pylint ./**/*.py

# You must also add the Configure sysctl limits step, otherwise Opensearch will not be able to boot.
- name: Configure sysctl limits
Expand All @@ -91,7 +87,7 @@ jobs:
export MEDIA_ROOT="$(mktemp -d)"
sudo mkdir /var/media
sudo chown -R $USER:$USER /var/media
tox
poetry run tox
env:
DEBUG: 'False'
NODE_ENV: 'production'
Expand Down
64 changes: 41 additions & 23 deletions poetry.lock

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

1 change: 1 addition & 0 deletions pylintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[MASTER]
ignore=migrations,.git
load-plugins = pylint_django
django-settings-module = micromasters.settings

[BASIC]
# Allow django's urlpatterns, and our log preference
Expand Down
48 changes: 35 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ django-hijack = "2.1.10"
django-hijack-admin = "2.1.10"
django-ipware = "3.0.0"
django-redis = "5.2.0"
django-robots = "4.0.0"
django-robots = "~4.0.0"
django-role-permissions = "2.2.0"
django-server-status = "0.7.3"
django-storages = "1.9.1"
Expand All @@ -32,8 +32,6 @@ edx-api-client = "1.2.0"
edx-opaque-keys = "0.4"
opensearch-py = "1.0.0"
opensearch-dsl = "1.0.0"

faker = "0.9.1"
html5lib = "0.999999999"
l18n = "2021.3"
ipython = "8.10.0"
Expand All @@ -42,19 +40,19 @@ jsonpatch = "1.16"
newrelic = "6.0.1.155"
open-discussions-client = "0.5.0"
phonenumbers = "8.10.23"
psycopg2 = "^2.9.5"
psycopg2 = "2.8.6"
pycountry = "16.11.27.1"
python-dateutil = "2.5.3"
sentry-sdk = "1.1.0"
redis = "3.5.3"
requests = "2.25.1"
requests = "^2.25.1"
setuptools = "67.6.1"
six = "1.14.0"
six = "^1.14.0"
social-auth-app-django = "3.1.0"
robohash = "1.0"
static3 = "0.5.1"
urllib3 = "1.26.5"
uwsgi = "2.0.18"
urllib3 = "^1.26.5"
uwsgi = "^2.0.18"
wagtail = "2.12.5"
flaky = "3.7.0"
pyOpenSSL = "^23.1.1"
Expand All @@ -66,19 +64,43 @@ astroid= "2.4.2"
bpython = "^0.24"
ddt = "^1.6.0"
django-debug-toolbar = "^3.2.4"
factory-boy = "^2.8.1"
faker = "0.9.1"
ipdb = "^0.13.13"
nplusone = "^0.8.1"
pdbpp = "^0.10.3"
pip-tools = "^7.1.0"
pylint = "^2.6.0"
pylint-django = "^2.4.4"
pylint-plugin-utils= "^0.6"
pylint = "2.6.0"
pylint-django = "2.1.0"
pylint-plugin-utils = "0.6"
pytest = "5.3.5"
pytest-cov = "^4.1.0"
pytest-django = "^3.8.0"
pytest-mock = "^3.11.1"
semantic-version = "^2.10.0"
selenium= "3.141.0"
selenium = "3.141.0"
testfixtures = "7.1.0"
tox = "3.28.0"
isort= "4.3.21"
isort = "4.3.21"

[tool.pytest.ini_options]
addopts = '''
--cov .
--cov-report term
--cov-report html
--cov-report xml
--ds=micromasters.settings
--reuse-db'''
norecursedirs = [
"node_modules",
".git",
".tox",
"static",
"templates",
".*",
"CVS",
"_darcs",
"{arch}",
"*.egg",
"selenium_tests",
]
3 changes: 0 additions & 3 deletions pytest.ini

This file was deleted.

3 changes: 0 additions & 3 deletions pytest_minimal.ini

This file was deleted.

1 change: 0 additions & 1 deletion runtime.txt

This file was deleted.

9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tox]
envlist = py39
skipsdist = True
isolated_build = true

[testenv]
sitepackages = True
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test_requirements.txt
allowlist_externals = poetry
commands_pre =
poetry install
commands =
py.test {posargs}
{toxinidir}/scripts/test/detect_missing_migrations.sh
Expand All @@ -31,3 +31,4 @@ setenv =
MAILGUN_URL=http://fake.mailgun.url
MAILGUN_KEY=fake_mailgun_key
OPEN_DISCUSSIONS_SITE_KEY=mm_test
DJANGO_SETTINGS_MODULE=micromasters.settings
Loading