-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Devlopment setup docs * Instructions for setting up junction using Docker post junction upgrade. (#761) * Added instructions in the ReadMe file for setting up junction using Docker post junction upgrade. * Updated the psycopg version to resolve - SCRAM authentication requires libpq version 10 issue. --------- Co-authored-by: Rajat Rajdeep <rajat.rajdeep@avasant.com> --------- Co-authored-by: Ananya Maiti <Ananya_Maiti@epam.com> Co-authored-by: Rajat Rajdeep <46029666+RajatRajdeep@users.noreply.github.com> Co-authored-by: Rajat Rajdeep <rajat.rajdeep@avasant.com>
- Loading branch information
1 parent
abcff23
commit e08f527
Showing
7 changed files
with
182 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ development, testing, and documentation. | |
:maxdepth: 2 | ||
|
||
getting-started | ||
|
||
nox-setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
========================== | ||
Development Setup with nox | ||
========================== | ||
|
||
**Note**: `nox`_ is the older way of setting up development environment. This section is stale. | ||
If you find *nox* helpful consider updating this section | ||
|
||
|
||
Initial Setup | ||
============= | ||
|
||
Junction's development workflow is automated using `nox`_. Thus, you need | ||
the ``nox`` command to be installed on your system. We recommend using ``pipx`` | ||
to install ``nox`` in its own isolated environment. | ||
|
||
.. code-block:: console | ||
$ python -m pip install pipx | ||
$ pipx install nox | ||
You will need to have a working Redis server on your system. You may | ||
additionally want to install Postgres, although it is optional. | ||
|
||
.. note:: | ||
|
||
On Debian based systems, these can be installed using: | ||
|
||
.. code-block:: console | ||
$ sudo apt install redis-server postgres | ||
Backend | ||
------- | ||
|
||
Create a "settings" file for local development with Django. | ||
|
||
.. code-block:: console | ||
$ cp settings/dev.py.sample settings/dev.py | ||
Create the database structure and populate it with sample data. | ||
|
||
.. code-block:: console | ||
$ nox -- migrate --noinput | ||
$ nox -- sample_data | ||
Admin Access | ||
^^^^^^^^^^^^ | ||
|
||
When sample data is generated with ``nox -- sample_data``, a superuser is | ||
created with the username ``admin`` and password ``123123``. | ||
|
||
|
||
Frontend | ||
-------- | ||
|
||
Working on Junction's frontend requires `NodeJS`_ and `yarn`_ to be installed on your | ||
system. The frontend is built using `grunt`_. To setup the working | ||
environment, run the following: | ||
|
||
.. code-block:: console | ||
$ cd junction/static | ||
$ yarn install | ||
Development workflow | ||
==================== | ||
|
||
Frontend Autobuilding | ||
--------------------- | ||
|
||
Junction has a Grunt configuration that is useful when working on the frontend. | ||
The following command starts a build watcher which rebuilds the frontend on | ||
every file change. | ||
|
||
.. code-block:: console | ||
$ grunt | ||
For ease of development ``app.css`` is checked in to the source code. It is not | ||
recommended to directly make changes to ``app.css``, rather update the less files | ||
and run ``grunt``, then commit ``app.css`` | ||
|
||
Invoking ``manage.py`` | ||
---------------------- | ||
|
||
Junction's ``nox`` configuration is set up to invoke manage.py when no other | ||
session (i.e. ``-s ...``) is specified. This also automatically sets up an | ||
isolated environment that contains the dependencies of Junction. | ||
|
||
.. code-block:: console | ||
$ nox # equivalent to 'python manage.py' | ||
$ nox -- runserver # equivalent to 'python manage.py runserver' | ||
$ nox -- migrate # equivalent to 'python manage.py migrate' | ||
Running tests | ||
------------- | ||
|
||
For running the tests, run: | ||
|
||
.. code-block:: console | ||
$ nox -s test | ||
Running linters | ||
--------------- | ||
|
||
For running the linters, run: | ||
|
||
.. code-block:: console | ||
$ nox -s lint | ||
Building documentation | ||
---------------------- | ||
|
||
For building the documentation, run: | ||
|
||
.. code-block:: console | ||
$ nox -s docs | ||
.. _`open an issue`: https://github.com/pythonindia/junction/issues | ||
.. _`virtualenv`: https://virtualenv.pypa.io/en/stable/ | ||
.. _`nox`: https://nox.readthedocs.io/en/stable/ | ||
.. _`NodeJS`: https://nodejs.org/ | ||
.. _`yarn`: https://yarnpkg.com/ | ||
.. _`grunt`: https://gruntjs.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
sphinx==2.4.4 | ||
sphinx==7.0.1 | ||
recommonmark==0.6.0 |