Skip to content

Extend configuration space to act as mapping#191

Merged
mfeurer merged 6 commits intomasterfrom
extend_configuration_space_to_act_as_mapping
Sep 1, 2021
Merged

Extend configuration space to act as mapping#191
mfeurer merged 6 commits intomasterfrom
extend_configuration_space_to_act_as_mapping

Conversation

@eddiebergman
Copy link
Copy Markdown
Contributor

@eddiebergman eddiebergman commented Sep 1, 2021

This PR extends ConfigurationSpace and Configuration classes to implement the Mapping interface . This makes them behave more like dictionaries, extending their functionality to allow config.items(), config.values() as well as features such as unpacking mydict = {**config}.

This PR also removes an old flake8 package which did not seem to do anything and which has now been replaced with native functionality in flake8.

Lastly, it renames a file that tested an irace writer which no longer seems to exist. This was renamed to that pytest will skip this file during its running.

There are 3 tests added, 2 to test the functionality described for Configuration and ConfigurationSpace and 1 to ensure the order of hyperparemeters for a Config matches those of the ConfigSpace, as advertised in the doc string.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 1, 2021

Codecov Report

Merging #191 (170229e) into master (1a23bd5) will increase coverage by 42.21%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #191       +/-   ##
===========================================
+ Coverage   24.11%   66.33%   +42.21%     
===========================================
  Files          17       17               
  Lines        1613     1613               
===========================================
+ Hits          389     1070      +681     
+ Misses       1224      543      -681     
Impacted Files Coverage Δ
ConfigSpace/nx/classes/graph.py 24.17% <0.00%> (+4.96%) ⬆️
ConfigSpace/nx/algorithms/dag.py 45.91% <0.00%> (+5.10%) ⬆️
ConfigSpace/nx/classes/digraph.py 39.57% <0.00%> (+11.06%) ⬆️
ConfigSpace/read_and_write/json.py 86.60% <0.00%> (+66.02%) ⬆️
ConfigSpace/read_and_write/pcs.py 85.47% <0.00%> (+70.95%) ⬆️
ConfigSpace/read_and_write/pcs_new.py 88.00% <0.00%> (+74.76%) ⬆️
...ace/nx/algorithms/components/strongly_connected.py 97.87% <0.00%> (+87.23%) ⬆️
ConfigSpace/nx/algorithms/cycles.py 100.00% <0.00%> (+89.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a23bd5...170229e. Read the comment docs.

@mfeurer mfeurer merged commit df0737a into master Sep 1, 2021
@mfeurer mfeurer deleted the extend_configuration_space_to_act_as_mapping branch September 1, 2021 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants