commit 5793e086749cdb1333b26735158f13f2dfbdcd1b Author: Cian Hughes Date: Wed Jul 31 17:12:24 2024 +0100 first commit diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..2f8e1d3 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake --impure diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae8554d --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# python generated files +__pycache__/ +*.py[oc] +build/ +dist/ +wheels/ +*.egg-info + +# venv +.venv diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..455808f --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.12.4 diff --git a/README.md b/README.md new file mode 100644 index 0000000..8ecabfa --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# pbf-savefile + +Development of a simple, experimental save file format for powder bed fusion datasets. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..40ddd13 --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1722441592, + "narHash": "sha256-kSeEfgBdjk6QLx3m1126CDx+4FZpauzfeSgAwFiEplY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4cb20719871d4c0e5f1edbca8b287d83e2ae88ca", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..10c4c9c --- /dev/null +++ b/flake.nix @@ -0,0 +1,34 @@ +{ + inputs = { + utils.url = "github:numtide/flake-utils"; + }; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs"; + + outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + system = "x86_64-linux"; + config = { + allowUnfree = true; + cudaSupport = true; + }; + }; + in + { + devShell = pkgs.mkShell + { + NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ + pkgs.stdenv.cc.cc + ]; + NIX_LD = pkgs.lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; + + buildInputs = with pkgs; [ + rye + uv + ]; + }; + } + ); +} + diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c5ed203 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,26 @@ +[project] +name = "pbf-savefile" +version = "0.1.0" +description = "An experimental package for developing a savefile format for PBF data." +authors = [{ name = "Cian Hughes", email = "chughes000@gmail.com" }] +dependencies = [ + "dask[dataframe]>=2024.7.1", + "fsspec>=2024.6.1", + "flatbuffers>=24.3.25", +] +readme = "README.md" +requires-python = ">= 3.8" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.rye] +managed = true +dev-dependencies = ["pytest>=8.3.2"] + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["src/pbf_savefile"] diff --git a/requirements-dev.lock b/requirements-dev.lock new file mode 100644 index 0000000..a954466 --- /dev/null +++ b/requirements-dev.lock @@ -0,0 +1,59 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false + +-e file:. +click==8.1.7 + # via dask +cloudpickle==3.0.0 + # via dask +dask==2024.7.1 + # via dask-expr + # via pbf-savefile +dask-expr==1.1.9 + # via dask +flatbuffers==24.3.25 + # via pbf-savefile +fsspec==2024.6.1 + # via dask + # via pbf-savefile +iniconfig==2.0.0 + # via pytest +locket==1.0.0 + # via partd +numpy==2.0.1 + # via dask + # via pandas + # via pyarrow +packaging==24.1 + # via dask + # via pytest +pandas==2.2.2 + # via dask + # via dask-expr +partd==1.4.2 + # via dask +pluggy==1.5.0 + # via pytest +pyarrow==17.0.0 + # via dask-expr +pytest==8.3.2 +python-dateutil==2.9.0.post0 + # via pandas +pytz==2024.1 + # via pandas +pyyaml==6.0.1 + # via dask +six==1.16.0 + # via python-dateutil +toolz==0.12.1 + # via dask + # via partd +tzdata==2024.1 + # via pandas diff --git a/requirements.lock b/requirements.lock new file mode 100644 index 0000000..61d2808 --- /dev/null +++ b/requirements.lock @@ -0,0 +1,53 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false + +-e file:. +click==8.1.7 + # via dask +cloudpickle==3.0.0 + # via dask +dask==2024.7.1 + # via dask-expr + # via pbf-savefile +dask-expr==1.1.9 + # via dask +flatbuffers==24.3.25 + # via pbf-savefile +fsspec==2024.6.1 + # via dask + # via pbf-savefile +locket==1.0.0 + # via partd +numpy==2.0.1 + # via dask + # via pandas + # via pyarrow +packaging==24.1 + # via dask +pandas==2.2.2 + # via dask + # via dask-expr +partd==1.4.2 + # via dask +pyarrow==17.0.0 + # via dask-expr +python-dateutil==2.9.0.post0 + # via pandas +pytz==2024.1 + # via pandas +pyyaml==6.0.1 + # via dask +six==1.16.0 + # via python-dateutil +toolz==0.12.1 + # via dask + # via partd +tzdata==2024.1 + # via pandas diff --git a/src/pbf_savefile/__init__.py b/src/pbf_savefile/__init__.py new file mode 100644 index 0000000..77dff57 --- /dev/null +++ b/src/pbf_savefile/__init__.py @@ -0,0 +1,2 @@ +def hello() -> str: + return "Hello from pbf-savefile!"