From 9a353affc824fecc22e7f9fe8b7a5b4a01742e63 Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Wed, 21 Aug 2024 17:03:01 -0600 Subject: [PATCH] generate other brick distributions and add to the builds --- .github/workflows/builds.yml | 9 ++++++ .github/workflows/nightly-builds.yml | 2 ++ generate_brick.py | 10 +++++++ pyproject.toml | 44 ++++++++++++---------------- 4 files changed, 39 insertions(+), 26 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 714cac0b..b518ae91 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -33,6 +33,10 @@ jobs: run: | make cat Brick.ttl + - name: zip imports and extensions + run: | + zip -r imports.zip imports + zip -r extensions.zip extensions - name: upload ttls if: ${{ matrix.python-version }} == "3.10" uses: actions/upload-artifact@v3 @@ -40,6 +44,11 @@ jobs: name: Brick-ontology path: | Brick.ttl + Brick+imports.ttl + Brick+extensions.ttl + Brick-only.ttl + imports.zip + extensions.zip - name: Run the tests # -s flag: do not capture output (avoids killing test after 10 min) run: | diff --git a/.github/workflows/nightly-builds.yml b/.github/workflows/nightly-builds.yml index 6f3b8106..87efce7d 100644 --- a/.github/workflows/nightly-builds.yml +++ b/.github/workflows/nightly-builds.yml @@ -40,6 +40,8 @@ jobs: title: Nightly Build ${{ steps.date.outputs.date }} files: | Brick.ttl + Brick+imports.ttl Brick+extensions.ttl + Brick-only.ttl imports.zip extensions.zip diff --git a/generate_brick.py b/generate_brick.py index e01b5453..4964f527 100755 --- a/generate_brick.py +++ b/generate_brick.py @@ -1096,6 +1096,11 @@ def handle_concept_labels(): fp.write(graph.serialize(format="turtle").rstrip()) fp.write("\n") +# serialize Brick-only to output +with open("Brick-only.ttl", "w", encoding="utf-8") as fp: + fp.write(G.serialize(format="turtle").rstrip()) + fp.write("\n") + # add rec stuff env.import_graph(G, "https://w3id.org/rec") @@ -1133,6 +1138,11 @@ def handle_concept_labels(): print(report) sys.exit(1) +# serialize Brick+imports to output +with open("Brick+imports.ttl", "w", encoding="utf-8") as fp: + fp.write(G.serialize(format="turtle").rstrip()) + fp.write("\n") + # validate Brick # valid, _, report = pyshacl.validate(data_graph=G, advanced=True, allow_warnings=True) # if not valid: diff --git a/pyproject.toml b/pyproject.toml index 3d8f19fd..a2177d93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,32 +5,24 @@ description = "Add your description here" authors = [ { name = "Gabe Fierro", email = "gtfierro@mines.edu" } ] -dependencies = [ - "owlrl>=6.0", - "rdflib>=7.0", - "pytest>=7.3", - "tqdm>=4.0", - "pyshacl>=0.25", - "docker>=6.0", - "black==24.3.0", - "pre-commit>=3.2", - "flake8>=6.0", - "pytest-xdist[psutil]>=3.5.0", - "brickschema[all]>=0.7.5", - "semver>=2.10.1", +readme = "README.md" +requires-python = ">= 3.9" +[tool.uv] +dev-dependencies = [ + "rdflib>=7.0.0", + "owlrl>=6.0.2", + "pytest>=8.3.2", + "tqdm>=4.66.5", + "pyshacl>=0.25.0", + "docker>=7.1.0", + "black>=24.8.0", + "pre-commit>=3.8.0", + "flake8>=7.1.1", + "pytest-xdist[psutil]>=3.6.1", + "semver>=3.0.2", "html5lib>=1.1", "pyontoenv>=0.1.9a6", + "brickschema[topquadrant]>=0.7.6a2", ] -readme = "README.md" -requires-python = ">= 3.9" - -[build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.rye] -managed = true -dev-dependencies = [] - -[tool.hatch.metadata] -allow-direct-references = true +[tool.uv.workspace] +members = []