GithubHelp home page GithubHelp logo

sumeetharyani / mathesar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mathesar-foundation/mathesar

0.0 0.0 0.0 36.27 MB

Web application providing an intuitive user experience to databases.

Home Page: https://wiki.mathesar.org

License: GNU General Public License v3.0

Shell 0.12% JavaScript 0.25% Python 49.66% TypeScript 21.13% HTML 0.41% Dockerfile 0.03% SCSS 1.79% Svelte 26.62%

mathesar's Introduction

Mathesar logo

Web application providing an intuitive interface to databases.


Mathesar is an open source software project to help users store, organize, visualize, and collaborate on data. Our goal is to provide an intuitive user experience for non-technical users. Mathesar directly operates on PostgreSQL databases, which gives it the flexibility to be interoperable with thousands of other existing tools and applications.

Potential use cases for Mathesar include publishing and exploring public datasets, running business processes such inventory management and project tracking, providing a ready-made interface for speedy data entry and custom reporting, collecting and processing data from large groups of people, simple data cleaning and analysis, and automatic web API generation.

We started building Mathesar in March 2021 and are making steady progress towards releasing an initial version of the project by early 2023. Please visit our public wiki to learn more about the project.

Table of Contents

Contributing

We actively encourage contribution! Join our community and read through our contributing guidelines.

Help with documentation

See the README file in our docs/ subfolder.

Local Development

First, ensure that you have Docker installed.

Clone the repository and then copy the .env.example file to .env like so:

cp .env.example .env

From the repository's root directory, run:

docker-compose --profile dev up

You should now have a web server and database server running. Opening http://localhost:8000 in your browser will open the application.

To get the UI working, you need to login at

http://localhost:8000/auth/login/

with username:

admin

and password:

password

If you'd prefer to develop using the Django Rest Framework browsable API, you can use the login functionality at the top right with the same username and password. If you prefer a non-browser tool for API development, you'll have to:

  • Use browser to execute one of the methods above, then
  • Extract the key, value pair for the cookie named sessionid using dev tools.
  • submit that cookie with each request until it expires.
  • Repeat as necessary (e.g., when the cookie expires).

For sample table data, you can create a new table in the UI using the patents.csv file found in /mathesar/tests/data.

It is recommended that you keep the Docker containers running while you make changes to the code. Any change to the code made locally will sync to the container and the version deployed at http://localhost:8000 will always be the latest local version of the code.

Developing demo data sets and functionality

For this, you should add an environment variable to .env:

DJANGO_SETTINGS_MODULE=demo.settings

Developing in Windows

Windows users who want to run the Mathesar Docker development environment in WSL are advised to clone the repository in a Linux filesystem. When the project resides in a Windows filesystem, WSL does not work well with hot module replacement (HMR), which is required for frontend development. Please refer to our Common Issues wiki page, and the frontend development README file for more details.

Configuration Options

If you want to use Mathesar with a preexisting Postgres DB, modify the DATABASES.mathesar_tables entry of the config/settings.py file with appropriate connection details before installing the Mathesar types and functions by running install.py as described in the previous step.

Please don't do this unless you have full confidence in what you're doing since Mathesar is not stable yet and may make unexpected changes to the database that you connect to it.

Frontend

For more detailed information on Mathesar's frontend development, see Mathesar UI.

Linting

To lint the project, run the lint.sh script from the root of the repository. The script requires that the Python virtual environment with flake8 be activated and that Node modules be installed in mathesar_ui/. Alternatively, ESLint and Flake8 should be installed globally on the system.

./lint.sh

By default, the script lints both Python and Node.js (if changes are staged), but this can be overridden with the -p and -n flags respectively.

./lint.sh -p false

You should symlink the script as your pre-commit hook to ensure that your code is linted along-side development.

ln -s ../../lint.sh .git/hooks/pre-commit

Running tests

If you'd like to run tests before pushing, here's how you do it:

Backend tests:

docker exec mathesar_service pytest mathesar/ db/

Frontend tests:

docker exec mathesar_service bash -c "cd mathesar_ui && npm test"

E2E integration tests

See Integration Tests

Opening a shell in the container

If you need to do some work on the container that's running the code, here's how you access it:

docker exec -it mathesar_service bash

To open a PostgreSQL psql terminal for the data in Mathesar:

docker exec -it mathesar_db psql -U mathesar

Troubleshooting

Please refer to our Common Issues wiki page for instruction on troubleshooting common issues while setting up and running Mathesar.

License

Mathesar is open source under the GPLv3 license - see LICENSE. It also contains derivatives of third-party open source modules licensed under the MIT license. See the list and respective licenses in THIRDPARTY.

mathesar's People

Contributors

pavish avatar silentninja avatar seancolsen avatar mathemancer avatar dmos62 avatar kgodey avatar eito-fis avatar rajatvijay avatar anish9901 avatar mr-gabe49 avatar jyuart avatar jinxiao0302 avatar cronus1007 avatar ghislaineguerin avatar a1o avatar dhruvkb avatar linzhou-zhong avatar manishshah120 avatar pegnott avatar asharonbaltazar avatar rajeshkumarrs avatar abhishak3 avatar powellc avatar vfermat avatar sumeetharyani avatar priyang12 avatar vrutik2809 avatar yankevn avatar aagman945 avatar ayao451 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.