Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jonavellecuerdo committed Mar 7, 2024
1 parent 9834d0e commit 817e565
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@

Solenoid is a web application for sending email requests for publications to students and faculty. The application supports the work of MIT Libraries' Scholarly Communications and Collections Strategy (SCCS) department in the implementation of the university's open access (OA) policies. Given an author's ID on [MIT's instance of Symplectic Elements](https://pubdata.mit.edu/), Solenoid retrieves citations for publications that either (a) have not been deposited (to DSpace) or (b) have not been requested. Users can build emails using Solenoid, which provides a standard template for publication requests that can be revised through the application. Users have the option of either (a) sending the email to the Liaison or (b) copying the contents of the generated email and sending the email to the author directly.

The Solenoid workflow is as follows:

1. Import citations from Elements (using the author's Elements ID)
2. Review

Instructions for setting the system up for local development are in `docs/README.md`. The `system_architecture.xml` file is designed to be read by draw.io.

There is a full maintenance plan on file with the PMO; `docs/maintenance.md` records developer-specific maintenance requirements in more detail.
**Note:** Instructions for setting the system up for local development are in `docs/README.md`. The `system_architecture.xml` file is designed to be read by draw.io. There is a full maintenance plan on file with the PMO; `docs/maintenance.md` records developer-specific maintenance requirements in more detail. Some of this information may be outdated.

## Development

Expand Down Expand Up @@ -43,7 +36,7 @@ The following sections provide a high-level overview for accessing Solenoid on a

1. Create a `.env` file at the root directory of the Solenoid repo, and set the environment variables recommended for local development and testing.

2. If running the app locally for the first time, [create a superuser account](https://docs.djangoproject.com/en/5.0/topics/auth/default/#creating-superusers). This will be the username and password required to sign in to the locally hosted instance of Solenoid and needs to be entered if `DJANGO_LOGIN_REQUIRED=True.
2. If running the app locally for the first time, [create a user account](https://docs.djangoproject.com/en/5.0/topics/auth/default/#user-objects). For testing, it is recommended to create a 'superuser' account. This will be the username and password required to sign in to the locally hosted instance of Solenoid and needs to be entered if `DJANGO_LOGIN_REQUIRED=True.
* If migration-related errors come up, run `python manage.py migrate`

3. Run the app: `pipenv run solenoid`.
Expand All @@ -54,15 +47,17 @@ The following sections provide a high-level overview for accessing Solenoid on a

When running Solenoid on Heroku, only review and perform tests in **review apps**, applications that are automatically created when PRs are created in this repo, or in **`staging` apps (i.e., `mitlibraries-solenoid-staging`)**, applications that are automatically created when PRs are merged to `main` in this repo.

1. [OPTIONAL] If you are running a **review app**, you will need to create user accounts for the application.
1. [OPTIONAL] Prior to launching a **review app**, you will need to create a user account for the application.
* Run this command in your terminal to create a 'superuser' account:
```
heroku run --app=<heroku-app-name> python manage.py createsuperuser --username=<username> --email=<email>
```
2. Navigate to the `mitlibraries-solenoid` app on [Heroku Dashboard](https://dashboard.heroku.com/apps).
3. From the 'Pipeline' page, select the app linked to the Github PR under the 'Review Apps' column.
4. From the app's page, select `Settings`.
5. Scroll down to 'Config Vars' and select `Reveal Config Vars`. Set the environment variables recommended for review and testing.
6. From the app's page, select `Open app`, which will launch Solenoid in a new tab.
####

## Environment variables
Environment variables are configured in Django settings files in `solenoid.settings`. For Solenoid, there are two settings files:
Expand Down Expand Up @@ -94,7 +89,7 @@ SOLENOID_ADMIN=
# Password associated with the SMTP host and port specified in the EMAIL_HOST and EMAIL_PORT Django settings (i.e., for '[email protected]'). Default is None, which will write the emails that would be sent to standard output. For 'dev' and testing, only set the password if DJANGO_EMAIL_TESTING_MODE is True, which will send emails to the address indicated in the SOLENOID_ADMIN env var. For 'production', the password must be set.
DJANGO_SMTP_PASSWORD=

# Database connection string. In 'dev', the default is "sqlite:///db.sqlite3"; for Heroku deployments, this variable is set to a PostgreSQL connection string (configured by Heroku when the app was created).
# Database connection string. In 'dev', the default is "sqlite:///db.sqlite3"; for Heroku deployments, this variable is set to a PostgreSQL connection string (configured by Heroku when the app is created).
DATABASE_URL=

# Heroku application name and indicates the host/domain name that the Django site can serve (i.e., used in the ALLOWED_HOSTS Django setting). In 'dev', this variable does not need to be set and defaults to an empty string; for Heroku deployments, this variable does not need to be explicitly set and defaults to 'mitlibraries-solenoid'.
Expand Down

0 comments on commit 817e565

Please sign in to comment.