diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..2b00bf5bb --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,31 @@ +version: 2.1 +orbs: + python: circleci/python@2.1.1 +jobs: + build-and-test: + docker: + - image: cimg/python:3.9 + - image: cimg/postgres:9.6 + steps: + - checkout + - python/install-packages: + pkg-manager: poetry + - run: + name: Run tests + command: poetry run ./manage.py test --failfast + build-and-lint: + docker: + - image: cimg/python:3.9 + steps: + - checkout + - python/install-packages: + pkg-manager: poetry + - run: + name: Run linters + command: poetry run pre-commit run --all-files + +workflows: + sample: + jobs: + - build-and-test + - build-and-lint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba44b505f..67b4d3c88 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: autoflake args: ['--in-place', '--recursive', '--remove-all-unused-imports', '--expand-star-imports', '--remove-duplicate-keys', '--ignore-init-module-imports', '--remove-unused-variables'] - repo: https://github.com/timothycrosley/isort - rev: 5.10.1 + rev: 5.12.0 hooks: - id: isort - repo: https://github.com/psf/black diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4692089f8..000000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Config file for automatic testing at travis-ci.org - -language: python -python: - - "3.9" - -cache: - pip: true - directories: - - $HOME/.cache/pre-commit - -services: - - postgresql - -addons: - postgresql: "9.6" - -before_install: - - curl -sSL https://install.python-poetry.org | python3 - - -install: - - poetry env info - - poetry install - -script: - - pre-commit run --all-files - - python manage.py compilemessages - - python manage.py test --failfast diff --git a/README.md b/README.md index d13b8ea35..9c8a8ab8a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,7 @@ # Lookit-api +[![CircleCI](https://dl.circleci.com/status-badge/img/gh/lookit/lookit-api/tree/develop.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/lookit/lookit-api/tree/develop) + For full documentation, see (source: ) This is the codebase for the Lookit project, an online developmental laboratory. It includes an Experimenter platform for designing and administering research studies, and a participant-facing platform where users can signup and take part in studies. It is built using Django, PostgreSQL, and Ember.js (see Ember portion of codebase, [ ember-lookit-frameplayer](https://github.com/lookit/ember-lookit-frameplayer)), and is developed by [MIT](https://mit.edu) and [Center for Open Science](https://cos.io/). - -`master` Build Status: [![Build Status](https://travis-ci.org/lookit/lookit-api.svg?branch=master)](https://travis-ci.org/lookit/lookit-api) - -`develop` Build Status: [![Build Status](https://travis-ci.org/lookit/lookit-api.svg?branch=develop)](https://travis-ci.org/lookit/lookit-api) - -[![Codetree](https://codetree.com/images/managed-with-codetree.svg)](https://codetree.com/projects/h9M5) diff --git a/studies/models.py b/studies/models.py index dd23d8bb6..c16e2f6ec 100644 --- a/studies/models.py +++ b/studies/models.py @@ -81,7 +81,7 @@ class Lab(models.Model): default=None, verbose_name="Custom URL Slug", help_text="A unique URL ending (slug) for the webpage that will show any discoverable, active studies for this lab. " - "For example, entering \"my-lab-name\" in this box will produce the custom URL \"https://lookit.mit.edu/studies/my-lab-name\" " + 'For example, entering "my-lab-name" in this box will produce the custom URL "https://lookit.mit.edu/studies/my-lab-name" ' "for this lab. Slugs should not contain spaces and can contain letters, numbers, underscores, and/or hyphens.", ) institution = models.CharField(max_length=255, blank=True)