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.8+
  • A supported version of Django

Tox tests on Django versions 3.2, 4.1 and 4.2.

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_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-2.1.2.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

huscy.subjects-2.1.2-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: huscy.subjects-2.1.2.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for huscy.subjects-2.1.2.tar.gz
Algorithm Hash digest
SHA256 aae4a15ba8c63f4f52e1d6c898ba543acca21d91948dde53d5e9025d1c92f80d
MD5 56be4eab22ea99e48e4c50710a3be56a
BLAKE2b-256 368f0effeded5eac948ab011c6e38bdae2cd6298667d74dab7d37f37a32074a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for huscy.subjects-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 48757ae765e58273c38db84b6d64896d090a270e3a2e4f3577fd2205379bbec6
MD5 150cf95ba72927d6188f2486e8f9da93
BLAKE2b-256 a32931599c39319528d3ecf7ffc0e8e51fe5bae5709a1e3ff8981a9ea57da2d1

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