first commit

This commit is contained in:
2024-07-31 17:12:24 +01:00
commit 5793e08674
10 changed files with 249 additions and 0 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake --impure

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
# python generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info
# venv
.venv

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.12.4

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# pbf-savefile
Development of a simple, experimental save file format for powder bed fusion datasets.

60
flake.lock generated Normal file
View File

@@ -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
}

34
flake.nix Normal file
View File

@@ -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
];
};
}
);
}

26
pyproject.toml Normal file
View File

@@ -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"]

59
requirements-dev.lock Normal file
View File

@@ -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

53
requirements.lock Normal file
View File

@@ -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

View File

@@ -0,0 +1,2 @@
def hello() -> str:
return "Hello from pbf-savefile!"