Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CONTRIBUTING.rst #70

Merged
merged 2 commits into from
Mar 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ and additions you could make to the site itself, such as to this document,
which tells people nothing about how to contribute at the moment. Regardless of
how you choose contribute, as long as it is in good faith, I appreciate it.

Some ideas for contributions include:
- Adding a new app to the site
- Adding a new feature to an existing app
- Adding a new feature to the site
- Adding a new feature to the constitution


.. Adapted from https://cookiecutter-django.readthedocs.io/en/latest/developing-locally.html

Expand All @@ -40,17 +46,33 @@ Make sure to have the following on your host:

First things first.

#. Set a project slug!?::
mfosterw marked this conversation as resolved.
Show resolved Hide resolved

$ export project_slug=cookiestocracy

.. note::

``project_slug`` is the name of the project you want to create. It should be a valid Python package name?

#. Clone the repository::

$ git clone https://github.com/mfosterw/cookiestocracy.git
$ cd cookiestocracy

#. Create a virtualenv::

$ python3.12 -m venv <virtual env path>
or
$ conda create -n <virtual env name> python=3.12

#. Activate the virtualenv you have just created::

$ source <virtual env path>/bin/activate
or
$ conda activate <virtual env name>

#. Install development requirements::

$ cd <what you have entered as the project_slug at setup stage>
mfosterw marked this conversation as resolved.
Show resolved Hide resolved
$ pip install -r requirements/local.txt
$ git init # A git repo is required for pre-commit to install
$ pre-commit install
Expand All @@ -76,7 +98,13 @@ First things first.

#. Set the environment variables for your database(s)::

$ export DATABASE_URL=postgres://postgres:<password>@127.0.0.1:5432/<DB name given to createdb>
MACOS:
$ export DATABASE_URL=postgres://postgres:<password>@127.0.0.1:5432/<slug_name>
# Optional: set broker URL if using Celery
$ export CELERY_BROKER_URL=redis://localhost:6379/0

WINDOWS:
$ set DATABASE_URL=postgres://postgres:<password>@127.0.0.1:5432/<slug_name>
# Optional: set broker URL if using Celery
$ export CELERY_BROKER_URL=redis://localhost:6379/0

Expand Down
Loading