From 00e1af45ccad5e56cfa2bfda717df6082422f99c Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 11 Jan 2024 11:51:11 -0800 Subject: [PATCH 01/11] Rename env file To better reflect purpose --- ...nvironment-notebooks.yml => environment-pyiron_atomistics.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .ci_support/{environment-notebooks.yml => environment-pyiron_atomistics.yml} (100%) diff --git a/.ci_support/environment-notebooks.yml b/.ci_support/environment-pyiron_atomistics.yml similarity index 100% rename from .ci_support/environment-notebooks.yml rename to .ci_support/environment-pyiron_atomistics.yml From 1e74847317b5fcb9af7ca5f89075cfa34a467bd6 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 11 Jan 2024 11:55:33 -0800 Subject: [PATCH 02/11] Test python in the readme --- tests/integration/test_readme.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/integration/test_readme.py diff --git a/tests/integration/test_readme.py b/tests/integration/test_readme.py new file mode 100644 index 0000000..443de9b --- /dev/null +++ b/tests/integration/test_readme.py @@ -0,0 +1,20 @@ +import doctest +import unittest + + +def load_tests(loader, tests, ignore): + tests.addTests(doctest.DocFileSuite("../../docs/README.md")) + return tests + + +class TestTriggerFromIDE(unittest.TestCase): + """ + Just so we can instruct it to run unit tests here with a gui run command on the file + """ + + def test_void(self): + pass + + +if __name__ == '__main__': + unittest.main() From 4d5a749a28b1b63b0054384626025e8e0e5fbc9b Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 11 Jan 2024 11:56:06 -0800 Subject: [PATCH 03/11] Include the atomistics env in the tests Particularly for the README examples test, which explicitly imports `pyiron_atomistics.Project` --- .github/workflows/daily.yml | 2 ++ .github/workflows/push-pull.yml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 2c0978c..5b0309c 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -10,3 +10,5 @@ jobs: Tests-and-Coverage: uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@main secrets: inherit + with: + tests-env-files: .ci_support/environment.yml .ci_support/environment-pyiron_atomistics.yml diff --git a/.github/workflows/push-pull.yml b/.github/workflows/push-pull.yml index 021fee7..ebbc1db 100644 --- a/.github/workflows/push-pull.yml +++ b/.github/workflows/push-pull.yml @@ -12,4 +12,5 @@ jobs: uses: pyiron/actions/.github/workflows/push-pull-main.yml@main secrets: inherit with: - notebooks-env-files: .ci_support/environment.yml .ci_support/environment-notebooks.yml \ No newline at end of file + notebooks-env-files: .ci_support/environment.yml .ci_support/environment-pyiron_atomistics.yml + tests-env-files: .ci_support/environment.yml .ci_support/environment-pyiron_atomistics.yml \ No newline at end of file From 43e0ff4133ec4aa9cd3142ec9a8c4a9bdfca43c5 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 11 Jan 2024 12:13:13 -0800 Subject: [PATCH 04/11] Format examples so doctest can parse them --- docs/README.md | 467 +++++++++++++++++++++++++------------------------ 1 file changed, 234 insertions(+), 233 deletions(-) diff --git a/docs/README.md b/docs/README.md index 5135a22..f2cc85f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -98,234 +98,232 @@ Here is an example using the `Constructor` class to build a workflow ontology fo You can use it interactively in the demo notebook `pizza.ipynb` ```python -import owlready2 as owl -from pyiron_ontology import Constructor - -c = Constructor('pizza') - -# Knowledge base -with c.onto: - class Flour(c.onto.Generic): pass - class Wheat(Flour): pass - class GlutenFree(Flour): pass - owl.AllDisjoint([GlutenFree, Wheat]) - - class Crust(c.onto.Generic): pass - class Thin(Crust): pass - class Regular(Crust): pass - owl.AllDisjoint([Thin, Regular]) - class Stuffed(Regular): pass - - class Ingredients(c.onto.Generic): pass - class HasVegetables(Ingredients): pass - class HasMushrooms(HasVegetables): pass - class HasPeppers(HasVegetables): pass - class HasMeat(Ingredients): pass - class HasSalami(HasMeat): pass - class HasBacon(HasMeat): pass - class Vegetarian(Ingredients): - equivalent_to = [Ingredients & owl.Not(HasMeat)] - owl.AllDisjoint([Vegetarian, HasMeat]) - - class RawPizza(c.onto.Generic): pass - - class CookedPizza(c.onto.Generic): pass - - owl.AllDisjoint([Flour, Crust, Ingredients, RawPizza, CookedPizza]) - -# Code base -buy_wheat_flour = c.onto.Function("buy_wheat_flour") -buy_wheat_flour_out = c.onto.Output( - "buy_wheat_flour_out", - output_of=buy_wheat_flour, - generic=Wheat() -) - -buy_corn_flour = c.onto.Function("buy_corn_flour") -buy_corn_flour_out = c.onto.Output( - "buy_corn_flour_out", - output_of=buy_corn_flour, - generic=GlutenFree() -) - -make_crust = c.onto.Function("make_crust") -make_crust_inp_flour = c.onto.Input( - name="make_crust_inp_flour", - mandatory_input_of=make_crust, - generic=Flour(), -) -make_crust_out = c.onto.Output( - name="make_crust_out", - output_of=make_crust, - generic=Crust(), -) - -make_thin_crust = c.onto.Function("make_thin_crust") -make_thin_crust_inp_flour = c.onto.Input( - name="make_thin_crust_inp_flour", - mandatory_input_of=make_thin_crust, - generic=Flour(), -) -make_thin_crust_out = c.onto.Output( - name="make_thin_crust_out", - output_of=make_thin_crust, - generic=Thin(), -) - -make_gluten_free_crust = c.onto.Function("make_gluten_free_crust") -make_gluten_free_crust_inp_flour = c.onto.Input( - name="make_gluten_free_crust_inp_flour", - mandatory_input_of=make_gluten_free_crust, - generic=GlutenFree(), -) -make_gluten_free_crust_out = c.onto.Output( - name="make_gluten_free_crust_out", - output_of=make_gluten_free_crust, - generic=Crust(), -) - -add_meat = c.onto.Function("add_meat") -add_meat_inp_ingredients = c.onto.Input( - name="add_meat_inp_ingredients", - mandatory_input_of=add_meat, - generic=HasMeat(), -) -add_meat_inp_crust = c.onto.Input( - name="add_meat_inp_crust", - mandatory_input_of=add_meat, - generic=Crust(), - transitive_requirements=[Flour()] -) -add_meat_out = c.onto.Output( - name="add_meat_out", - output_of=add_meat, - generic=RawPizza() -) - -add_vegetables = c.onto.Function("add_vegetables") -add_vegetables_inp_ingredients = c.onto.Input( - name="add_vegetables_inp_ingredients", - mandatory_input_of=add_vegetables, - generic=HasVegetables(), -) -add_vegetables_inp_crust = c.onto.Input( - name="add_vegetables_inp_crust", - mandatory_input_of=add_vegetables, - generic=Crust(), - transitive_requirements=[Flour()] -) -add_vegetables_out = c.onto.Output( - name="add_vegetables_out", - output_of=add_vegetables, - generic=RawPizza() -) - -canadian = c.onto.Function("canadian") -canadian_inp_ingredients = c.onto.Input( - name="canadian_inp_ingredients", - mandatory_input_of=canadian, - generic=Ingredients(is_a=[HasBacon, HasMushrooms]), -) -canadian_inp_crust = c.onto.Input( - name="canadian_inp_crust", - mandatory_input_of=canadian, - generic=Crust(), - transitive_requirements=[Flour()] -) -canadian_out = c.onto.Output( - name="canadian_out", - output_of=canadian, - generic=RawPizza() -) - -bake_for_omnivor = c.onto.Function("bake_for_omnivor") -bake_for_omnivor_inp = c.onto.Input( - name="bake_for_omnivor_inp", - mandatory_input_of=bake_for_omnivor, - generic=RawPizza(), - -) -bake_for_omnivor_out = c.onto.Output( - name="bake_for_omnivor_out", - output_of=bake_for_omnivor, - generic=CookedPizza() -) - -bake_for_vegetarian = c.onto.Function("bake_for_vegetarian") -bake_for_vegetarian_inp = c.onto.Input( - name="bake_for_vegetarian_inp", - mandatory_input_of=bake_for_vegetarian, - generic=RawPizza(), - requirements=[Vegetarian()] -) -bake_for_vegetarian_out = c.onto.Output( - name="bake_for_vegetarian_out", - output_of=bake_for_vegetarian, - generic=CookedPizza() -) - -bake_stuffed_crust = c.onto.Function("bake_stuffed_crust") -bake_stuffed_crust_inp = c.onto.Input( - name="bake_stuffed_crust_inp", - mandatory_input_of=bake_stuffed_crust, - generic=RawPizza(), - requirements=[Stuffed(), Wheat()] -) -bake_stuffed_crust_out = c.onto.Output( - name="bake_stuffed_crust_out", - output_of=bake_stuffed_crust, - generic=CookedPizza() -) - -bake_dietary_restrictions = c.onto.Function("bake_dietary_restrictions") -bake_dietary_restrictions_inp = c.onto.Input( - name="bake_dietary_restrictions_inp", - mandatory_input_of=bake_dietary_restrictions, - generic=RawPizza(), - requirements=[GlutenFree(), Vegetarian()] -) -bake_dietary_restrictions_out = c.onto.Output( - name="bake_dietary_restrictions_out", - output_of=bake_dietary_restrictions, - generic=CookedPizza() -) - -c.sync() - -# Workflow generation -bake_for_vegetarian_out.get_source_tree().render() -``` +>>> import owlready2 as owl +>>> from pyiron_ontology import Constructor +>>> +>>> c = Constructor('pizza') +>>> +>>> # Knowledge base +>>> with c.onto: +... class Flour(c.onto.Generic): pass +... class Wheat(Flour): pass +... class GlutenFree(Flour): pass +... owl.AllDisjoint([GlutenFree, Wheat]) +... +... class Crust(c.onto.Generic): pass +... class Thin(Crust): pass +... class Regular(Crust): pass +... owl.AllDisjoint([Thin, Regular]) +... class Stuffed(Regular): pass +... +... class Ingredients(c.onto.Generic): pass +... class HasVegetables(Ingredients): pass +... class HasMushrooms(HasVegetables): pass +... class HasPeppers(HasVegetables): pass +... class HasMeat(Ingredients): pass +... class HasSalami(HasMeat): pass +... class HasBacon(HasMeat): pass +... class Vegetarian(Ingredients): +... equivalent_to = [Ingredients & owl.Not(HasMeat)] +... owl.AllDisjoint([Vegetarian, HasMeat]) +... +... class RawPizza(c.onto.Generic): pass +... +... class CookedPizza(c.onto.Generic): pass +... +... owl.AllDisjoint([Flour, Crust, Ingredients, RawPizza, CookedPizza]) + AllDisjoint([pizza.GlutenFree, pizza.Wheat]) + AllDisjoint([pizza.Thin, pizza.Regular]) + AllDisjoint([pizza.Vegetarian, pizza.HasMeat]) + AllDisjoint([pizza.Flour, pizza.Crust, pizza.Ingredients, pizza.RawPizza, pizza.CookedPizza]) +>>> +>>> # Code base +>>> buy_wheat_flour = c.onto.Function("buy_wheat_flour") +>>> buy_wheat_flour_out = c.onto.Output( +... "buy_wheat_flour_out", +... output_of=buy_wheat_flour, +... generic=Wheat() +... ) +>>> +>>> buy_corn_flour = c.onto.Function("buy_corn_flour") +>>> buy_corn_flour_out = c.onto.Output( +... "buy_corn_flour_out", +... output_of=buy_corn_flour, +... generic=GlutenFree() +... ) +>>> +>>> make_crust = c.onto.Function("make_crust") +>>> make_crust_inp_flour = c.onto.Input( +... name="make_crust_inp_flour", +... mandatory_input_of=make_crust, +... generic=Flour(), +... ) +>>> make_crust_out = c.onto.Output( +... name="make_crust_out", +... output_of=make_crust, +... generic=Crust(), +... ) +>>> +>>> make_thin_crust = c.onto.Function("make_thin_crust") +>>> make_thin_crust_inp_flour = c.onto.Input( +... name="make_thin_crust_inp_flour", +... mandatory_input_of=make_thin_crust, +... generic=Flour(), +... ) +>>> make_thin_crust_out = c.onto.Output( +... name="make_thin_crust_out", +... output_of=make_thin_crust, +... generic=Thin(), +... ) +>>> make_gluten_free_crust = c.onto.Function("make_gluten_free_crust") +>>> make_gluten_free_crust_inp_flour = c.onto.Input( +... name="make_gluten_free_crust_inp_flour", +... mandatory_input_of=make_gluten_free_crust, +... generic=GlutenFree(), +... ) +>>> make_gluten_free_crust_out = c.onto.Output( +... name="make_gluten_free_crust_out", +... output_of=make_gluten_free_crust, +... generic=Crust(), +... ) +>>> +>>> add_meat = c.onto.Function("add_meat") +>>> add_meat_inp_ingredients = c.onto.Input( +... name="add_meat_inp_ingredients", +... mandatory_input_of=add_meat, +... generic=HasMeat(), +... ) +>>> add_meat_inp_crust = c.onto.Input( +... name="add_meat_inp_crust", +... mandatory_input_of=add_meat, +... generic=Crust(), +... transitive_requirements=[Flour()] +... ) +>>> add_meat_out = c.onto.Output( +... name="add_meat_out", +... output_of=add_meat, +... generic=RawPizza() +... ) +>>> +>>> add_vegetables = c.onto.Function("add_vegetables") +>>> add_vegetables_inp_ingredients = c.onto.Input( +... name="add_vegetables_inp_ingredients", +... mandatory_input_of=add_vegetables, +... generic=HasVegetables(), +... ) +>>> add_vegetables_inp_crust = c.onto.Input( +... name="add_vegetables_inp_crust", +... mandatory_input_of=add_vegetables, +... generic=Crust(), +... transitive_requirements=[Flour()] +... ) +>>> add_vegetables_out = c.onto.Output( +... name="add_vegetables_out", +... output_of=add_vegetables, +... generic=RawPizza() +... ) +>>> +>>> canadian = c.onto.Function("canadian") +>>> canadian_inp_ingredients = c.onto.Input( +... name="canadian_inp_ingredients", +... mandatory_input_of=canadian, +... generic=Ingredients(is_a=[HasBacon, HasMushrooms]), +... ) +>>> canadian_inp_crust = c.onto.Input( +... name="canadian_inp_crust", +... mandatory_input_of=canadian, +... generic=Crust(), +... transitive_requirements=[Flour()] +... ) +>>> canadian_out = c.onto.Output( +... name="canadian_out", +... output_of=canadian, +... generic=RawPizza() +... ) +>>> +>>> bake_for_omnivor = c.onto.Function("bake_for_omnivor") +>>> bake_for_omnivor_inp = c.onto.Input( +... name="bake_for_omnivor_inp", +... mandatory_input_of=bake_for_omnivor, +... generic=RawPizza(), +... ) +>>> bake_for_omnivor_out = c.onto.Output( +... name="bake_for_omnivor_out", +... output_of=bake_for_omnivor, +... generic=CookedPizza() +... ) +>>> +>>> bake_for_vegetarian = c.onto.Function("bake_for_vegetarian") +>>> bake_for_vegetarian_inp = c.onto.Input( +... name="bake_for_vegetarian_inp", +... mandatory_input_of=bake_for_vegetarian, +... generic=RawPizza(), +... requirements=[Vegetarian()] +... ) +>>> bake_for_vegetarian_out = c.onto.Output( +... name="bake_for_vegetarian_out", +... output_of=bake_for_vegetarian, +... generic=CookedPizza() +... ) +>>> +>>> bake_stuffed_crust = c.onto.Function("bake_stuffed_crust") +>>> bake_stuffed_crust_inp = c.onto.Input( +... name="bake_stuffed_crust_inp", +... mandatory_input_of=bake_stuffed_crust, +... generic=RawPizza(), +... requirements=[Stuffed(), Wheat()] +... ) +>>> bake_stuffed_crust_out = c.onto.Output( +... name="bake_stuffed_crust_out", +... output_of=bake_stuffed_crust, +... generic=CookedPizza() +... ) +>>> +>>> bake_dietary_restrictions = c.onto.Function("bake_dietary_restrictions") +>>> bake_dietary_restrictions_inp = c.onto.Input( +... name="bake_dietary_restrictions_inp", +... mandatory_input_of=bake_dietary_restrictions, +... generic=RawPizza(), +... requirements=[GlutenFree(), Vegetarian()] +... ) +>>> bake_dietary_restrictions_out = c.onto.Output( +... name="bake_dietary_restrictions_out", +... output_of=bake_dietary_restrictions, +... generic=CookedPizza() +... ) +>>> +>>> c.sync() +>>> +>>> bake_for_vegetarian_out.get_source_tree().render() + bake_for_vegetarian_out + bake_for_vegetarian + bake_for_vegetarian_inp + add_vegetables_out + add_vegetables + add_vegetables_inp_ingredients + add_vegetables_inp_crust + make_thin_crust_out + make_thin_crust + make_thin_crust_inp_flour + buy_wheat_flour_out + buy_wheat_flour + buy_corn_flour_out + buy_corn_flour + make_gluten_free_crust_out + make_gluten_free_crust + make_gluten_free_crust_inp_flour + buy_corn_flour_out + buy_corn_flour + make_crust_out + make_crust + make_crust_inp_flour + buy_wheat_flour_out + buy_wheat_flour + buy_corn_flour_out + buy_corn_flour -Result: ``` -bake_for_vegetarian_out - bake_for_vegetarian - bake_for_vegetarian_inp - add_vegetables_out - add_vegetables - add_vegetables_inp_ingredients - add_vegetables_inp_crust - make_crust_out - make_crust - make_crust_inp_flour - buy_corn_flour_out - buy_corn_flour - buy_wheat_flour_out - buy_wheat_flour - make_thin_crust_out - make_thin_crust - make_thin_crust_inp_flour - buy_corn_flour_out - buy_corn_flour - buy_wheat_flour_out - buy_wheat_flour - make_gluten_free_crust_out - make_gluten_free_crust - make_gluten_free_crust_inp_flour - buy_corn_flour_out - buy_corn_flour -``` Note: Our `bake_for_vegetarian` has an input requirement `Vegetarian()`, and sure enough we _only_ get workflows that use `add_vegetables` when choosing topings. This function has input specifying the generic as `HasVegetables()`. @@ -338,15 +336,18 @@ Defining all the individuals that map to a (hypothetical) code base is quite ver `pyiron_ontology` also comes with an ontology defined for (a small sub-set of) `pyiron_atomistics`. ```python -import pyiron_ontology as po -from pyiron_ontology import AtomisticsReasoner -from pyiron_atomistics import Project - -onto = po.dynamic.atomistics() -reasoner = AtomisticsReasoner(onto) -pr = Project('your_project_tree_with_loads_of_data') +>>> import pyiron_ontology as po +>>> from pyiron_ontology import AtomisticsReasoner +>>> from pyiron_atomistics import Project +>>> +>>> onto = po.dynamic.atomistics() +>>> reasoner = AtomisticsReasoner(onto) +>>> pr = Project('your_project_tree_with_loads_of_data') +>>> +>>> out = reasoner.search_database_for_property(onto.BulkModulus(), pr) +>>> out.columns +Index(['Chemical Formula', 'atomistics.BulkModulus', 'unit', 'Engine'], dtype='object') -reasoner.search_database_for_property(onto.BulkModulus(), pr) ``` If you have `Murnaghan` jobs in your project, this will return a nice little dataframe. From 4fc1da5ab0bd09da75a7c463cefe38956835b948 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 11 Jan 2024 12:37:16 -0800 Subject: [PATCH 05/11] Render with spaces instead of tabs Tabs are screwing up the example test --- pyiron_ontology/workflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyiron_ontology/workflow.py b/pyiron_ontology/workflow.py index 81f95b2..8d1c4d6 100644 --- a/pyiron_ontology/workflow.py +++ b/pyiron_ontology/workflow.py @@ -17,7 +17,7 @@ def __init__(self, value, parent=None): parent.children.append(self) def render(self, depth=0, order_alphabetically=True): - tabs = "".join(["\t"] * depth) + tabs = "".join([" "] * depth) print(f"{tabs}{self.value.name}") children = ( [self.children[n] for n in argsort([str(c.value) for c in self.children])] From a25c2dac8cfdc71063d189d52dafb0de30b147f1 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 11 Jan 2024 12:37:39 -0800 Subject: [PATCH 06/11] Reformat example output text --- docs/README.md | 53 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/docs/README.md b/docs/README.md index f2cc85f..c5da450 100644 --- a/docs/README.md +++ b/docs/README.md @@ -295,33 +295,32 @@ You can use it interactively in the demo notebook `pizza.ipynb` >>> c.sync() >>> >>> bake_for_vegetarian_out.get_source_tree().render() - bake_for_vegetarian_out - bake_for_vegetarian - bake_for_vegetarian_inp - add_vegetables_out - add_vegetables - add_vegetables_inp_ingredients - add_vegetables_inp_crust - make_thin_crust_out - make_thin_crust - make_thin_crust_inp_flour - buy_wheat_flour_out - buy_wheat_flour - buy_corn_flour_out - buy_corn_flour - make_gluten_free_crust_out - make_gluten_free_crust - make_gluten_free_crust_inp_flour - buy_corn_flour_out - buy_corn_flour - make_crust_out - make_crust - make_crust_inp_flour - buy_wheat_flour_out - buy_wheat_flour - buy_corn_flour_out - buy_corn_flour - +bake_for_vegetarian_out + bake_for_vegetarian + bake_for_vegetarian_inp + add_vegetables_out + add_vegetables + add_vegetables_inp_crust + make_crust_out + make_crust + make_crust_inp_flour + buy_corn_flour_out + buy_corn_flour + buy_wheat_flour_out + buy_wheat_flour + make_gluten_free_crust_out + make_gluten_free_crust + make_gluten_free_crust_inp_flour + buy_corn_flour_out + buy_corn_flour + make_thin_crust_out + make_thin_crust + make_thin_crust_inp_flour + buy_corn_flour_out + buy_corn_flour + buy_wheat_flour_out + buy_wheat_flour + add_vegetables_inp_ingredients ``` From 2a5b55774ec1254e55452a632400691469480f20 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 11 Jan 2024 12:37:56 -0800 Subject: [PATCH 07/11] Suppress owlready output in example We don't want to compare against that --- docs/README.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/README.md b/docs/README.md index c5da450..6227329 100644 --- a/docs/README.md +++ b/docs/README.md @@ -108,12 +108,12 @@ You can use it interactively in the demo notebook `pizza.ipynb` ... class Flour(c.onto.Generic): pass ... class Wheat(Flour): pass ... class GlutenFree(Flour): pass -... owl.AllDisjoint([GlutenFree, Wheat]) +... _ = owl.AllDisjoint([GlutenFree, Wheat]) ... ... class Crust(c.onto.Generic): pass ... class Thin(Crust): pass ... class Regular(Crust): pass -... owl.AllDisjoint([Thin, Regular]) +... _ = owl.AllDisjoint([Thin, Regular]) ... class Stuffed(Regular): pass ... ... class Ingredients(c.onto.Generic): pass @@ -125,17 +125,13 @@ You can use it interactively in the demo notebook `pizza.ipynb` ... class HasBacon(HasMeat): pass ... class Vegetarian(Ingredients): ... equivalent_to = [Ingredients & owl.Not(HasMeat)] -... owl.AllDisjoint([Vegetarian, HasMeat]) +... _ = owl.AllDisjoint([Vegetarian, HasMeat]) ... ... class RawPizza(c.onto.Generic): pass ... ... class CookedPizza(c.onto.Generic): pass ... -... owl.AllDisjoint([Flour, Crust, Ingredients, RawPizza, CookedPizza]) - AllDisjoint([pizza.GlutenFree, pizza.Wheat]) - AllDisjoint([pizza.Thin, pizza.Regular]) - AllDisjoint([pizza.Vegetarian, pizza.HasMeat]) - AllDisjoint([pizza.Flour, pizza.Crust, pizza.Ingredients, pizza.RawPizza, pizza.CookedPizza]) +... _ = owl.AllDisjoint([Flour, Crust, Ingredients, RawPizza, CookedPizza]) >>> >>> # Code base >>> buy_wheat_flour = c.onto.Function("buy_wheat_flour") From 933ccbd03f3f6e12f68b97aee48534dc60e58435 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 11 Jan 2024 12:54:24 -0800 Subject: [PATCH 08/11] Break lammps out of the atomistics env So we can get pyiron_atomistics for the README docs example, but save lammps (unavailable on windows) for just the notebooks --- .ci_support/environment-lammps.yml | 4 ++++ .ci_support/environment-pyiron_atomistics.yml | 1 - .github/workflows/push-pull.yml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .ci_support/environment-lammps.yml diff --git a/.ci_support/environment-lammps.yml b/.ci_support/environment-lammps.yml new file mode 100644 index 0000000..4530a97 --- /dev/null +++ b/.ci_support/environment-lammps.yml @@ -0,0 +1,4 @@ +channels: + - conda-forge +dependencies: + - lammps \ No newline at end of file diff --git a/.ci_support/environment-pyiron_atomistics.yml b/.ci_support/environment-pyiron_atomistics.yml index 776c431..c24a4b1 100644 --- a/.ci_support/environment-pyiron_atomistics.yml +++ b/.ci_support/environment-pyiron_atomistics.yml @@ -2,6 +2,5 @@ channels: - conda-forge dependencies: - python >= 3.8 - - lammps - pyiron_atomistics - pyiron-data diff --git a/.github/workflows/push-pull.yml b/.github/workflows/push-pull.yml index ebbc1db..09875a9 100644 --- a/.github/workflows/push-pull.yml +++ b/.github/workflows/push-pull.yml @@ -12,5 +12,5 @@ jobs: uses: pyiron/actions/.github/workflows/push-pull-main.yml@main secrets: inherit with: - notebooks-env-files: .ci_support/environment.yml .ci_support/environment-pyiron_atomistics.yml + notebooks-env-files: .ci_support/environment.yml .ci_support/environment-pyiron_atomistics.yml .ci_support/environment-lammps.yml tests-env-files: .ci_support/environment.yml .ci_support/environment-pyiron_atomistics.yml \ No newline at end of file From 5d9ee64b27b83ecb4533c0e9cf7084d5066437db Mon Sep 17 00:00:00 2001 From: pyiron-runner Date: Thu, 11 Jan 2024 20:54:44 +0000 Subject: [PATCH 09/11] [dependabot skip] Update env file --- .binder/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.binder/environment.yml b/.binder/environment.yml index 5f08a82..92401a6 100644 --- a/.binder/environment.yml +++ b/.binder/environment.yml @@ -7,6 +7,6 @@ dependencies: - pandas =2.1.4 - pint =0.23 - python >= 3.8 -- lammps - pyiron_atomistics - pyiron-data +- lammps From 14985bdaa7734de0041338df1c4b7588aff07257 Mon Sep 17 00:00:00 2001 From: liamhuber Date: Thu, 11 Jan 2024 13:19:43 -0800 Subject: [PATCH 10/11] Add some lower bounds on the notebooks env To get a version of mp-api that handles its dependencies well. --- .ci_support/environment-pyiron_atomistics.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.ci_support/environment-pyiron_atomistics.yml b/.ci_support/environment-pyiron_atomistics.yml index c24a4b1..278fc37 100644 --- a/.ci_support/environment-pyiron_atomistics.yml +++ b/.ci_support/environment-pyiron_atomistics.yml @@ -2,5 +2,6 @@ channels: - conda-forge dependencies: - python >= 3.8 - - pyiron_atomistics - - pyiron-data + - mp-api >= 0.39.4 + - pyiron_atomistics >= 0.4.4 + - pyiron-data >= 0.0.27 From 594c6d2528a2fdfb030c63407f84608b2ad87c96 Mon Sep 17 00:00:00 2001 From: pyiron-runner Date: Thu, 11 Jan 2024 21:20:21 +0000 Subject: [PATCH 11/11] [dependabot skip] Update env file --- .binder/environment.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.binder/environment.yml b/.binder/environment.yml index 92401a6..6f8e556 100644 --- a/.binder/environment.yml +++ b/.binder/environment.yml @@ -7,6 +7,7 @@ dependencies: - pandas =2.1.4 - pint =0.23 - python >= 3.8 -- pyiron_atomistics -- pyiron-data +- mp-api >= 0.39.4 +- pyiron_atomistics >= 0.4.4 +- pyiron-data >= 0.0.27 - lammps