Skip to main content

Managing subjects in a human research context.

Project description

huscy.subjects

PyPi Version PyPi Status PyPI Downloads PyPI License Python Versions Django Versions

Requirements

  • Python 3.6+
  • A supported version of Django

Tox tests on Django versions 3.2 and 4.0.

Installation

To install husy.subjects simply run:

pip install huscy.subjects

Add huscy.subjects and further required apps to INSTALLED_APPS in your settings.py:

INSTALLED_APPS = (
	...
	'django_countries',
	'guardian',
	'phonenumber_field',
	'rest_framework',

	'huscy.subjects',
)

Hook the urls from huscy.subjects into your urls.py:

urlpatterns = [
	...
	path('api/', include('huscy.subjects.urls')),
]

Create huscy.subjects database tables by running:

python manage.py migrate

Configuration

There are some settings to configure the service. These settings have be added to settings.py.

Name Default value Description
HUSCY_SUBJECTS_ADULT_AGE 18 Specifies the age of majority. Deprecated: Use HUSCY_SUBJECTS_AGE_OF_MAJORITY instead!
HUSCY_SUBJECTS_AGE_OF_MAJORITY 18 Specifies the age of majority.
HUSCY_SUBJECTS_SUBJECT_VIEWSET_MAX_RESULT_COUNT 500 Specifies the maximum number of subjects returned by the queryset in the SubjectViewSet.

Development

Install PostgreSQL and create a database user called huscy and a database called huscy.

sudo -u postgres createdb huscy
sudo -u postgres createuser -d huscy
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE huscy TO huscy;"
sudo -u postgres psql -c "ALTER USER huscy WITH PASSWORD '123';"

Check out the repository and start your virtual environment (if necessary).

Install dependencies:

make install

Create database tables:

make migrate

Run tests to see if everything works fine:

make test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

huscy.subjects-1.3.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

huscy.subjects-1.3.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file huscy.subjects-1.3.0.tar.gz.

File metadata

  • Download URL: huscy.subjects-1.3.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/26.0 requests/2.23.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.45.0 importlib-metadata/4.8.3 keyring/21.2.0 rfc3986/1.4.0 colorama/0.4.3 CPython/3.6.9

File hashes

Hashes for huscy.subjects-1.3.0.tar.gz
Algorithm Hash digest
SHA256 346359574808550f4ae4114c69b3ac59ad1c6ae62f1d5abe4700f78247c16d4d
MD5 84dae590e17c32af1eed478e9ee30ce7
BLAKE2b-256 d4e21f6d53235bbf146d4a940aa5d56015cc40c573ae2db47cecca2324857d3a

See more details on using hashes here.

File details

Details for the file huscy.subjects-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: huscy.subjects-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/26.0 requests/2.23.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.45.0 importlib-metadata/4.8.3 keyring/21.2.0 rfc3986/1.4.0 colorama/0.4.3 CPython/3.6.9

File hashes

Hashes for huscy.subjects-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aacf33c01186047f0255a3051c802e1ef8c305f2ce656e019e87c3c04263437a
MD5 da86762016a44412631de807d2b7fa9d
BLAKE2b-256 0e506106240182c055c13580622b5ee635cecd3b89ef8bb953e5ddacb8cb0fff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page