Skip to content

Commit

Permalink
Merge pull request #2 from georgw777/develop
Browse files Browse the repository at this point in the history
v0.1.3
  • Loading branch information
georg-wolflein authored Dec 16, 2020
2 parents 913d305 + 35b3516 commit d41fc5a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![build](https://github.com/georgw777/recap/workflows/build/badge.svg)

_Recap_ is a tool for providing _REproducible Configurations for Any Project_.
_recap_ is a tool for providing _REproducible Configurations for Any Project_.

Research should be reproducible.
Especially in deep learning, it is important to keep track of hyperparameters and configurations used in experiments.
Expand All @@ -25,7 +25,7 @@ from recap import URI, CfgNode as CN
```

The `CfgNode` is a subclass of [yacs](https://github.com/rbgirshick/yacs)' `CfgNode`.
It provides some additional features for parsing configurations that are inherited between files which is not possible with [yacs](https://github.com/rbgirshick/yacs).
It provides some additional features for parsing configurations that are inherited between files which is not possible with yacs.

Recap's `URI` class provides a mechanism for handling logical paths within your project more conveniently with an interface that is fully compatible with `pathlib.Path`.

Expand Down
54 changes: 35 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "recap"
version = "0.1.2"
version = "0.1.3"
description = "Reproducible configurations for any project"
authors = ["Georg Wölflein <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -23,7 +23,7 @@ include = [
]

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.6"
yacs = "^0.1.8"
pyyaml = "^5.3.1"

Expand Down
3 changes: 1 addition & 2 deletions recap/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import annotations
import os
from typing import Dict, Any
from pathlib import Path
Expand Down Expand Up @@ -26,7 +25,7 @@ def ensure_cfgnode(item):
super().__init__(init_dict=init_dict, key_list=key_list, new_allowed=new_allowed)

@classmethod
def load_yaml_with_base(cls, filename: os.PathLike) -> CfgNode:
def load_yaml_with_base(cls, filename: os.PathLike) -> "CfgNode":
uri = URI(filename)
with uri.open("r") as f:
cfg = cls.load_cfg(f)
Expand Down
3 changes: 1 addition & 2 deletions recap/path_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import annotations
from pathlib import Path, PurePath, _PosixFlavour
from typing import Callable
import logging
Expand Down Expand Up @@ -66,7 +65,7 @@ def resolve(self, path: os.PathLike) -> Path:
else:
return Path(path.path)

def register_handler(self, scheme: str) -> Callable:
def register_handler(self, scheme: str) -> callable:
def decorator(func: Callable[[os.PathLike], Path]):
self._handlers[scheme] = func
logger.debug(f"Registered path handler for scheme {scheme}")
Expand Down

0 comments on commit d41fc5a

Please sign in to comment.