Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Bump nixpkgs #286

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ repos:
language: system
stages: [commit]

- id: check-github-workflows
name: check-github-workflows
description: Validate GitHub Workflows
entry: check-jsonschema
args: [--builtin-schema=vendor.github-workflows]
files: ^\.github/workflows/[^/]+$
types: [yaml]
language: system
stages: [commit]
# TODO: Reintroduce once https://github.com/NixOS/nixpkgs/pull/273831 is in use
# - id: check-github-workflows
# name: check-github-workflows
# description: Validate GitHub Workflows
# entry: check-jsonschema
# args: [--builtin-schema=vendor.github-workflows]
# files: ^\.github/workflows/[^/]+$
# types: [yaml]
# language: system
# stages: [commit]

- id: deadnix
name: deadnix
Expand Down Expand Up @@ -152,7 +153,7 @@ repos:
pass_filenames: false
language: system
stages: [commit]

- repo: meta
hooks:
- id: check-useless-excludes
# TODO: Re-enable when https://github.com/NixOS/nixpkgs/issues/270805 is fixed
# - repo: meta
# hooks:
# - id: check-useless-excludes
14 changes: 2 additions & 12 deletions flooding/sentinel1_water_extraction/poetryPackages.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
{
pkgs,
poetry2nix,
python,
}:
pkgs.poetry2nix.mkPoetryPackages {
poetry2nix.mkPoetryPackages {
inherit python;
projectDir = builtins.path {
path = ./.;
name = "sentinel1_water_extraction_packages";
};
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: {
jupyterlab = super.jupyterlab.overridePythonAttrs (old: {
# TODO: Remove when https://github.com/nix-community/poetry2nix/pull/1173 is in use
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [self.hatchling self.hatch-jupyter-builder];
});
overrides = super.overrides.overridePythonAttrs (old: {
# TODO: Remove when https://github.com/nix-community/poetry2nix/pull/1173 is in use
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [self.setuptools];
});
});
}
5 changes: 4 additions & 1 deletion flooding/sentinel1_water_extraction/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ let
python = import ../../python.nix {
inherit pkgs;
};
poetry2nix = import ../../poetry2nix.nix {
inherit pkgs;
};
poetryPackages = import ./poetryPackages.nix {
inherit pkgs python;
inherit poetry2nix python;
};
in
pkgs.mkShell {
Expand Down
15 changes: 2 additions & 13 deletions flooding/sentinel2_water_extraction/poetryPackages.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
{
pkgs,
poetry2nix,
python,
}:
pkgs.poetry2nix.mkPoetryPackages {
poetry2nix.mkPoetryPackages {
inherit python;
projectDir = builtins.path {
path = ./.;
name = "sentinel2_water_extraction_packages";
};
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: {
annotated-types = super.annotated-types.overridePythonAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [self.hatchling];
});
pydantic = super.pydantic.overridePythonAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [self.hatchling self.hatch-fancy-pypi-readme];
});
pydantic-core = super.pydantic-core.override {
preferWheel = true;
};
});
}
5 changes: 4 additions & 1 deletion flooding/sentinel2_water_extraction/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ let
python = import ../../python.nix {
inherit pkgs;
};
poetry2nix = import ../../poetry2nix.nix {
inherit pkgs;
};
poetryPackages = import ./poetryPackages.nix {
inherit pkgs python;
inherit poetry2nix python;
};
in
pkgs.mkShell {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ describe("humanReadableLocalDateTime", function () {
humanReadableLocalDateTime(
"2000-01-01T00:00:00Z",
"en-NZ",
"Pacific/Auckland"
)
"Pacific/Auckland",
),
);
});
it("should support non-New Zealand time zones and locales", function () {
Expand All @@ -25,8 +25,8 @@ describe("humanReadableLocalDateTime", function () {
humanReadableLocalDateTime(
"2000-01-01T00:00:00Z",
"nb-NO",
"Europe/Oslo"
)
"Europe/Oslo",
),
);
});
it("should use defaults for locale and time zone (must run in a Node.js process with `TZ=UTC` and `LC_MESSAGES=C`)", function () {
Expand All @@ -39,13 +39,13 @@ describe("humanReadableLocalDateTime", function () {
}
assertEqual(
"Saturday, January 1, 2000 at 00:00:00",
humanReadableLocalDateTime("2000-01-01T00:00:00Z")
humanReadableLocalDateTime("2000-01-01T00:00:00Z"),
);
});
it("should return 'Invalid Date' for invalid date", function () {
assertEqual(
"Invalid Date",
humanReadableLocalDateTime("not a date/time")
humanReadableLocalDateTime("not a date/time"),
);
});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
14 changes: 11 additions & 3 deletions machine-readable-to-human-readable-date-time/test/mocha.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ body {
}

#mocha {
font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
font:
20px/1.5 "Helvetica Neue",
Helvetica,
Arial,
sans-serif;
margin: 60px 50px;
}

Expand Down Expand Up @@ -208,7 +212,9 @@ body {
display: block;
float: left;
clear: left;
font: 12px/1.5 monaco, monospace;
font:
12px/1.5 monaco,
monospace;
margin: 5px;
padding: 15px;
border: 1px solid var(--mocha-box-shadow-color);
Expand Down Expand Up @@ -250,7 +256,9 @@ body {
display: block;
float: left;
clear: left;
font: 12px/1.5 monaco, monospace;
font:
12px/1.5 monaco,
monospace;
margin: 5px;
padding: 15px;
border: 1px solid var(--mocha-box-shadow-color);
Expand Down
Loading