Skip to content

Commit

Permalink
Task does not return package with to_dict; update tox ini
Browse files Browse the repository at this point in the history
  • Loading branch information
tillbiskup committed Oct 8, 2021
1 parent 14b4260 commit 1fbded9
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 10 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ include VERSION
# Include the LICENSE
include LICENSE*

# Include mapper recipes
include aspecd/*_mapper.yaml
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.0.dev24
0.4.0.dev25
2 changes: 1 addition & 1 deletion aspecd/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ def __init__(self, recipe=None):
self.apply_to = []
self.recipe = recipe
self._module = ''
self._exclude_from_to_dict = ['recipe']
self._exclude_from_to_dict = ['recipe', 'package']
self._task = None

def from_dict(self, dict_=None):
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Version 0.4.0

Not yet released

**Note**: Starting with this release ASpecD requires **Python >= 3.6**.
**Note**: Starting with this release ASpecD requires **Python >= 3.7**.

New features
------------
Expand Down
4 changes: 1 addition & 3 deletions docs/roadmap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ A few ideas how to develop the project further, currently a list as a reminder f
For version 0.4
===============

* Recipe-driven data analysis

* Properly handle history of single processing steps for multiple datasets when parameters are written during processing
* Handling of mapper recipe (from package source, not from directory)


For version 0.5
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def read(fname):
],
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand Down Expand Up @@ -65,4 +64,5 @@ def read(fname):
'serve = aspecd.tasks:serve',
],
},
include_package_data=True,
)
1 change: 0 additions & 1 deletion tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ def test_import_version_0_1_converts_to_current_version(self):
recipe.settings['default_package'])
self.assertEqual(self.recipe_dict['autosave_plots'],
recipe.settings['autosave_plots'])
print(recipe.directories)
self.assertEqual(self.recipe_dict['output_directory'],
recipe.directories['output'])
self.assertEqual(self.recipe_dict['datasets_source_directory'],
Expand Down
5 changes: 4 additions & 1 deletion tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,10 @@ def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.task, 'to_dict'))
self.assertTrue(callable(self.task.to_dict))

def test_to_dict_does_not_contain_package_key(self):
dict_ = self.task.to_dict()
self.assertNotIn('package', dict_)

def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.task, 'from_dict'))
self.assertTrue(callable(self.task.from_dict))
Expand Down Expand Up @@ -2801,7 +2805,6 @@ def test_has_verbose_argument(self):

def test_verbose_argument_has_description(self):
result = subprocess.run(["serve", "-h"], capture_output=True, text=True)
print(result.stdout)
self.assertIn("-v, --verbose show debug output", result.stdout)

def test_verbose_and_quite_arguments_are_mutually_exclusive(self):
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
# It is better/only works to run tox from outside PyCharm!

[tox]
envlist = py35, py36, py37, py38, py39
envlist = py37, py38, py39

[testenv]
deps = -rrequirements.txt
changedir = tests
commands =
# pip install --upgrade pip
pip install -e ..
python -V
python -m unittest discover -s . -t .
Expand Down

0 comments on commit 1fbded9

Please sign in to comment.