GithubHelp home page GithubHelp logo

erkandmp / pgconfig-ce Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rustprooflabs/pgconfig-ce

0.0 0.0 0.0 153 KB

postgresql.conf comparison tool

License: MIT License

Python 64.33% CSS 1.88% HTML 33.79%

pgconfig-ce's Introduction

postgresql.conf compare

Compares parameters defined and their default values between PostgreSQL major versions. Hosted by RustProof Labs.

Deployment Instructions

Note: Need to update the sub-version of Python over time. Can use simply python3 but that can lead to using older unsupported versions based on distro-defaults.

cd ~/venv
python3.8 -m venv pgconfig
source ~/venv/pgconfig/bin/activate

Install requirements

source ~/venv/pgconfig/bin/activate
cd ~/git/pgconfig-ce
pip install -r requirements.txt

Run web server w/ uWSGI.

source ~/venv/pgconfig/bin/activate
cd ~/git/pgconfig-ce
python run_server.py

Add new config files

To add a new configuration version, build target Postgres version from source. Example in post. Take the contents of the postgresql.conf file, clean out all comments, uncomment all default GUCs. Place in webapp/config and update VERSIONS list ini pgconfig.py.

Example of getting configuration after building from source.

cat /usr/local/pgsql/data/postgresql.conf

Unit tests

Run unit tests.

python -m unittest tests/*.py

Or run unit tests with coverage.

coverage run -m unittest tests/*.py

Generate report.

coverage report -m webapp/*.py

Name                 Stmts   Miss  Cover   Missing
--------------------------------------------------
webapp/__init__.py      15      0   100%
webapp/config.py        25      0   100%
webapp/forms.py          6      0   100%
webapp/pgconfig.py     150     37    75%   26-27, 53, 71-73, 87-94, 115-122, 140-145, 162-170, 222-223, 300, 393, 417
webapp/routes.py        83     58    30%   20, 24, 30, 35, 40-43, 51, 56-75, 87, 92-119, 127-140, 143-155
--------------------------------------------------
TOTAL                  279     95    66%

Run pylint.

pylint --rcfile=./.pylintrc -f parseable ./webapp/*.py

History

The open source (Community Edition) version of this project started as a manual fork of RustProof Labs' internal project, commit fcc0619. The original internal project will be retired as this project evolves.

pgconfig-ce's People

Contributors

rustprooflabs 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.