uchicago-capp-30320 / new-arrivals-chi

GNU Affero General Public License v3.0
9 stars 0 forks source link

New Arrivals Chi

New Arrivals Chi is a resource guide developed by six graduate students from the University of Chicago to help newly arrived individuals navigate the City of Chicago and its available resources. New Migrants often find themselves struggling with the complexities of accessing essential resources, from navigating systems to staying updated on what's available. Our goal is to provide accurate, up-to-date, and actionable information to address common challenges faced by newcomers.

The public facing site includes a guide for getting started in Chicago, legal support and health information. It also includes a two tiered login structure that allows organization to login and update their information, and site administrators to login and manage all organizations.

This project is student run in collaboration with various Community Based Organizations. It is a work in progress, and we look forward to expanding it to include additional services in the near future!

Table of Contents

  1. Running the Application
    1. Project Structure
    2. Installing
    3. Running the Project
    4. Running the Tests
    5. Running the Data Migration
    6. Updating and Compiling Translations
  2. Using the Application
  3. Design and Values
  4. Next Steps
  5. Authors
  6. License
  7. Acknowledgments
  8. Get in Touch

Running the Application

Follow these instructions to get the project running on your computer for development and testing.

Project Structure

Installing

Poetry:

  1. Install Poetry:

    curl -sSL https://install.python-poetry.org | python3 -
  2. Navigate to your the project directory and use Poetry to install project dependencies:

    poetry install

Running the Project

  1. Navigate to your the project directory and use Poetry to update project dependencies:

    poetry update
  2. Activate the Poetry virutal environment:

    poetry shell
  3. Run application:

    python new_arrivals_chi/app/main.py

Running the Tests

Creating a database migration

  1. Activate the Poetry virutal environment:

    poetry shell
  2. Before making any changes, stamp the database with the current revision:

    make stamp_db
  3. Make your changes to the database models in new_arrivals_chi/app/models.py.

  4. Generate a migration, you should see a new file in new_arrivals_chi/migrations/versions/:

    make create_revision

    Note that you may need to make changes to the migration file to ensure that the migration is correct.

  5. Apply the migration to the database:

    make update_db

    The changes should now be reflected in the database.

Updating and Compiling Translations

Translations are handled using Flask-Babel and collaboratively updated using Poedit.

  1. Extract Messages: First, extract messages from codebase and HTML files into a .pot file. This file will contain all the translatable strings.
pybabel extract -F new_arrivals_chi/babel.cfg -k _l -o messages.pot .
  1. Update Translations: Next, update .po files with the new messages from the messages.pot file. This step ensures that .po files are in sync with the latest translatable strings.
pybabel update -i messages.pot -d new_arrivals_chi/app/translations
  1. Edit Translations in Poedit:

Open Poedit and edit the .po files:

  1. Compile Translations: After editing and saving your translations in Poedit, you need to compile the .po files into .mo files, which are used by Flask at runtime.
pybabel compile -d new_arrivals_chi/app/translations

Using the Application

Below are video demonstrations for using the application from the perspective of 3 different users:

Design and Values

This project is iterative, and centers user is at the center of our design and implementation.

Read more about our design process and project values

Next Steps

This project is a work in progress, and we are excited to expand features and improve functionality in the near future.

Read our long term viability plan here!

Authors

License

This project is licensed under the AGPLv3 license.

Acknowledgments

Get in Touch

This project is a collaborative effort and we would love your feedback!

Have an idea to make it better? Submit feedback or report a bug here.

Want to get in touch? Email us at newarrivalschi.contact@gmail.com.