Unverified Commit 8b088e1e authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

python312Packages.reflex: init at 0.5.9 (#333337)

parents b1caafea bc0a29f0
Loading
Loading
Loading
Loading
+62 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  poetry-core,
  charset-normalizer,
  httpx,
  pipdeptree,
  platformdirs,
  pydantic,
  python-dateutil,
  rich,
  tabulate,
  typer,
  websockets,
}:

buildPythonPackage rec {
  pname = "reflex-hosting-cli";
  version = "0.1.13";
  pyproject = true;

  # source is not published https://github.com/reflex-dev/reflex/issues/3762
  src = fetchPypi {
    pname = "reflex_hosting_cli";
    inherit version;
    hash = "sha256-xdav3P63TO4EajdN29WRFquO15fa5oj8x0TauuJNxXE=";
  };

  pythonRelaxDeps = [ "pipdeptree" ];

  build-system = [ poetry-core ];

  dependencies = [
    charset-normalizer
    httpx
    pipdeptree
    platformdirs
    pydantic
    python-dateutil
    rich
    tabulate
    typer
    websockets
  ];

  pythonImportsCheck = [
    "reflex_cli"
    "reflex_cli.cli"
    "reflex_cli.deployments"
  ];

  # no tests on pypi
  doCheck = false;

  meta = with lib; {
    description = "Reflex Hosting CLI";
    homepage = "https://pypi.org/project/reflex-hosting-cli/";
    license = licenses.asl20;
    maintainers = with maintainers; [ pbsds ];
  };
}
+136 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  alembic,
  attrs,
  build,
  charset-normalizer,
  dill,
  distro,
  fastapi,
  gunicorn,
  httpx,
  jinja2,
  lazy-loader,
  numpy,
  pandas,
  pillow,
  platformdirs,
  plotly,
  psutil,
  pydantic,
  pytest-asyncio,
  pytest-mock,
  pytestCheckHook,
  python-engineio,
  python-multipart,
  python-socketio,
  redis,
  reflex-hosting-cli,
  rich,
  sqlmodel,
  starlette-admin,
  tomlkit,
  twine,
  typer,
  unzip,
  uvicorn,
  watchdog,
  watchfiles,
  wrapt,
}:

buildPythonPackage rec {
  pname = "reflex";
  version = "0.5.9";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "reflex-dev";
    repo = "reflex";
    rev = "v${version}";
    hash = "sha256-QeEggHPilCLjUQ76AYDkqdf1iWLwCyAYTnf17RdhDq0=";
  };

  pythonRelaxDeps = [ "fastapi" ];
  pythonRemoveDeps = [
    "setuptools"
    "build"
  ];

  build-system = [ poetry-core ];

  dependencies = [
    alembic
    build # used in custom_components/custom_components.py
    charset-normalizer
    dill
    distro
    fastapi
    gunicorn
    httpx
    jinja2
    lazy-loader
    platformdirs
    psutil
    pydantic
    python-engineio
    python-multipart
    python-socketio
    redis
    reflex-hosting-cli
    rich
    sqlmodel
    starlette-admin
    tomlkit
    twine # used in custom_components/custom_components.py
    typer
    uvicorn
    watchdog
    watchfiles
    wrapt
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
    pytest-mock
    attrs
    numpy
    plotly
    pandas
    pillow
    unzip
  ];

  disabledTests = [
    # touches network
    "test_find_and_check_urls"
    "test_event_actions"
    "test_upload_file"
    # /proc is too funky in nix sandbox
    "test_get_cpu_info"
    # broken
    "test_potentially_dirty_substates" # AssertionError: Extra items in the left set
    # flaky
    "test_preprocess" # KeyError: 'reflex___state____state'
    "test_send" # AssertionError: Expected 'post' to have been called once. Called 0 times.
  ];
  disabledTestPaths = [
    "benchmarks/"
    "integration/"
  ];

  pythonImportsCheck = [ "reflex" ];

  meta = with lib; {
    description = "Web apps in pure Python";
    homepage = "https://github.com/reflex-dev/reflex";
    changelog = "https://github.com/reflex-dev/reflex/releases/tag/${src.rev}";
    license = licenses.asl20;
    maintainers = with maintainers; [ pbsds ];
    mainProgram = "reflex";
  };
}
+78 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  fasteners,
  libcloud,
  pillow,
  pytestCheckHook,
  sqlalchemy,
  sqlmodel,
}:

