Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
99db14e
introduce black
altendky Jul 2, 2021
e0c172d
shift check-format to the test ci job
altendky Jul 2, 2021
9fe57ac
"end of day" multiple plotters commit
altendky Jul 11, 2021
901a619
add a bunch more new-style log parsing
altendky Jul 11, 2021
e03dc38
log identification
altendky Jul 12, 2021
f4e0249
process command line identification
altendky Jul 12, 2021
e7b8c2b
Merge branch 'development' into black
altendky Jul 12, 2021
76cbd28
process command line parsing
altendky Jul 13, 2021
d87388b
fixup
altendky Jul 13, 2021
636e179
Merge branch 'development' into multiple_plotters
altendky Jul 13, 2021
9e74cd6
remove commented out code
altendky Jul 13, 2021
44202ba
add test cases
altendky Jul 13, 2021
5e74dc6
switch over is_plotting_command_line
altendky Jul 14, 2021
2700dce
more command line parsing testing
altendky Jul 14, 2021
af15ce0
cover existing test cases
altendky Jul 14, 2021
adadf9d
switch actual command line parsing to new style
altendky Jul 14, 2021
f734ff4
Merge branch 'development' into multiple_plotters
altendky Jul 15, 2021
fa4bc91
remove old command line parser
altendky Jul 15, 2021
235a978
catch up with latest chia network command line parsers
altendky Jul 15, 2021
4adce4a
update madMAx command line parser
altendky Jul 15, 2021
0a4b250
mypy
altendky Jul 16, 2021
9842204
Merge branch 'development' into black
altendky Jul 16, 2021
4541c53
Cleanup plot log / send disk_space to separate log
graemes Jul 17, 2021
523960e
Log cli to root log
graemes Jul 18, 2021
feae5e6
str int
graemes Jul 18, 2021
f75faf1
Disable disk space propagation
graemes Jul 18, 2021
f8bfec6
Log plot progress to root log
graemes Jul 18, 2021
3434083
Add function prefix
graemes Jul 18, 2021
3860aff
Track archiving more effectively
graemes Jul 18, 2021
01b71c9
Change archive daemon polling to system setting
graemes Jul 18, 2021
128a0c4
Fix archive log
graemes Jul 18, 2021
23cbc35
Add Changelog entry
graemes Jul 18, 2021
d1e483e
update with more complete logs for parsing
altendky Jul 19, 2021
97cd21b
Merge branch 'development' into multiple_plotters
altendky Jul 19, 2021
3cfb084
Merge branch 'development' into multiple_plotters
altendky Jul 25, 2021
bb816da
Merge branch 'development' into multiple_plotters
altendky Jul 25, 2021
d5c9e4e
replace the guts of Job
altendky Jul 25, 2021
706c14d
move to plotman.plotters.chianetwork.parse_chia_plot_time()
altendky Jul 26, 2021
bf5ea40
drop log_parser and plotinfo
altendky Jul 27, 2021
c1d9051
move the cli parser definitions
altendky Jul 27, 2021
958b997
various fixup
altendky Jul 29, 2021
e83a7a4
test chia phase for every line
altendky Jul 31, 2021
6ef44e2
verify marked ciha plots marked log file
altendky Jul 31, 2021
d4042ff
test madmax log phases per line
altendky Aug 1, 2021
3549859
misc
altendky Aug 23, 2021
0632224
mypy
altendky Aug 23, 2021
ca22ced
back to just strings
altendky Aug 23, 2021
0df7c84
cleanup and madmax -k/--size parsing
altendky Aug 24, 2021
198dafa
fixup and sorting of dicts for testing comparison
altendky Aug 24, 2021
3b88e0f
misc
altendky Aug 28, 2021
fa4f740
actually capture plot id from madmax logs
altendky Aug 28, 2021
3dfb193
mypy
altendky Aug 28, 2021
d933b5e
more tidying
altendky Aug 28, 2021
a5a0e40
mypy
altendky Aug 28, 2021
3506453
Merge branch 'development' into multiple_plotters
altendky Aug 28, 2021
9270857
Merge branch 'development' into logging
altendky Aug 28, 2021
ecbb472
Update CHANGELOG.md
altendky Aug 29, 2021
f672659
Merge pull request #878 from graemes/logging
altendky Aug 29, 2021
4babe92
Merge branch 'development' into multiple_plotters
altendky Aug 29, 2021
0fef2e9
Merge pull request #850 from altendky/multiple_plotters
altendky Aug 29, 2021
1eb323e
Merge branch 'development' into black
altendky Aug 29, 2021
c40b421
black
altendky Aug 29, 2021
706fefc
mypy (black)
altendky Aug 29, 2021
77a86d2
undo some extra ci tweaks
altendky Aug 29, 2021
a9b6fe0
black == 21.7b0
altendky Aug 29, 2021
8da07d3
undo some extra ci tweaks
altendky Aug 29, 2021
bc48154
Merge pull request #821 from altendky/black
altendky Aug 29, 2021
ece1247
move plot command line creation to plotter modules
altendky Aug 29, 2021
b478a14
Merge branch 'development' into nikwl/development
altendky Aug 29, 2021
a8039dd
black
altendky Aug 29, 2021
b55fb57
tidy
altendky Aug 29, 2021
2d6f2fa
some test coverage
altendky Aug 29, 2021
0acc490
Merge pull request #915 from altendky/plot_command_line_creation
altendky Aug 29, 2021
2b356f5
Merge branch 'development' into nikwl_development
altendky Aug 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ jobs:
python:
name: CPython 3.8
action: 3.8
- task:
name: Check format
tox: check-format
os:
name: Linux
runs-on: ubuntu-latest
python:
name: CPython 3.8
action: 3.8


