mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
Add linting feature and update test configurations in pixi.toml
Introduces a new `lint` feature with `ruff` and `black` dependencies. Extends test setup with additional dependencies and tasks for building, testing, and installation. Cleans up `.gitignore` and removes unused entries from `pixi.lock`.
This commit is contained in:
@@ -90,6 +90,25 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "win-test",
|
||||||
|
"inherits": [
|
||||||
|
"win-shared"
|
||||||
|
],
|
||||||
|
"hidden": false,
|
||||||
|
"binaryDir": "${sourceDir}/../build/win-test",
|
||||||
|
"warnings": {
|
||||||
|
"dev": false
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"PREFIX": "${sourceDir}/../.pixi/envs/tests",
|
||||||
|
"LIBRARY_PREFIX": "${sourceDir}/../.pixi/envs/tests/Library"
|
||||||
|
},
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"SCHEMA_VERSIONS": "2x3;4;4x3_add2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,12 @@ platforms = ["win-64", "linux-64", "osx-64"]
|
|||||||
common = { features = ["common"], no-default-feature = true }
|
common = { features = ["common"], no-default-feature = true }
|
||||||
prod = { features = ["prod", "common"], no-default-feature = true }
|
prod = { features = ["prod", "common"], no-default-feature = true }
|
||||||
dev = { features = ["dev", "common"], no-default-feature = true }
|
dev = { features = ["dev", "common"], no-default-feature = true }
|
||||||
#tests = { features = ["tests", "common"], no-default-feature = true }
|
lint = { features = ["lint"], no-default-feature = true }
|
||||||
|
tests = { features = ["tests", "common"], no-default-feature = true }
|
||||||
|
|
||||||
|
[feature.lint.dependencies]
|
||||||
|
ruff = "*"
|
||||||
|
black = "*"
|
||||||
|
|
||||||
[feature.common.dependencies]
|
[feature.common.dependencies]
|
||||||
# Build deps
|
# Build deps
|
||||||
@@ -34,17 +39,16 @@ nlohmann_json = "*"
|
|||||||
zlib = "*"
|
zlib = "*"
|
||||||
pythonocc-core = "*"
|
pythonocc-core = "*"
|
||||||
|
|
||||||
#[feature.tests.dependencies]
|
[feature.tests.dependencies]
|
||||||
# tests
|
|
||||||
pytest = "*"
|
pytest = "*"
|
||||||
#shapely = "*"
|
shapely = "*"
|
||||||
#tabulate = "*"
|
tabulate = "*"
|
||||||
#isodate = "*"
|
isodate = "*"
|
||||||
#python-dateutil = "*"
|
python-dateutil = "*"
|
||||||
#xmlschema = "*"
|
xmlschema = "*"
|
||||||
#xsdata = "*"
|
xsdata = "*"
|
||||||
#lxml = "*"
|
lxml = "*"
|
||||||
#networkx = "*"
|
networkx = "*"
|
||||||
|
|
||||||
[feature.common.target.win-64.dependencies]
|
[feature.common.target.win-64.dependencies]
|
||||||
vs2022_win-64 = "*"
|
vs2022_win-64 = "*"
|
||||||
@@ -61,13 +65,19 @@ build-release = { cmd = ["cmake", "--build", "build/win-release", "--config", "R
|
|||||||
[feature.dev.target.win-64.tasks]
|
[feature.dev.target.win-64.tasks]
|
||||||
configure-debug = { cmd = ["cmake", "--preset", "win-debug", "-B", "build/win-debug", "cmake"], description = "Configure the project", depends-on=["init-submodules"], outputs=["build/win-debug/CMakeCache.txt"] }
|
configure-debug = { cmd = ["cmake", "--preset", "win-debug", "-B", "build/win-debug", "cmake"], description = "Configure the project", depends-on=["init-submodules"], outputs=["build/win-debug/CMakeCache.txt"] }
|
||||||
build-debug = { cmd = ["cmake", "--build", "build/win-debug", "--config", "Debug"], description = "Build the project", depends-on = ["configure-debug"] }
|
build-debug = { cmd = ["cmake", "--build", "build/win-debug", "--config", "Debug"], description = "Build the project", depends-on = ["configure-debug"] }
|
||||||
|
|
||||||
install-debug = { cmd = ["cmake", "--install", "build/win-debug", "--config", "Debug"], description = "Install the project" } # Optionally Install files to your desired env using --prefix
|
install-debug = { cmd = ["cmake", "--install", "build/win-debug", "--config", "Debug"], description = "Install the project" } # Optionally Install files to your desired env using --prefix
|
||||||
|
|
||||||
vsdebug = { cmd = ["python"], description = "Run a python script with vs debugger attached" }
|
vsdebug = { cmd = ["python"], description = "Run a python script with vs debugger attached" }
|
||||||
|
|
||||||
#[feature.tests.target.win-64.tasks]
|
[feature.tests.tasks]
|
||||||
test = { cmd = "pytest test/test_sweeps.py"}
|
configure-test = { cmd = ["cmake", "--preset", "win-test", "-B", "build/win-test", "cmake"], description = "Configure the project", depends-on=["init-submodules"], outputs=["build/win-test/CMakeCache.txt"] }
|
||||||
|
build-test = { cmd = ["cmake", "--build", "build/win-test", "--config", "Release"], description = "Build the project", depends-on = ["configure-test"], outputs=["build/win-test/IfcGeom.lib"] }
|
||||||
|
install-test = { cmd = ["cmake", "--install", "build/win-test", "--config", "Release"], description = "Install the project", depends-on = ["build-test"] } # Optionally Install files to your desired env using --prefix
|
||||||
|
|
||||||
|
test = { cmd = "pytest .", cwd="src/ifcopenshell-python/test", depends-on=["install-test"], env = {PYTHONPATH="$PIXI_PROJECT_ROOT/src/ifcpatch"}}
|
||||||
|
|
||||||
|
[feature.lint.tasks]
|
||||||
|
lint = { cmd = "ruff check && black --diff --check ."}
|
||||||
|
|
||||||
[feature.common.target.win-64.activation]
|
[feature.common.target.win-64.activation]
|
||||||
#scripts = ["cmake/activate.bat"]
|
#scripts = ["cmake/activate.bat"]
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
*.glb
|
|
||||||
*.tmp
|
|
||||||
Reference in New Issue
Block a user