Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brick distribution #652

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,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
id: upload-ttls
if: ${{ matrix.python-version == env.RELEASE_PYTHON_VERSION }}
Expand All @@ -51,6 +55,11 @@ jobs:
name: Brick-ontology
path: |
Brick.ttl
Brick+imports.ttl
Brick+extensions.ttl
Brick-only.ttl
imports.zip
extensions.zip
- name: comment artifact
# if the trigger is on a pull request
if: ${{ github.event_name == 'pull_request' && matrix.python-version == env.RELEASE_PYTHON_VERSION }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nightly-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions generate_brick.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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:
Expand Down
44 changes: 18 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Loading