Skip to main content

SC3020 Project-2

Project description

SC3020 Project 2

Installation

You can either choose to build from source or build from pypi, we require python version to be at least 3.9

Build from source

# Create a new conda environment
# Upgrade pip if necessary
# python3 -m pip install --upgrade pip
conda create --name sc3020 python=3.11
conda activate sc3020

# Install the package
python -m pip install -e .
# You can also run
# python -m pip install .
# to install it as a formal package

Build from PyPI

We have also prepared a PyPI version of it, you can also download it simply using pip. The code version is the same as the code in GitHub.

python -m pip install sc3020-g6-2024

Build with no-deps option

If you encountering any error when directly install the packages, you can also build the packages without any dependencies and then install the requirements from a txt file. We verified this environment version can successfully run the application

# Build only the sc3020 packages
python -m pip install --no-deps --no-cache-dir -e .

# Build the required requirements
python -m pip install -r requirements.txt

Config PostgreSQL

PostgreSQL is required to run the project. You can download it from here.

After installing PostgreSQL, you need to login to the user and create a database.

Here is an example.

We assume the user is the default user postgres.

psql -U postgres

And then we create a database named tpch.

CREATE DATABASE tpch;

You don't need to load the data into the database (or if you have done, it is better), because the project will download the data and load it into the database automatically. Make sure the database is served at the backend so that the application can connect to the database.

Run

A simple command to run the project:

# Use cli
sc3020

# Use python
python3 src/sc3020/project.py
# Or
python3 -m sc3020.project
# If you want to run the program as a python module

By default, the project will run on http://localhost:8000. You can then access localhost:8000 once you started the server. The default index page is a welcome page. Click the Go to Application button to actual go to the application. You can also direct access the localhost:8000/sc3020 to access the project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sc3020_g6_2024-0.2.0.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

sc3020_g6_2024-0.2.0-py3-none-any.whl (444.5 kB view details)

Uploaded Python 3

File details

Details for the file sc3020_g6_2024-0.2.0.tar.gz.

File metadata

  • Download URL: sc3020_g6_2024-0.2.0.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.10

File hashes

Hashes for sc3020_g6_2024-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b43fcf743c3ab0299680e573dd1bc7b47462300d593935d481fb60b88e93284f
MD5 2f8620d68cb7a5b5ec311440dafc96d3
BLAKE2b-256 0aa16329a6a3fbfd6ee986c8ef0c198bdf827808fb2f22823082ac1f06d7de1e

See more details on using hashes here.

File details

Details for the file sc3020_g6_2024-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sc3020_g6_2024-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 316b012991544c5d37a7e3ab9f75d71907b48c38f3bda35743fbf7ee903ddf66
MD5 7371dadaf1254b5649e295737cb05b05
BLAKE2b-256 acabacaf39731dee134923125cb91bdba86ecf011a954a784bf754e10e1869f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page