{"id":50980371,"url":"https://github.com/chandra-mta/flask-usint","last_synced_at":"2026-06-19T13:31:06.941Z","repository":{"id":363647526,"uuid":"964801690","full_name":"chandra-mta/flask-usint","owner":"chandra-mta","description":"Usint Web Application","archived":false,"fork":false,"pushed_at":"2026-06-09T19:06:25.000Z","size":376,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-06-09T20:19:52.219Z","etag":null,"topics":["flask","jquery","notification-system","python3","sqlalchemy","sybase"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chandra-mta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-11T20:09:48.000Z","updated_at":"2026-06-02T20:12:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chandra-mta/flask-usint","commit_stats":null,"previous_names":["chandra-mta/flask-usint"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/chandra-mta/flask-usint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandra-mta%2Fflask-usint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandra-mta%2Fflask-usint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandra-mta%2Fflask-usint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandra-mta%2Fflask-usint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chandra-mta","download_url":"https://codeload.github.com/chandra-mta/flask-usint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandra-mta%2Fflask-usint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34534230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","jquery","notification-system","python3","sqlalchemy","sybase"],"created_at":"2026-06-19T13:31:06.143Z","updated_at":"2026-06-19T13:31:06.926Z","avatar_url":"https://github.com/chandra-mta.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Usint Flask Application\n\nThis repository contains the Python Flask application supporting the [Usint Website](https://cxc.cfa.harvard.edu/wsgi/cus/usint/).\n\nFor information related to the web server backend, support, and development of this application, consult the **Flask/Usint** folder in the MTA shared drive.\n\n## Gunicorn Server\n\nThis is the server process startup command, running under Syshelp control, using the usint.py entrypoint.\nhttps://flask.palletsprojects.com/en/stable/deploying/gunicorn/#running\n```\ngunicorn -c \u003cserver_config_name\u003e.conf.py usint:application\n```\n\nThe gunicorn server configuration file handles settings to allow the cxc web servers to send requests to the application server.\nFlask application specific settings, such as database connections and email settings, exists as flask config files, and thus within MTA file ownership.\n\n## Logging\n\nSyshelp uses a separate setup for processing logs which relate to their Apache web server operations. For Flask Usint on the Gunicorn sever,\nthis differs to provided more direct access to compartmentalized logs for each application installation.\nStarting at the root folder of the application, `/proj/web-cxc/wsgi-scripts/cus` for example, there is an `instance/logs` directory which contains three types of logs\n\n- **access:** This contains a log of the HTTP requests made to the server. Here you can see what URL's are requested by which user and other HTTP request header information\n- **error:** This contains runtime errors for both the gunicorn server running the flask application, and runtime errors within the flask application.\n- **operation:** This is a log for noromal operational messages, such as a revision being submitted, or a signoff being performed.\n\n## Structure\n\nThe top level of this project is the application root, containing the server entrypoint modules, base configuration settings, the instance directory containing file relevant to this application installation's specific runtime, and the cus_app package containing our source code.\n\n* **`usint.py`**  \n  Python module entrypoint for the Gunicorn server which determine application creation and configuration.\n  By acting as an entrypoint, MTA can perform file edits to the application configuration and creation without necessarily requiring a\n  gunicorn server restart. Conceptually, the application could still run if gunicorn called the cus_app package create_app() function directly.\n  \n\n* **`baseconfig.py`**  \n  Configuration file.\n\n* **`instance/`**  \n  Instance folder for storing application-specific files such as logs and the `usint.db` database.\n\n  * **`logs/`**  \n    Contains `ocat.log` files for logging application runtime information. Used by web server processes.\n\n* **`cus_app/`**  \n  Main Flask application folder containing relevant page generation scripts:\n\n  * **`__init__.py`** — Application instantiation script\n  * **`emailing.py`** — Email-related functions for notifications\n  * **`models.py`** — SQLAlchemy ORM models for interfacing with the Usint Revision database\n  * **`extensions.py`** - Module for instantiating the Flask Extension class instances.\n\n  ### Submodules\n\n  * **`chkupdata/`** — Parameter check page scripts\n  * **`errors/`** — Error handler scripts\n  * **`express/`** — Express sign-off page scripts\n  * **`ocatdatapage/`** — Ocat data page scripts\n  * **`orupdate/`** — Parameter status page scripts\n  * **`scheduler/`** — TOO duty scheduler page scripts\n  * **`supple/`** — Supplemental Python scripts\n\n  ### Static Files (`static/`)\n\n  * `color.json` — Maps color names to RGB values\n  * `labels.json` — Maps Ocat parameters to visual labels\n  * `parameter_selections.json` — Parameter group mappings used across the application\n  * `usint.js` — jQuery library for the Ocat data page\n  * `ocat_style.css` — CSS styles\n  * `ocatdatapage/` — Static files for the Ocat data page\n  * `orupdate/` — Static files for the parameter status page\n  * `scheduler/` — Static files for the scheduler page\n\n  ### Templates (`templates/`)\n\n  * `base.html` -  Base template block for general web pages.\n  * `app_base.html` — Base template for application pages (mainly CSS differences)\n  * `index.html` — Main index page\n  * Additional page-specific templates (see sections below)\n\n***\n\n## chkupdata\n\nDisplays original, requested, and current parameter values for a given `\u003cobsid\u003e.\u003crev\u003e`.\n\n### Files\n\n* `routes.py` — Main logic\n* `forms.py` — WTForms definitions\n* `__init__.py` — Module setup\n\n### Templates\n\n* `index.html` — Main page\n* `provide_obsidrev.html` — Shown when `\u003cobsid\u003e.\u003crev\u003e` is not found\n* `macros.html` — Template macros\n\n***\n\n## errors\n\nApplication error handling.\n\n### Files\n\n* `handlers.py` — Main error handling logic\n* `__init__.py` — Module setup\n\n### Templates\n\n* `404.html` — Not found page\n* `500.html` — Server error page\n\n***\n\n## express\n\nExpress sign-off / approval workflow.\n\n### Files\n\n* `routes.py` — Main logic\n* `forms.py` — WTForms definitions\n* `__init__.py` — Module setup\n\n### Templates\n\n* `index.html` — Main page\n* `confirm.html` — Confirmation page\n* `macros.html` — Template macros\n\n***\n\n## ocatdatapage\n\nOcat data page used for updating parameter values.\n\n### Files\n\n* `routes.py` — Main logic\n* `forms.py` — WTForms definitions\n* `format_ocat_data.py` — Data formatting utilities\n* `__init__.py` — Module setup\n\n### Additional Data\n\n* `\u003cobs_ss\u003e/mp_long_term` — Planned roll angle from MP site\n* `\u003cobs_ss\u003e/scheduled_obs_list` — Scheduled observations\n\n### Templates\n\n* `index.html` — Main update page\n* `macros.html` — Template macros\n* `confirm.html` — Update confirmation page\n* `finalize.html` — Job completion page\n* `provide_obsid.html` — Shown when `\u003cobsid\u003e` is not found\n\n***\n\n## orupdate\n\nTarget parameter status page.\n\n### Files\n\n* `routes.py` — Main logic\n* `forms.py` — WTForms definitions\n* `__init__.py` — Module setup\n\n### Templates\n\n* `index.html` — Main page\n* `macros.html` — Template macros\n\n\u003e **Note:**  \n\u003e This page refreshes every 3 minutes to display the latest data. This ensures consistency when multiple users are updating the database simultaneously.\n\n***\n\n## rm\\_submission\n\nRemove accidental submissions.\n\n### Files\n\n* `routes.py` — Main logic\n* `forms.py` — WTForms definitions\n* `__init__.py` — Module setup\n\n### Templates\n\n* `index.html` — Main page\n* `macros.html` — Template macros\n\n***\n\n## scheduler\n\nPOC duty sign-up sheet.\n\n### Files\n\n* `routes.py` — Main logic\n* `forms.py` — WTForms definitions\n* `__init__.py` — Module setup\n\n### Templates\n\n* `index.html` — Main page\n* `macros.html` — Template macros\n\n***\n\n## supple\n\nSupplemental scripts used across the application.\n\n### Files\n\n* `database_interface.py` — SQLAlchemy interface for the Usint Revision SQLite database\n* `helper_functions.py` — General helper utilities\n* `read_ocat_data.py` — Fetches and formats Ocat Sybase data via the `ska_dbi SQSH` interface\n\n### Data Sources\n\n* **CXC Ocat Sybase database** (via `read_ocat_data.py`)\n* **Usint Revision SQLite database** (via `database_interface.py`)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchandra-mta%2Fflask-usint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchandra-mta%2Fflask-usint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchandra-mta%2Fflask-usint/lists"}