version info
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = scgenerator
|
||||
version = 0.0.1
|
||||
version = 0.1.0
|
||||
description = Simulated PCFs and supercontinuum generation !
|
||||
author = Benoit Sierro
|
||||
author_email = benoit.sierro@iap.unibe.ch
|
||||
|
||||
@@ -4,3 +4,5 @@ from .math import abs2, argclosest, span
|
||||
from .physics import fiber, materials, pulse, simulate, units
|
||||
from .physics.simulate import RK4IP, new_simulation, resume_simulations
|
||||
from .plotting import plot_avg, plot_results_1D, plot_results_2D, plot_spectrogram
|
||||
|
||||
__version__ = "0.1.0"
|
||||
@@ -1,24 +1,24 @@
|
||||
import itertools
|
||||
import os
|
||||
from datetime import datetime
|
||||
from typing import Any, Dict, Generator, List, Sequence, Tuple
|
||||
import shutil
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Generator, List, Sequence, Tuple
|
||||
|
||||
import numpy as np
|
||||
import pkg_resources as pkg
|
||||
import toml
|
||||
from pathlib import Path
|
||||
import itertools
|
||||
|
||||
from . import utils, env
|
||||
from . import __version__, env, utils
|
||||
from .const import (
|
||||
ENVIRON_KEY_BASE,
|
||||
PARAM_FN,
|
||||
PARAM_SEPARATOR,
|
||||
PBAR_POLICY,
|
||||
TMP_FOLDER_KEY_BASE,
|
||||
SPEC1_FN,
|
||||
SPECN_FN,
|
||||
TMP_FOLDER_KEY_BASE,
|
||||
Z_FN,
|
||||
PARAM_FN,
|
||||
)
|
||||
from .errors import IncompleteDataFolderError
|
||||
from .logger import get_logger
|
||||
@@ -65,11 +65,6 @@ class Paths:
|
||||
with open(cls.get(key)) as file:
|
||||
return file.read()
|
||||
|
||||
@staticmethod
|
||||
def tmp(task_id=0):
|
||||
suffix = "" if task_id == 0 else str(task_id)
|
||||
return ".scgenerator_tmp" + suffix
|
||||
|
||||
@classmethod
|
||||
def plot(cls, name):
|
||||
"""returns the paths to the specified plot. Used to save new plot
|
||||
@@ -161,6 +156,7 @@ def save_parameters(param_dict: Dict[str, Any], destination_dir: Path) -> Path:
|
||||
|
||||
param = prepare_for_serialization(param)
|
||||
param["datetime"] = datetime.now()
|
||||
param["version"] = __version__
|
||||
|
||||
file_path.parent.mkdir(exist_ok=True)
|
||||
|
||||
@@ -528,4 +524,4 @@ def ensure_folder(path: Path, prevent_overwrite: bool = True) -> Path:
|
||||
if not path.is_file() and (not prevent_overwrite or not path.is_dir()):
|
||||
path.mkdir(exist_ok=True)
|
||||
return path
|
||||
path = path.parent / (folder_name + f"_{i}")
|
||||
path = path.parent / (folder_name + f"_{i}")
|
||||
|
||||
Reference in New Issue
Block a user