Skip to content

Commit

Permalink
Merge pull request #16 from dtxe/main
Browse files Browse the repository at this point in the history
lesson 5 and assignment template
  • Loading branch information
danielrazavi authored Feb 15, 2024
2 parents 988721b + 203099b commit f966063
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 0 deletions.
37 changes: 37 additions & 0 deletions assignments/assignment_template/Analysis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from typing import Any, Optional
import matplotlib.pyplot as plt
import yaml
import requests


class Analysis():

def __init__(self, analysis_config: str) -> None:
CONFIG_PATHS = ['configs/system_config.yml', 'configs/user_config.yml']

# add the analysis config to the list of paths to load
paths = CONFIG_PATHS + [analysis_config]

# initialize empty dictionary to hold the configuration
config = {}

# load each config file and update the config dictionary
for path in paths:
with open(path, 'r') as f:
this_config = yaml.safe_load(f)
config.update(this_config)

self.config = config

def load_data(self) -> None:
print(self.config['figure_title'])

def compute_analysis(self) -> Any:
pass

def plot_data(self, save_path: Optional[str] = None) -> plt.Figure:
pass

def notify_done(self, message: str) -> None:
pass

Empty file.
18 changes: 18 additions & 0 deletions assignments/assignment_template/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = ""
authors = [
{name = "", email = ""},
]
description = ""
version = "0.1.0"
dependencies = [""]
requires-python = ">=3.11.0"
readme = "README.md"
classifiers = [
"License :: OSI Approved :: MIT License",
]

Empty file.
Empty file.
Binary file not shown.

0 comments on commit f966063

Please sign in to comment.