From 673dc2a2002a7b92e88b606831acb99b544665ee Mon Sep 17 00:00:00 2001 From: tvhahn Date: Sat, 10 Feb 2024 22:47:00 -0800 Subject: [PATCH] Update code and dependencies --- notebooks/scratch/get_hash.ipynb | 30 ++++++++++++++++++------------ pyproject.toml | 28 +++++++++++++++++++++++++--- src/pyphm/datasets/milling.py | 5 +++-- 3 files changed, 46 insertions(+), 17 deletions(-) diff --git a/notebooks/scratch/get_hash.ipynb b/notebooks/scratch/get_hash.ipynb index 590545f..0056dbf 100644 --- a/notebooks/scratch/get_hash.ipynb +++ b/notebooks/scratch/get_hash.ipynb @@ -2,18 +2,24 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The autoreload extension is already loaded. To reload it, use:\n", + " %reload_ext autoreload\n" + ] + } + ], "source": [ "import hashlib\n", "from pathlib import Path\n", "import pandas as pd\n", - "import os\n", - "import numpy as np\n", - "import time\n", - "import datetime\n", - "import h5py\n", + "from pyphm.datasets.utils import calculate_md5, check_md5\n", + "\n", "\n", "%load_ext autoreload\n", "%autoreload 2" @@ -21,22 +27,22 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "c:\\_Python\\PyPHM\n", - "c:\\_Python\\PyPHM\\data\\raw\\airbus\n" + "/home/tim/Documents/PyPHM/notebooks\n", + "/home/tim/Documents/PyPHM/notebooks/data/raw/airbus\n" ] } ], "source": [ "root_dir = Path.cwd().parent\n", "print(root_dir)\n", - "path_data_raw_folder = Path(root_dir / 'data/raw/airbus/' )\n", + "path_data_raw_folder = Path(root_dir / 'data/raw/milling/' )\n", "print(path_data_raw_folder)" ] }, @@ -73,7 +79,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.12" + "version": "3.11.7" }, "orig_nbformat": 4 }, diff --git a/pyproject.toml b/pyproject.toml index 11a8c9b..bb75a3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,10 +3,32 @@ name = "pyphm" version = "0.0.5" description = "Machinery data, made easy" requires-python = ">=3.6" +readme = "README.md" +authors = [ + { name = "Tim von Hahn", email = "t.vonhahn@queensu.ca" }, +] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +dependencies = [ + "pandas", + "numpy", + "py7zr", + "rarfile", + "tqdm", + "scipy", + "requests", + "h5py", + "tables", + "gdown" +] -[build-system] -requires = ["setuptools>=42", "wheel"] -build-backend = "setuptools.build_meta" +[project.urls] +Homepage = "https://github.com/tvhahn/PyPHM" +Repository = "https://github.com/tvhahn/PyPHM" +Documentation = "https://github.com/tvhahn/PyPHM" [project.optional-dependencies] doc = ["sphinx~=4.4.0", "myst-parser"] diff --git a/src/pyphm/datasets/milling.py b/src/pyphm/datasets/milling.py index e0b7b47..e7f329f 100644 --- a/src/pyphm/datasets/milling.py +++ b/src/pyphm/datasets/milling.py @@ -38,13 +38,14 @@ class MillingDataLoad(PHMDataset): """ mirrors = [ + "https://phm-datasets.s3.amazonaws.com/NASA/", # "https://github.com/tvhahn/ml-tool-wear/raw/master/data/raw/", "https://drive.google.com/file/d/1_4Hm8RO_7Av1LzGtFnhx6cIN-zi-W40j/view?usp=sharing", - # "https://ti.arc.nasa.gov/m/project/prognostic-repository/" ] resources = [ - ("mill.zip", "81d821fdef812183a7d38b6f83f7cefa"), + ("3.+Milling.zip", "4da3afb0aa50cb3dcdd8e20ed1ed1c7c"), + ("mill.zip", "81d821fdef812183a7d38b6f83f7cefa"), ] def __init__(