Package: django-academic-community
django-academic-communityis a representation of an academic community on the
web using Django.Some more documentation is in the “docs” directory, but we are working on
improving this.Quick start for developmentYou need at least python 3.7, postgres andpipinstalledClone this repository:git clone https://gitlab.hzdr.de/hcdc/django/django-academic-community.git
cd django-academic-communtyInstall the packages (in development mode):pip install .[dev]By default, we assume that there exists adjango_academic_communitydatabase that is writeable for a user namedjango_academic_userwith
passwordadmin. But you can change this with environment variables (seesettings.py).
Run:python manage.py migrateto setup the database.Install the packages for the JS and CSS files:npm installBuild the JS and CSS files:make css
make jsCreate a superuser via:python manage.py createsuperuserRun the local development server via:python manage.py runserverOpen the topic browser athttp://127.0.0.1:8000/topics, and the admin site
athttp://127.0.0.1:8000/adminBuilding the docsThere is some static files generated via sphinx, together with an API
documentation. The source code for this documentation is in thedocsfolder. If you installed this package with the abovepip installcommand,
you already have everything you need. The only thing that you should have
installed already isgraphviz(e.g. viaconda install graphviz).Navigate to thedocsfolder and runmake html(on linux) ormake.bat htmlon windows and open the file atdocs/_build/html/index.htmlin your browser.Some of the documentation in this content is also available through the admin
docs. When you run the server (python manage.py runserver), navigate to the
docs underhttp://127.0.0.1:8000/admin/docs.Note that there is still a lot to work on for the documentation, so in case you
are missing something, please do not hesitate to ask.Running the testsJust runtox(you installed it withpip install .[dev]).
Note that you will need a running postgres server and a user with the rights
to create a new postgres database.ContributingWe are working on a more detailed contributing guide, but here is the
short version:When you want to contribute to the code, please do clone the source code
repository and install it with the[dev]extra, i.e.gitclonehttps://gitlab.hzdr.de/hcdc/django/clm-community/django-academic-community/cddjango-academic-communitypipinstall-e.[dev]We use automated formatters (see their config inpyproject.tomlandsetup.cfg), namelyBlackfor standardized
code formattingblackdocfor
standardized code formatting in documentationFlake8for general code
qualityisortfor standardized order in
imports.mypyfor static type checking ontype
hintsWe highly recommend that you setuppre-commit
hooksto automatically run all the above
tools every time you make a git commit. This can be done by runningpre-commit installfrom the root of the repository. You can skip the pre-commit checks withgit commit--no-verifybut note that the CI will fail if it
encounters any formatting errors.You can also run the pre-commit step manually by invokingpre-commit run --all-filesCopyrightCopyright © 2021 Helmholtz-Zentrum Hereon, 2020-2021 Helmholtz-Zentrum GeesthachtLicensed under the EUPL-1.2-or-laterThis program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the EUPL-1.2 license for more details.You should have received a copy of the EUPL-1.2 license along with this
program. If not, seehttps://www.eupl.eu/.