buildPythonPackage rec {
  pname = "sqlalchemy-file";
  version = "0.6.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jowilf";
    repo = "sqlalchemy-file";
    rev = version;
    hash = "sha256-gtW7YA/rQ48tnqPdypMnSqqtwb90nhAkiQNhgEr1M3I=";
  };

  build-system = [ hatchling ];

  dependencies = [
    libcloud
    sqlalchemy
  ];

  nativeCheckInputs = [
    pytestCheckHook
    fasteners
    pillow
    sqlmodel
  ];

  preCheck = ''
    # used in get_test_container in tests/utils.py
    # fixes FileNotFoundError: [Errno 2] No such file or directory: '/tmp/storage/...'
    mkdir .storage
    export LOCAL_PATH="$PWD/.storage"
  '';

  disabledTestPaths = lib.optionals stdenv.isDarwin [
    # very flaky, sandbox issues?
    # libcloud.storage.types.ContainerDoesNotExistError
    # sqlite3.OperationalError: attempt to write a readonly database
    "tests/test_content_type_validator.py"
    "tests/test_image_field.py"
    "tests/test_image_validator.py"
    "tests/test_metadata.py"
    "tests/test_multiple_field.py"
    "tests/test_multiple_storage.py"
    "tests/test_processor.py"
    "tests/test_single_field.py"
    "tests/test_size_validator.py"
    "tests/test_sqlmodel.py"
  ];

  pythonImportsCheck = [
    "sqlalchemy_file"
    "sqlalchemy_file.file"
    "sqlalchemy_file.types"
    "sqlalchemy_file.helpers"
  ];

  meta = with lib; {
    description = "SQLAlchemy extension for attaching files to SQLAlchemy model and uploading them to various storage with Apache Libcloud";
    homepage = "https://github.com/jowilf/sqlalchemy-file";
    changelog = "https://github.com/jowilf/sqlalchemy-file/blob/${src.rev}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ pbsds ];
  };
}
+127 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  aiosqlite,
  arrow,
  babel,
  cacert,
  colour,
  fasteners,
  httpx,
  jinja2,
  mongoengine,
  motor,
  passlib,
  phonenumbers,
  pillow,
  psycopg2,
  pydantic,
  pytest-asyncio,
  pytestCheckHook,
  python-multipart,
  requests,
  sqlalchemy,
  sqlalchemy-file,
  sqlalchemy-utils,
  sqlmodel,
  starlette,
}:

buildPythonPackage rec {
  pname = "starlette-admin";
  version = "0.14.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jowilf";
    repo = "starlette-admin";
    rev = version;
    hash = "sha256-DoYD8Hc5pd68+BhASw3mwwCdhu0vYHiELjVmVwU8FHs=";
  };

  build-system = [ hatchling ];

  dependencies = [
    jinja2
    python-multipart
    starlette
  ];

  optional-dependencies = {
    i18n = [ babel ];
  };

  nativeCheckInputs = [
    aiosqlite
    arrow
    babel
    cacert
    colour
    fasteners
    httpx
    mongoengine
    motor
    passlib
    phonenumbers
    pillow
    psycopg2
    pydantic
    pytest-asyncio
    pytestCheckHook
    requests
    sqlalchemy
    sqlalchemy-file
    sqlalchemy-utils
    sqlmodel
  ];

  preCheck = ''
    # used in get_test_container in tests/sqla/utils.py
    # fixes FileNotFoundError: [Errno 2] No such file or directory: '/tmp/storage/...'
    mkdir .storage
    export LOCAL_PATH="$PWD/.storage"
  '';

  disabledTests = lib.optionals stdenv.isDarwin [
    # flaky, depends on test order
    "test_ensuring_pk"
    # flaky, of-by-one
    "test_api"
  ];

  disabledTestPaths =
    [
      # odmantic is not packaged
      "tests/odmantic"
      # needs mongodb running on port 27017
      "tests/mongoengine"
    ]
    ++ lib.optionals stdenv.isDarwin [
      # very flaky, sandbox issues?
      # libcloud.storage.types.ContainerDoesNotExistError
      # sqlite3.OperationalError: attempt to write a readonly database
      "tests/sqla/test_sync_engine.py"
      "tests/sqla/test_async_engine.py"
    ];

  pythonImportsCheck = [
    "starlette_admin"
    "starlette_admin.actions"
    "starlette_admin.base"
    "starlette_admin.fields"
    "starlette_admin.i18n"
    "starlette_admin.tools"
    "starlette_admin.views"
  ];

  meta = with lib; {
    description = "Fast, beautiful and extensible administrative interface framework for Starlette & FastApi applications";
    homepage = "https://github.com/jowilf/starlette-admin";
    changelog = "https://github.com/jowilf/starlette-admin/blob/${src.rev}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ pbsds ];
  };
}
+8 −0
Original line number Diff line number Diff line
@@ -13656,6 +13656,10 @@ self: super: with self; {
  refery = callPackage ../development/python-modules/refery { };
  reflex = callPackage ../development/python-modules/reflex { };
  reflex-hosting-cli = callPackage ../development/python-modules/reflex-hosting-cli { };
  reflink = callPackage ../development/python-modules/reflink { };
  refoss-ha = callPackage ../development/python-modules/refoss-ha { };
@@ -15026,6 +15030,8 @@ self: super: with self; {
  sqlalchemy-continuum = callPackage ../development/python-modules/sqlalchemy-continuum { };
  sqlalchemy-file = callPackage ../development/python-modules/sqlalchemy-file { };
  sqlalchemy-i18n = callPackage ../development/python-modules/sqlalchemy-i18n { };
  sqlalchemy-jsonfield = callPackage ../development/python-modules/sqlalchemy-jsonfield { };
@@ -15114,6 +15120,8 @@ self: super: with self; {
  starlette = callPackage ../development/python-modules/starlette { };
  starlette-admin = callPackage ../development/python-modules/starlette-admin { };
  starlette-context = callPackage ../development/python-modules/starlette-context { };
  starlette-wtf = callPackage ../development/python-modules/starlette-wtf { };