PeepDB-dev / peepdb

CLI tool and python library to inspect databases fast.
https://docs.peepdb.dev/
GNU General Public License v3.0
264 stars 15 forks source link

[question] Ways to specify the database I want to work with #37

Closed LeMeteore closed 3 days ago

LeMeteore commented 3 days ago

:wave: Is there a way to tell the library: "I only want to work with a Postgresql database, no need to look for a Mariadb or a Mysql configuration" ? :thinking: Thanks a lot for your time and your efforts :pray:

evangelosmeklis commented 3 days ago

@LeMeteore Hello and thanks a lot for trying out peepDB. Are you doing a pip install peepdb and getting errors with mysql and mariadb dependencies?

LeMeteore commented 3 days ago

@evangelosmeklis Hello and thanks for your quick reply. I was wondering if I can contribute to the project. I cloned everything, created a virtualenv, installed all the requirements.

Obviously, I need to have MySQL and MariaDB installed before being able to contribute. Is there ways to contribute even though I don't have all the supported databases ?

Collecting mariadb (from -r requirements.txt (line 4))
  Using cached mariadb-1.1.10.tar.gz (84 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      /bin/sh: 1: mariadb_config: not found
      Traceback (most recent call last):
        File "/home/nsukami/LAB/peepdb/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/nsukami/LAB/peepdb/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/nsukami/LAB/peepdb/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-igsvz0vl/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-igsvz0vl/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-igsvz0vl/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 503, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-igsvz0vl/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 27, in <module>
        File "/tmp/pip-install-czgl6wra/mariadb_d6710086179b4ebdbb10b5f03e49fb37/mariadb_posix.py", line 62, in get_config
          cc_version = mariadb_config(config_prg, "cc_version")
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-czgl6wra/mariadb_d6710086179b4ebdbb10b5f03e49fb37/mariadb_posix.py", line 28, in mariadb_config
          raise EnvironmentError(
      OSError: mariadb_config not found.

      This error typically indicates that MariaDB Connector/C, a dependency which
      must be preinstalled, is not found.
      If MariaDB Connector/C is not installed, see installation instructions
      If MariaDB Connector/C is installed, either set the environment variable
      MARIADB_CONFIG or edit the configuration file 'site.cfg' to set the
       'mariadb_config' option to the file location of the mariadb_config utility.

      [end of output]
evangelosmeklis commented 3 days ago

@LeMeteore I ll do a big code restructuring this week which will solve some of the errors, so of course you can contribute, but I'd advise a bit to wait 2-3 days for me to push , so you don't have merge conflicts. if thats no problem with you fell free to start today

LeMeteore commented 3 days ago

ll do a big code restructuring this week which will solve some of the errors

Okay. Let me know if there is something I can do to help with the "big code restructuring".

but I'd advise a bit to wait 2-3 days for me to push

Yes sir, I'll wait and in the mean time I'll try to get familiar with the existing code base !

Thanks a lot for everything !