Unverified Commit 4909c78b authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

Merge pull request #325279 from pacien/pkgs-pythonpackages-jupysql-init

python3Packages.jupysql: init at 0.10.11
parents 4720a1ff 24fe501e
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  pythonOlder,
  hatchling,
  hatch-jupyter-builder,
  hatch-nodejs-version,
  jupyterlab,
  ploomber-core,
}:

buildPythonPackage rec {
  pname = "jupysql-plugin";
  version = "0.4.4";

  pyproject = true;
  disabled = pythonOlder "3.6";

  # using pypi archive which includes pre-built assets
  src = fetchPypi {
    pname = "jupysql_plugin";
    inherit version;
    hash = "sha256-kuaKknbc00nLGwCUsULgUFT52yoptUH2mnUyGYbYYKk=";
  };

  build-system = [
    hatchling
    hatch-jupyter-builder
    hatch-nodejs-version
    jupyterlab
  ];

  dependencies = [ ploomber-core ];

  # testing requires a circular dependency over jupysql
  doCheck = false;

  pythonImportsCheck = [ "jupysql_plugin" ];

  meta = with lib; {
    description = "Better SQL in Jupyter";
    homepage = "https://github.com/ploomber/jupysql-plugin";
    changelog = "https://github.com/ploomber/jupysql-plugin/blob/${version}/CHANGELOG.md";
    license = licenses.bsd3;
    maintainers = with maintainers; [ pacien ];
  };
}
+111 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,
  setuptools,
  prettytable,
  sqlalchemy,
  sqlparse,
  ipython-genutils,
  jinja2,
  sqlglot,
  jupysql-plugin,
  ploomber-core,
  ploomber-extension,
  ipython,
  duckdb,
  duckdb-engine,
  matplotlib,
  polars,
  ipywidgets,
  numpy,
  pandas,
  js2py,
  pyspark,
  pyarrow,
  grpcio,
  pytestCheckHook,
  psutil,
}:

buildPythonPackage rec {
  pname = "jupysql";
  version = "0.10.11";

  pyproject = true;
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "ploomber";
    repo = "jupysql";
    rev = "refs/tags/${version}";
    hash = "sha256-A9zTjH+9RYKcgy4mI6uOMHOc46om06y1zK3IbxeVcWE=";
  };

  pythonRelaxDeps = [ "sqlalchemy" ];

  build-system = [ setuptools ];

  dependencies = [
    prettytable
    sqlalchemy
    sqlparse
    ipython-genutils
    jinja2
    sqlglot
    jupysql-plugin
    ploomber-core
    ploomber-extension
  ];

  optional-dependencies.dev = [
    ipython
    duckdb
    duckdb-engine
    matplotlib
    polars
    ipywidgets
    numpy
    pandas
    js2py
    pyspark
    pyarrow
    grpcio
  ];

  nativeCheckInputs = [
    pytestCheckHook
    psutil
  ] ++ optional-dependencies.dev;

  disabledTestPaths = [
    # require docker
    "src/tests/integration"

    # require network access
    "src/tests/test_telemetry.py"

    # want to download test data from the network
    "src/tests/test_parse.py"
    "src/tests/test_ggplot.py"
    "src/tests/test_plot.py"
    "src/tests/test_magic.py"
    "src/tests/test_magic_plot.py"
  ];

  preCheck = ''
    # tests need to write temp data
    export HOME=$(mktemp -d)
  '';

  pythonImportsCheck = [ "sql" ];

  meta = with lib; {
    description = "Better SQL in Jupyter";
    homepage = "https://github.com/ploomber/jupysql";
    changelog = "https://github.com/ploomber/jupysql/blob/${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ pacien ];
  };
}
+49 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,
  setuptools,
  pyyaml,
  posthog,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "ploomber-core";
  version = "0.2.25";

  pyproject = true;
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "ploomber";
    repo = "core";
    rev = "refs/tags/${version}";
    hash = "sha256-QUEnWFhf42ppoXoz3H/2SHtoPZOi6lbopsrbmEAk+1U=";
  };

  build-system = [ setuptools ];

  dependencies = [
    pyyaml
    posthog
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = [
    "telemetry" # requires network
    "exceptions" # requires stderr capture
  ];

  pythonImportsCheck = [ "ploomber_core" ];

  meta = with lib; {
    description = "Core module shared across Ploomber projects";
    homepage = "https://github.com/ploomber/core";
    changelog = "https://github.com/ploomber/core/blob/${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ pacien ];
  };
}
+51 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  pythonOlder,
  fetchPypi,
  hatchling,
  hatch-jupyter-builder,
  hatch-nodejs-version,
  jupyterlab,
  ploomber-core,
  pytestCheckHook,
  pytest-jupyter,
}:

buildPythonPackage rec {
  pname = "ploomber-extension";
  version = "0.1.1";

  pyproject = true;
  disabled = pythonOlder "3.6";

  # using pypi archive which includes pre-built assets
  src = fetchPypi {
    pname = "ploomber_extension";
    inherit version;
    hash = "sha256-wsldqLhJfOESH9aMMzz1Y/FXofHyfgrl81O95NePXSA=";
  };

  build-system = [
    hatchling
    hatch-jupyter-builder
    hatch-nodejs-version
    jupyterlab
  ];

  dependencies = [ ploomber-core ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-jupyter
  ];

  pythonImportsCheck = [ "ploomber_extension" ];

  meta = with lib; {
    description = "Ploomber extension";
    homepage = "https://pypi.org/project/ploomber-extension";
    license = licenses.bsd3;
    maintainers = with maintainers; [ pacien ];
  };
}
+8 −0
Original line number Diff line number Diff line
@@ -6327,6 +6327,10 @@ self: super: with self; {
  junos-eznc = callPackage ../development/python-modules/junos-eznc { };
  jupysql-plugin = callPackage ../development/python-modules/jupysql-plugin { };
  jupysql = callPackage ../development/python-modules/jupysql { };
  jupyter = callPackage ../development/python-modules/jupyter { };
  jupyter-book = callPackage ../development/python-modules/jupyter-book { };
@@ -10362,6 +10366,10 @@ self: super: with self; {
  plone-testing = callPackage ../development/python-modules/plone-testing { };
  ploomber-core = callPackage ../development/python-modules/ploomber-core { };
  ploomber-extension = callPackage ../development/python-modules/ploomber-extension { };
  plotext = callPackage ../development/python-modules/plotext { };
  plotly = callPackage ../development/python-modules/plotly { };