huscy.subjects
======
![PyPi Version](https://img.shields.io/pypi/v/huscy-subjects.svg)
![PyPi Status](https://img.shields.io/pypi/status/huscy-subjects)
![PyPI Downloads](https://img.shields.io/pypi/dm/huscy-subjects)
![PyPI License](https://img.shields.io/pypi/l/huscy-subjects?color=yellow)
![Python Versions](https://img.shields.io/pypi/pyversions/huscy-subjects.svg)
![Django Versions](https://img.shields.io/pypi/djversions/huscy-subjects)
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`:
```python
INSTALLED_APPS = (
...
'django_countries',
'guardian',
'phonenumber_field',
'rest_framework',
'huscy.subjects',
)
```
Hook the urls from `huscy.subjects` into your `urls.py`:
```python
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
Raw data
{
"_id": null,
"home_page": "https://bitbucket.org/huscy/subjects",
"name": "huscy.subjects",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Alexander Tyapkov, Mathias Goldau, Stefan Bunde",
"author_email": "tyapkov@gmail.com, goldau@cbs.mpg.de, stefanbunde+git@posteo.de",
"download_url": "https://files.pythonhosted.org/packages/36/8f/0effeded5eac948ab011c6e38bdae2cd6298667d74dab7d37f37a32074a4/huscy.subjects-2.1.2.tar.gz",
"platform": null,
"description": "huscy.subjects\n======\n\n![PyPi Version](https://img.shields.io/pypi/v/huscy-subjects.svg)\n![PyPi Status](https://img.shields.io/pypi/status/huscy-subjects)\n![PyPI Downloads](https://img.shields.io/pypi/dm/huscy-subjects)\n![PyPI License](https://img.shields.io/pypi/l/huscy-subjects?color=yellow)\n![Python Versions](https://img.shields.io/pypi/pyversions/huscy-subjects.svg)\n![Django Versions](https://img.shields.io/pypi/djversions/huscy-subjects)\n\n\n\nRequirements\n------\n\n- Python 3.8+\n- A supported version of Django\n\nTox tests on Django versions 3.2, 4.1 and 4.2.\n\n\n\nInstallation\n------\n\nTo install `husy.subjects` simply run:\n\n pip install huscy.subjects\n\nAdd `huscy.subjects` and further required apps to `INSTALLED_APPS` in your `settings.py`:\n\n```python\nINSTALLED_APPS = (\n\t...\n\t'django_countries',\n\t'guardian',\n\t'phonenumber_field',\n\t'rest_framework',\n\n\t'huscy.subjects',\n)\n```\n\nHook the urls from `huscy.subjects` into your `urls.py`:\n\n```python\nurlpatterns = [\n\t...\n\tpath('api/', include('huscy.subjects.urls')),\n]\n```\n\nCreate `huscy.subjects` database tables by running:\n\n python manage.py migrate\n\n\n\nConfiguration\n------\n\nThere are some settings to configure the service. These settings have be added to `settings.py`.\n\n\n| Name | Default value | Description |\n| -------- | -------- | -------- |\n| HUSCY_SUBJECTS_AGE_OF_MAJORITY | 18 | Specifies the age of majority. |\n| HUSCY_SUBJECTS_SUBJECT_VIEWSET_MAX_RESULT_COUNT | 500 | Specifies the maximum number of subjects returned by the queryset in the SubjectViewSet. |\n\n\n\nDevelopment\n------\n\nInstall PostgreSQL and create a database user called `huscy` and a database called `huscy`.\n\n sudo -u postgres createdb huscy\n sudo -u postgres createuser -d huscy\n sudo -u postgres psql -c \"GRANT ALL PRIVILEGES ON DATABASE huscy TO huscy;\"\n sudo -u postgres psql -c \"ALTER USER huscy WITH PASSWORD '123';\"\n\nCheck out the repository and start your virtual environment (if necessary).\n\nInstall dependencies:\n\n make install\n\nCreate database tables:\n\n make migrate\n\nRun tests to see if everything works fine:\n\n make test\n\n\n",
"bugtrack_url": null,
"license": "AGPLv3+",
"summary": "Managing subjects in a human research context.",
"version": "2.1.2",
"project_urls": {
"Homepage": "https://bitbucket.org/huscy/subjects"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a32931599c39319528d3ecf7ffc0e8e51fe5bae5709a1e3ff8981a9ea57da2d1",
"md5": "150cf95ba72927d6188f2486e8f9da93",
"sha256": "48757ae765e58273c38db84b6d64896d090a270e3a2e4f3577fd2205379bbec6"
},
"downloads": -1,
"filename": "huscy.subjects-2.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "150cf95ba72927d6188f2486e8f9da93",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 30415,
"upload_time": "2023-09-22T14:44:56",
"upload_time_iso_8601": "2023-09-22T14:44:56.995605Z",
"url": "https://files.pythonhosted.org/packages/a3/29/31599c39319528d3ecf7ffc0e8e51fe5bae5709a1e3ff8981a9ea57da2d1/huscy.subjects-2.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "368f0effeded5eac948ab011c6e38bdae2cd6298667d74dab7d37f37a32074a4",
"md5": "56be4eab22ea99e48e4c50710a3be56a",
"sha256": "aae4a15ba8c63f4f52e1d6c898ba543acca21d91948dde53d5e9025d1c92f80d"
},
"downloads": -1,
"filename": "huscy.subjects-2.1.2.tar.gz",
"has_sig": false,
"md5_digest": "56be4eab22ea99e48e4c50710a3be56a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12752,
"upload_time": "2023-09-22T14:44:58",
"upload_time_iso_8601": "2023-09-22T14:44:58.821425Z",
"url": "https://files.pythonhosted.org/packages/36/8f/0effeded5eac948ab011c6e38bdae2cd6298667d74dab7d37f37a32074a4/huscy.subjects-2.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-22 14:44:58",
"github": false,
"gitlab": false,
"bitbucket": true,
"codeberg": false,
"bitbucket_user": "huscy",
"bitbucket_project": "subjects",
"lcname": "huscy.subjects"
}