version info

This commit is contained in:
Benoît Sierro
2021-06-07 09:46:53 +02:00
parent 7c0daa0787
commit e657290120
3 changed files with 12 additions and 14 deletions

View File

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

View File

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

View File

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