env:
Expand Down
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#885](https://github.com/ericaltendorf/plotman/pull/885))
- `supervisord` now used in Docker image.
([#898](https://github.com/ericaltendorf/plotman/pull/898))
- `plotman graph` command to create a matplotlib plot for completed
plots ([#612](https://github.com/ericaltendorf/plotman/pull/612)).
Creates a graph image showing plots over time, average plot rage,
average plot time, and total number of plots over time.
- Output same entries to plotman.log from 'plotman interactive' and ' plotman plot/archive' "daemons".
([#878](https://github.com/ericaltendorf/plotman/pull/878))
- `plotman graph` command to create a matplotlib plot for completed plots.
Creates a graph image showing plots over time, average plot rate, average plot time, and total number of plots over time.
([#612](https://github.com/ericaltendorf/plotman/pull/612))

## [0.5.1] - 2021-07-15
### Fixed
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.black]
target-version = ['py36', 'py37', 'py38', 'py39']
include = '''
^/(
setup.py
| src/plotman/.*\.pyi?
)$
'''
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ test =
pytest-cov
pyfakefs
checks =
black == 21.7b0
check-manifest ~= 0.46
mypy == 0.902
types-pkg_resources ~= 0.1.2
Expand Down
5 changes: 3 additions & 2 deletions src/plotman/_tests/archive_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@


def test_compute_priority() -> None:
assert (archive.compute_priority( job.Phase(major=3, minor=1), 1000, 10) >
archive.compute_priority( job.Phase(major=3, minor=6), 1000, 10) )
assert archive.compute_priority(
job.Phase(major=3, minor=1), 1000, 10
) > archive.compute_priority(job.Phase(major=3, minor=6), 1000, 10)
52 changes: 34 additions & 18 deletions src/plotman/_tests/configuration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,30 @@
from plotman import resources as plotman_resources


@pytest.fixture(name='config_text')
@pytest.fixture(name="config_text")
def config_text_fixture() -> str:
return importlib.resources.read_text(plotman_resources, "plotman.yaml")


@pytest.fixture(name='target_definitions_text')
@pytest.fixture(name="target_definitions_text")
def target_definitions_text_fixture() -> str:
return importlib.resources.read_text(
plotman_resources, "target_definitions.yaml",
plotman_resources,
"target_definitions.yaml",
)


def test_get_validated_configs__default(config_text: str, target_definitions_text: str) -> None:
def test_get_validated_configs__default(
config_text: str, target_definitions_text: str
) -> None:
"""Check that get_validated_configs() works with default/example plotman.yaml file."""
res = configuration.get_validated_configs(config_text, '', target_definitions_text)
res = configuration.get_validated_configs(config_text, "", target_definitions_text)
assert isinstance(res, configuration.PlotmanConfig)

def test_get_validated_configs__malformed(config_text: str, target_definitions_text: str) -> None:

def test_get_validated_configs__malformed(
config_text: str, target_definitions_text: str
) -> None:
"""Check that get_validated_configs() raises exception with invalid plotman.yaml contents."""
loaded_yaml = yaml.load(config_text, Loader=yaml.SafeLoader)

Expand All @@ -34,71 +40,81 @@ def test_get_validated_configs__malformed(config_text: str, target_definitions_t
malformed_config_text = yaml.dump(loaded_yaml, Dumper=yaml.SafeDumper)

with pytest.raises(configuration.ConfigurationException) as exc_info:
configuration.get_validated_configs(malformed_config_text, '/the_path', target_definitions_text)
configuration.get_validated_configs(
malformed_config_text, "/the_path", target_definitions_text
)

assert exc_info.value.args[0] == f"Config file at: '/the_path' is malformed"


def test_get_validated_configs__missing() -> None:
"""Check that get_validated_configs() raises exception when plotman.yaml does not exist."""
with pytest.raises(configuration.ConfigurationException) as exc_info:
configuration.read_configuration_text('/invalid_path')
configuration.read_configuration_text("/invalid_path")

assert exc_info.value.args[0] == (
f"No 'plotman.yaml' file exists at expected location: '/invalid_path'. To generate "
f"default config file, run: 'plotman config generate'"
)


def test_loads_without_user_interface(config_text: str, target_definitions_text: str) -> None:
def test_loads_without_user_interface(
config_text: str, target_definitions_text: str
) -> None:
loaded_yaml = yaml.load(config_text, Loader=yaml.SafeLoader)

del loaded_yaml["user_interface"]

stripped_config_text = yaml.dump(loaded_yaml, Dumper=yaml.SafeDumper)

reloaded_yaml = configuration.get_validated_configs(stripped_config_text, '', target_definitions_text)
reloaded_yaml = configuration.get_validated_configs(
stripped_config_text, "", target_definitions_text
)

assert reloaded_yaml.user_interface == configuration.UserInterface()


def test_loads_without_user_archiving(config_text: str, target_definitions_text: str) -> None:
def test_loads_without_user_archiving(
config_text: str, target_definitions_text: str
) -> None:
loaded_yaml = yaml.load(config_text, Loader=yaml.SafeLoader)

del loaded_yaml["archiving"]

stripped_config_text = yaml.dump(loaded_yaml, Dumper=yaml.SafeDumper)

reloaded_yaml = configuration.get_validated_configs(stripped_config_text, '', target_definitions_text)
reloaded_yaml = configuration.get_validated_configs(
stripped_config_text, "", target_definitions_text
)

assert reloaded_yaml.archiving is None


def test_get_dst_directories_gets_dst() -> None:
tmp = ['/tmp']
dst = ['/dst0', '/dst1']
tmp = ["/tmp"]
dst = ["/dst0", "/dst1"]
directories = configuration.Directories(tmp=tmp, dst=dst)

assert directories.get_dst_directories() == dst


def test_get_dst_directories_gets_tmp() -> None:
tmp = ['/tmp']
tmp = ["/tmp"]
directories = configuration.Directories(tmp=tmp)

assert directories.get_dst_directories() == tmp


def test_dst_is_dst() -> None:
tmp = ['/tmp']
dst = ['/dst0', '/dst1']
tmp = ["/tmp"]
dst = ["/dst0", "/dst1"]
directories = configuration.Directories(tmp=tmp, dst=dst)

assert not directories.dst_is_tmp()


def test_dst_is_tmp() -> None:
tmp = ['/tmp']
tmp = ["/tmp"]
directories = configuration.Directories(tmp=tmp)

assert directories.dst_is_tmp()
147 changes: 0 additions & 147 deletions src/plotman/_tests/job_test.py

This file was deleted.

Loading