repo_id
stringclasses
208 values
file_path
stringlengths
31
190
content
stringlengths
1
2.65M
__index_level_0__
int64
0
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/checkpoints/tracking_url_parameter_validation.yml
name: tracking_url_parameter_validation config_version: 1.0 template_name: module_name: great_expectations.checkpoint class_name: Checkpoint run_name_template: '%Y%m%d-%H%M%S-newsletter-automation' expectation_suite_name: batch_request: {} action_list: - name: store_validation_result action: class_name: Sto...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/checkpoints/description_validation.yml
name: description_validation config_version: 1.0 template_name: module_name: great_expectations.checkpoint class_name: Checkpoint run_name_template: 'All Articles Description Validation' expectation_suite_name: batch_request: {} action_list: - name: store_validation_result action: class_name: StoreValidatio...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/checkpoints/all_articles_count_validations.yml
name: all_articles_count_validations config_version: 1.0 template_name: module_name: great_expectations.checkpoint class_name: Checkpoint run_name_template: 'Ready count' expectation_suite_name: batch_request: {} action_list: - name: store_validation_result action: class_name: StoreValidationResultAction ...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/checkpoints/past_articles_count_validations.yml
name: past_articles_count_validations config_version: 1.0 template_name: module_name: great_expectations.checkpoint class_name: Checkpoint run_name_template: 'Past Article Count' expectation_suite_name: verify_past_articles_expectation_suite batch_request: {} action_list: - name: store_validation_result action: ...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/checkpoints/current_week_article_validation.yml
name: current_week_article_validation config_version: 1.0 template_name: module_name: great_expectations.checkpoint class_name: Checkpoint run_name_template: 'Ready Current Week Article with Title and Description' expectation_suite_name: batch_request: {} action_list: - name: store_validation_result action: ...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/checkpoints/comic_title_validations.yml
name: comic_title_validations config_version: 1.0 template_name: module_name: great_expectations.checkpoint class_name: Checkpoint run_name_template: 'Ready Comic with Title' expectation_suite_name: batch_request: {} action_list: - name: store_validation_result action: class_name: StoreValidationResultActio...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/checkpoints/README.md
Checkpoints are the primary means of validating data against the defined expectations. Place the Checkpoints in this directory.
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/expectations/verify_current_week_article.json
{ "data_asset_type": null, "expectation_suite_name": "verify_current_week_article", "expectations": [ { "expectation_type": "expect_column_value_lengths_to_be_between", "kwargs": { "column": "description", "condition_parser": "great_expectations__experimental__", "min_val...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/expectations/comic_title_validations.json
{ "data_asset_type": null, "expectation_suite_name": "comic_title_validations", "expectations": [ { "expectation_type": "expect_column_value_lengths_to_be_between", "kwargs": { "column": "title", "condition_parser": "great_expectations__experimental__", "min_value": 2, ...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/expectations/.ge_store_backend_id
store_backend_id = 4236ae2e-0b47-4b23-8b7e-5c38fd283e7a
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/expectations/description_title_validations.json
{ "data_asset_type": null, "expectation_suite_name": "description_title_validations", "expectations": [ { "expectation_type": "expect_column_value_lengths_to_be_between", "kwargs": { "column": "description", "min_value": 90 }, "meta": {} } ], "ge_cloud_id": null...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/expectations/verify_past_articles_expectation_suite.json
{ "data_asset_type": null, "expectation_suite_name": "verify_past_articles_expectation_suite", "expectations": [ { "expectation_type": "expect_table_row_count_to_be_between", "kwargs": { "min_value": 2 }, "meta": {} }, { "expectation_type": "expect_column_values_t...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/expectations/all_articles_count_validations.json
{ "data_asset_type": null, "expectation_suite_name": "all_articles_count_validations", "expectations": [ { "expectation_type": "expect_table_row_count_to_be_between", "kwargs": { "max_value": 10, "min_value": 1 } } ], "ge_cloud_id": null, "meta": { "citations": ...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/expectations/tracking_url_parameter_validation.json
{ "data_asset_type": null, "expectation_suite_name": "tracking_url_parameter_validation", "expectations": [ { "expectation_type": "expect_column_values_to_be_unique", "kwargs": { "column": "url" }, "meta": {} } ], "ge_cloud_id": null, "meta": { "citations": [ ...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/utils/pytest.ini
[pytest] markers = CheckpointWednesday10am : Checkpoints that ought to be run at 10:00 AM, every Wednesday CheckpointFriday04pm : Checkpoints that ought to be run at 04:00 PM, every Friday CheckpointWednesday04pm : Checkpoints that ought to be run at 04:00 PM, every Wednesday
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/utils/send_skype_message.py
""" This script is used to send message to provided Skype channel """ import os import sys import requests sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from conf import netlify_conf from conf import skype_conf def post_message_on_skype(): """ Posts a message on the set Skype ch...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/utils/test_run_current_week_article_validations.py
""" This is a basic generated Great Expectations script that runs a Checkpoint. Checkpoints are the primary method for validating batches of data in production and triggering any followup actions. A Checkpoint facilitates running a validation as well as configurable Actions such as updating Data Docs, sending a notif...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/utils/test_run_past_articles_count_validations.py
""" This is a basic generated Great Expectations script that runs a Checkpoint. Checkpoints are the primary method for validating batches of data in production and triggering any followup actions. A Checkpoint facilitates running a validation as well as configurable Actions such as updating Data Docs, sending a notific...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/utils/test_run_tracking_url_parameter_validation.py
""" This is a basic generated Great Expectations script that runs a Checkpoint. Checkpoints are the primary method for validating batches of data in production and triggering any followup actions. A Checkpoint facilitates running a validation as well as configurable Actions such as updating Data Docs, sending a notif...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/utils/test_run_all_articles_count_validations.py
""" This is a basic generated Great Expectations script that runs a Checkpoint. Checkpoints are the primary method for validating batches of data in production and triggering any followup actions. A Checkpoint facilitates running a validation as well as configurable Actions such as updating Data Docs, sending a notific...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/utils/test_run_comic_title_validations.py
""" This is a basic generated Great Expectations script that runs a Checkpoint. Checkpoints are the primary method for validating batches of data in production and triggering any followup actions. A Checkpoint facilitates running a validation as well as configurable Actions such as updating Data Docs, sending a notif...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/utils/test_run_description_validation.py
""" This is a basic generated Great Expectations script that runs a Checkpoint. Checkpoints are the primary method for validating batches of data in production and triggering any followup actions. A Checkpoint facilitates running a validation as well as configurable Actions such as updating Data Docs, sending a notif...
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/conf/skype_conf.py
import os SKYPE_URL = os.environ['SKYPE_URL'] SKYPE_CHANNEL = os.environ['SKYPE_CHANNEL'] SKYPE_API_KEY = os.environ['SKYPE_API_KEY']
0
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations
qxf2_public_repos/newsletter_automation/tests/data_validation/great_expectations/conf/netlify_conf.py
import os NETLIFY_URL = os.environ['NETLIFY_URL']
0
qxf2_public_repos
qxf2_public_repos/streaming-data-gen/logging_config.py
""" Logging configuration for the FastAPI Data Streaming Application. """ import logging import os def setup_logging(): """ Set up logging configuration - configures the root logger with console and file handlers, sets their formatters, log levels, and adds them to the root logger. """ try: ...
0
qxf2_public_repos
qxf2_public_repos/streaming-data-gen/LICENSE
MIT License Copyright (c) 2024 sravantit25 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
0
qxf2_public_repos
qxf2_public_repos/streaming-data-gen/requirements.txt
fastapi uvicorn[standard] numpy scipy pyjwt passlib[bcrypt] python-multipart sqlalchemy httpx pytest bcrypt apitally[fastapi]
0
qxf2_public_repos
qxf2_public_repos/streaming-data-gen/README.md
# streaming-data-gen This project is a data streaming generator built using FastAPI. It produces streaming data of various waveforms and distributions, which can be accessed using HTTP endpoints. This project has been designed, developed and maintained by [Qxf2 Services](https://qxf2.com/?utm_source=github&utm_medium...
0
qxf2_public_repos
qxf2_public_repos/streaming-data-gen/endpoints_demo.ipynb
pip install requestspip install matplotlibimport requests token = "YOUR_TOKEN_HERE" def consume_stream(url): """ Consumes a data stream from the given URL and yields each data point. Args: url (str): The URL of the data stream to consume. Yields: str: The data point from the stream. ...
0
qxf2_public_repos/streaming-data-gen
qxf2_public_repos/streaming-data-gen/app/main.py
""" Main module for the Streaming Data Generator application. """ import os import sys import logging import uvicorn from apitally.fastapi import ApitallyMiddleware from starlette.exceptions import HTTPException as StarletteHTTPException from fastapi import ( FastAPI, Request, status, ) from fastapi.except...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/endpoints/anomaly_endpoints.py
""" Module for defining FastAPI endpoints that generates data with anomalies. Endpoints: /random: Endpoint for generating data with random anomalies /random-square: Endpoint for generating data with random square wave anomalies /clustered: Endpoint for generating data with clustered anomalies /periodic...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/endpoints/auth_endpoint.py
""" Module for defining FastAPI endpoints for user authentication and token generation. Endpoints: /register: Endpoint for registering a new user. /token: Endpoint for logging in a user and generating a token. """ from datetime import timedelta import logging from typing import Annotated from fastapi import ...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/endpoints/endpoints.py
""" Module for defining FastAPI endpoints. Endpoints: /sine: Endpoint for generating a sine wave. /cosine: Endpoint for generating a cosine wave. /sawtooth: Endpoint for generating a sawtooth wave. /square: Endpoint for generating a square wave. /normal: Endpoint for generating a normal distributio...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/tests/test_endpoints.py
""" This script contains tests for validating the streaming data endpoints The endpoints require bearer token authentication. """ import pytest import requests import json token = "" @pytest.mark.parametrize( "endpoint", [ "http://localhost:8000/sine", "http://localhost:8000/cosine", ...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/models/distribution_models.py
""" This script defines Pydantic models representing various distributions. """ from pydantic import BaseModel, Field class NormalModel(BaseModel): """ A model representing a normal distribution. """ mean: float = Field( default=0, description="The mean of the normal distribution." ) ...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/models/auth_model.py
from pydantic import BaseModel from typing import Union class Token(BaseModel): """ Pydantic model representing a token. Attributes: access_token (str): The access token. token_type (str): The type of the token. """ access_token: str token_type: str class TokenData(BaseModel)...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/models/waveform_models.py
""" This script defines Pydantic models representing various waveforms. """ from pydantic import BaseModel, Field class SineModel(BaseModel): """ A model representing a sine wave. """ amplitude: float = Field( default=4, description="The distance from height of a peak to center line." ) ...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/models/anomaly_models.py
""" This script defines Pydantic models representing various anomaly models. """ from pydantic import BaseModel, Field class RandomAnomalyModel(BaseModel): """ A model representing the parameters for generating random anomalies. """ base_value: float = Field( default=0.0, title="Base Va...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/static/index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Streaming Data Generator</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css"> <link rel="stylesheet" href="/stat...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/static/styles.css
.graph { width: 100%; height: 400px; margin: 20px 0; } .tabs { display: flex; flex-direction: column; } .tab-buttons { display: flex; justify-content: space-around; } .tab-buttons button { padding: 10px; margin: 5px; cursor: pointer; } .tab-content { display: none; } .tab-con...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/static/token.js
document.addEventListener('DOMContentLoaded', function () { const form = document.getElementById('register-form'); form.addEventListener('submit', async function (event) { event.preventDefault(); const formData = new FormData(event.target); const username = document.getElementById('username').value; co...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/static/script.js
function openTab(event, tabName) { const tabContents = document.getElementsByClassName('tab-content'); for (let i = 0; i < tabContents.length; i++) { tabContents[i].classList.remove('active'); } document.getElementById(tabName).classList.add('active'); } function openModal(modalId) { do...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/static/login.js
document.addEventListener('DOMContentLoaded', function () { const loginForm = document.getElementById('login-form'); const loginMessage = document.getElementById('login-message'); const modalTokenMessage = document.getElementById('modal-token-message'); const modalTokenExpiry = document.getElementById('...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/db_utils/models.py
""" SQLAlchemy User model definition. This script defines the User model for the database, including the columns and table name. """ from sqlalchemy import Column, Integer, String from app.db_utils.database import Base class User(Base): """ User model for the SQLAlchemy ORM. Attributes: id (int...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/db_utils/database.py
""" This script defines the database connection and session for the Streaming Data Generator application. It uses SQLAlchemy to create and manage the database connection and session. """ from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmake...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/db_utils/schemas.py
""" Pydantic models for User operations. This script defines the Pydantic models used for user-related operations. """ from pydantic import BaseModel class UserBase(BaseModel): """ Base model for user information. Attributes: username (str): The username of the user. """ username: str ...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/db_utils/crud.py
""" This module provides utility functions for user authentication and token management. """ import os from dotenv import load_dotenv from datetime import datetime, timedelta, timezone import logging from typing import Union import jwt from fastapi import APIRouter, Depends, HTTPException, status from fastapi.securit...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/generators/cosine.py
""" Module for generating a cosine wave data stream based on the given CosineModel parameters. """ import asyncio import logging import numpy as np from app.models.waveform_models import CosineModel logger = logging.getLogger(__name__) async def generate_cosine_data(cosine_model: CosineModel): """ Generates ...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/generators/normal.py
""" Module for generating a normal distribution data stream based on the given NormalModel parameters. """ import asyncio import logging from scipy.stats import norm from app.models.distribution_models import NormalModel logger = logging.getLogger(__name__) async def generate_normal_data(normal_model: NormalModel):...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/generators/sine.py
""" Module for generating a sine wave data stream based on the given SineModel parameters. """ import asyncio import logging import numpy as np from app.models.waveform_models import SineModel logger = logging.getLogger(__name__) async def generate_sine_data(sine_model: SineModel): """ Generates a sine wav...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/generators/exponential.py
""" Module for generating an exponential distribution data stream based on the given ExponentialModel parameters. """ import asyncio import logging from scipy.stats import expon from app.models.distribution_models import ExponentialModel logger = logging.getLogger(__name__) async def generate_exponential_data(expon...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/generators/uniform.py
""" Module for generating an uniform distribution data stream based on the given UniformModel parameters. """ import asyncio import logging from scipy.stats import uniform from app.models.distribution_models import UniformModel logger = logging.getLogger(__name__) async def generate_uniform_data(uniform_model: Unif...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/generators/square.py
""" Module for generating a square wave data stream based on the given SquareModel parameters. """ import asyncio import logging import numpy as np from scipy.signal import square from app.models.waveform_models import SquareModel logger = logging.getLogger(__name__) async def generate_square_data(square_model: Squ...
0
qxf2_public_repos/streaming-data-gen/app
qxf2_public_repos/streaming-data-gen/app/generators/sawtooth.py
""" Module for generating a sawtooth wave data stream based on the given SawtoothModel parameters. """ import asyncio import logging import numpy as np from app.models.waveform_models import SawtoothModel logger = logging.getLogger(__name__) async def generate_sawtooth_data(sawtooth_model: SawtoothModel): """ ...
0
qxf2_public_repos/streaming-data-gen/app/generators
qxf2_public_repos/streaming-data-gen/app/generators/anomalies/random_anomaly.py
""" Module for generating a continuous stream of data points with random anomalies based on specified parameters. """ import random import asyncio import logging from app.models.anomaly_models import RandomAnomalyModel logger = logging.getLogger(__name__) async def generate_random_anomalies(random_anomaly: RandomA...
0
qxf2_public_repos/streaming-data-gen/app/generators
qxf2_public_repos/streaming-data-gen/app/generators/anomalies/count_duration.py
""" Module for generating a specified number of anomalies within a fixed duration (1 hour). """ import random import asyncio import logging import itertools from app.models.anomaly_models import CountBasedAnomalyModel logger = logging.getLogger(__name__) async def generate_count_based_anomalies_data( count_base...
0
qxf2_public_repos/streaming-data-gen/app/generators
qxf2_public_repos/streaming-data-gen/app/generators/anomalies/periodic_spike.py
""" Module for generateing data points with regular spikes occurring at specified interval within a duration of 1 hour. """ import random import asyncio import logging import itertools from app.models.anomaly_models import SpikeAnomalyModel logger = logging.getLogger(__name__) async def generate_periodic_spike_data...
0
qxf2_public_repos/streaming-data-gen/app/generators
qxf2_public_repos/streaming-data-gen/app/generators/anomalies/clustered.py
""" Module for generating clustered anomalies occuring at random intervals. """ import random import asyncio import logging from app.models.anomaly_models import ClusteredAnomalyModel logger = logging.getLogger(__name__) async def generate_clustered_anomalies(clustered_model: ClusteredAnomalyModel): """ Gen...
0
qxf2_public_repos/streaming-data-gen/app/generators
qxf2_public_repos/streaming-data-gen/app/generators/anomalies/random_square.py
""" Module for generating random positive square wave anomalies with varying durations at irregular intervals. """ import random import asyncio import logging from app.models.anomaly_models import RandomSquareModel logger = logging.getLogger(__name__) async def generate_random_square(square_model: RandomSquareModel...
0
qxf2_public_repos
qxf2_public_repos/acc-model-app/LICENSE
MIT License Copyright (c) 2024 sravantit25 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
0
qxf2_public_repos
qxf2_public_repos/acc-model-app/README.md
# ACC Model App ## Overview The ACC Model App is a web application for managing Attributes, Components, and Capabilities (ACC) for software projects. It provides a user-friendly interface for evaluating various capabilities against defined attributes and viewing aggregated ratings across users. ## Background This p...
0
qxf2_public_repos
qxf2_public_repos/acc-model-app/docker-compose.yml
version: "3.8" services: backend: build: context: ./backend ports: - "8000:8000" env_file: - .env depends_on: database: condition: service_healthy command: > sh -c "sleep 10 && alembic upgrade head && uvicorn app.main:app --reload --host 0.0.0.0 --port 8000" ...
0
qxf2_public_repos/acc-model-app
qxf2_public_repos/acc-model-app/frontend/Dockerfile
# Use Node.js as the base image FROM node:18 # Set working directory WORKDIR /app # Copy frontend code COPY . /app # Install dependencies RUN npm install # Build the React app for production RUN npm run build # Expose the React port EXPOSE 3000 # Serve the production build CMD ["npx", "serve", "-s", "build", "-l"...
0
qxf2_public_repos/acc-model-app
qxf2_public_repos/acc-model-app/frontend/README.md
# Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ## Available Scripts In the project directory, you can run: ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view...
0
qxf2_public_repos/acc-model-app
qxf2_public_repos/acc-model-app/frontend/package-lock.json
{ "name": "frontend", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "frontend", "version": "0.1.0", "dependencies": { "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^5.16.6", "...
0
qxf2_public_repos/acc-model-app
qxf2_public_repos/acc-model-app/frontend/package.json
{ "name": "frontend", "version": "0.1.0", "private": true, "dependencies": { "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^5.16.6", "@mui/material": "^5.16.7", "@mui/x-tree-view": "^7.12.0", "@testing-library/jest-dom": "^5.17.0", "@testing-lib...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/public/index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> <meta name="description" content="Web site created u...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/public/manifest.json
{ "short_name": "React App", "name": "Create React App Sample", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" }, { "src": "logo192.png", "type": "image/png", "sizes": "192x192" }, { "src": "logo512.png", ...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/public/robots.txt
# https://www.robotstxt.org/robotstxt.html User-agent: * Disallow:
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/reportWebVitals.js
const reportWebVitals = onPerfEntry => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); getFID(onPerfEntry); getFCP(onPerfEntry); getLCP(onPerfEntry); getTTFB(onPerfEntry); })...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/App.css
.App { text-align: left; width: 100%; } .App-logo { height: 40vmin; pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .App-logo { animation: App-logo-spin infinite 20s linear; } } .App-header { align-items: flex-start; justify-content: flex-start; padding: 2rem; } .App-l...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/index.js
import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import { ThemeProvider } from '@mui/material/styles'; import reportWebVitals from './reportWebVitals'; import theme from './theme'; const root = ReactDOM.createRoot(document.getElementById('root')); root...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/theme.js
import { createTheme } from "@mui/material/styles"; const theme = createTheme({ palette: { primary: { main: "#4B8077", // Sage green light: "#8BB3A1", // Lighter sage green dark: "#2E5D53", // Darker sage green }, secondary: { main: "#FF6F61", // Coral light: "#FF8A75", // L...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/index.css
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { font-family: source-code-pro, Menlo, Mona...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/DrawerComponent.js
import React from "react"; import { Drawer, List, ListItem, ListItemIcon, ListItemText, Divider, Collapse, } from "@mui/material"; import { Link } from "react-router-dom"; import { Dashboard as DashboardIcon, Compare as CompareIcon, RateReview, ExpandLess, ExpandMore, People, MiscellaneousSe...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/AppBarComponent.js
import React from "react"; import { AppBar, Toolbar, IconButton, Typography, Box, Button } from "@mui/material"; import MenuIcon from "@mui/icons-material/Menu"; import { Link } from "react-router-dom"; const AppBarComponent = ({ isAuthenticated, user, toggleDrawer, handleLogout }) => { retu...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/App.test.js
import { render, screen } from '@testing-library/react'; import App from './App'; test('renders learn react link', () => { render(<App />); const linkElement = screen.getByText(/learn react/i); expect(linkElement).toBeInTheDocument(); });
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/setupTests.js
// jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom';
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/logo.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6...
0
qxf2_public_repos/acc-model-app/frontend
qxf2_public_repos/acc-model-app/frontend/src/App.js
import React, { useState, useEffect } from "react"; import { BrowserRouter as Router, Route, Routes, Navigate, } from "react-router-dom"; import { CssBaseline, Toolbar, Box, } from "@mui/material"; import AccModels from "./pages/AccModels"; import Attributes from "./pages/Attributes"; import Components fr...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/capabilities/CapabilityForm.js
import React from "react"; import { Box, Button, Modal, TextField, Typography } from "@mui/material"; /** * A React component for creating or editing a capability through a form. * * @param {bool} isOpen - Whether the form should be shown or not. * @param {function} onClose - A function to be called when the user ...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/capabilities/AccModelSelector.js
import React from "react"; import { FormControl, InputLabel, Select, MenuItem } from "@mui/material"; /** * A React component for selecting an ACC model from a list. * * @param {Object[]} accModels - An array of ACC model objects to display. * @param {string} selectedAccModel - The id of the currently selected ACC...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/capabilities/CapabilityList.js
import React from "react"; import { Box, Button, Card, CardContent, Typography, Stack, } from "@mui/material"; /** * The component renders a list of components, each with its associated * capabilities. The component also renders a "Create New Capability" button * for each component. */ const Capability...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/capabilities/ConfirmDialog.js
import React from "react"; import { Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Button, } from "@mui/material"; /** * A dialog that asks the user to confirm that they want to delete a capability. * * @param {{isOpen: boolean, onClose: function, onConfirm: function}} props * @p...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/ratings/RatingsTable.js
import React from "react"; import { Box, Typography, IconButton, TableCell, TableRow, Select, MenuItem, } from "@mui/material"; import { ExpandMore, ExpandLess, Edit } from "@mui/icons-material"; /** * A table for displaying and editing capability ratings. * * @param {object} components A list of comp...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/ratings/CommentDialog.js
import React from "react"; import { Dialog, DialogActions, DialogContent, DialogTitle, Button, TextareaAutosize, } from "@mui/material"; /** * A dialog for adding a comment to a rating. * @param {bool} open - Whether the dialog is open or not. * @param {string} currentComment - The current comment being...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/attributes/AttributeList.js
import React from "react"; import { Card, CardContent, Typography, Button, Box, Stack, } from "@mui/material"; /** * A React component for displaying a list of attributes. * * @param {Object[]} attributes - An array of attribute objects to display. * @param {Function} handleOpenModal - A function to be...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/attributes/AttributeForm.js
import React from "react"; import { Modal, Box, Typography, TextField, Button } from "@mui/material"; /** * A React component for creating or editing an attribute through a form. * * @param {bool} isOpen - Whether the form should be shown or not. * @param {Object} attribute - The attribute to be edited, or an empt...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/attributes/ConfirmDialog.js
import React from "react"; import { Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Button, } from "@mui/material"; /** * A dialog that asks the user to confirm that they want to delete an attribute. * * @param {bool} isOpen - Whether the dialog is open or not. * @param {function}...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/components/ComponentForm.js
import React from "react"; import { Box, Button, Modal, TextField, Typography } from "@mui/material"; /** * A React component for creating or editing a component through a form. * * @param {bool} isOpen - Whether the form should be shown or not. * @param {Object} component - The component to be edited, or an empty...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/components/AccModelSelector.js
import React from "react"; import { FormControl, InputLabel, MenuItem, Select } from "@mui/material"; /** * A React component for selecting an ACC model from a list. * * @param {Object[]} accModels - An array of ACC model objects to display. * @param {string} selectedAccModel - The id of the currently selected ACC...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/components/ConfirmDialog.js
import React from "react"; import { Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Button, } from "@mui/material"; /** * A dialog that asks the user to confirm that they want to delete a component. * * @param {bool} isOpen - Whether the dialog is open or not. * @param {function} ...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/components/ComponentList.js
import React from "react"; import { Card, CardContent, Typography, Box, Button, Stack, } from "@mui/material"; /** * A React component for displaying a list of components. * * @param {Object[]} components - An array of component objects to display. * @param {Function} handleOpenModal - A function to be...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/users/UserList.js
import React from "react"; import { Card, CardContent, Typography, Box, Button, Stack, } from "@mui/material"; /** * A React component for displaying a list of users. * * @param {Object[]} users - An array of user objects to display. * @param {Function} handleOpenModal - A function to be called when th...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/users/UserForm.js
import React, { useState } from "react"; import { Box, Button, Modal, TextField, Typography } from "@mui/material"; /** * A React component for creating or editing a user through a form. * * @param {bool} isOpen - Whether the form should be shown or not. * @param {Object} user - The user to be edited, or an empty ...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/users/ConfirmDialog.js
import React from "react"; import { Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Button, } from "@mui/material"; /** * A dialog that asks the user to confirm that they want to delete a user. * * @param {bool} isOpen - Whether the dialog is open or not. * @param {function} handl...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/accModels/AccModelList.js
import React from "react"; import { Card, CardContent, Stack, Typography, Box, Button, } from "@mui/material"; /** * A React component for displaying a list of ACC models. * * @param {Object[]} models - An array of ACC model objects to display. * @param {Function} handleOpenModal - A function to be cal...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/accModels/ConfirmDialog.js
import React from "react"; import { Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Button, } from "@mui/material"; /** * A dialog that asks the user to confirm that they want to delete an ACC model. * * @param {boolean} isOpen - Whether the dialog is open or not. * @param {functi...
0
qxf2_public_repos/acc-model-app/frontend/src/components
qxf2_public_repos/acc-model-app/frontend/src/components/accModels/AccModelForm.js
import React from 'react'; import { Box, Button, Modal, TextField, Typography } from '@mui/material'; /** * A React component for creating or editing an ACC model through a form. * * @param {bool} isOpen - Whether the form should be shown or not. * @param {Object} model - The ACC model to be edited, or an empty ob...
0
qxf2_public_repos/acc-model-app/frontend/src
qxf2_public_repos/acc-model-app/frontend/src/pages/RegistrationForm.js
import React, { useState } from "react"; import { TextField, Button, Container, Typography, Box } from "@mui/material"; import { registerUser } from "../services/registerService"; /** * RegistrationForm is a component that renders a registration form for * users. It accepts a username, email, designation, pass...
0