Skip to content

Commit d9c8795

Browse files
committed
refactor: move source root to src subdirectory
1 parent cccb2b2 commit d9c8795

24 files changed

+23
-25
lines changed

Jenkinsfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ pipeline {
589589
]
590590
)
591591
sh '''. ./venv/bin/activate
592-
mkdir -p reports && gcovr --filter uiucprescon/imagevalidate --print-summary --xml -o reports/coverage_cpp.xml
592+
mkdir -p reports && gcovr --filter src/uiucprescon/imagevalidate --print-summary --xml -o reports/coverage_cpp.xml
593593
'''
594594
stash(includes: 'reports/coverage_cpp.xml', name: 'CPP_COVERAGE_REPORT')
595595
}
@@ -598,7 +598,7 @@ pipeline {
598598
stage('Clang Tidy Analysis') {
599599
steps{
600600
tee('logs/clang-tidy.log') {
601-
sh(label: 'Run Clang Tidy', script: 'run-clang-tidy -clang-tidy-binary $(which clang-tidy) -p $WORKSPACE/build/cpp/ ./uiucprescon/imagevalidate' )
601+
sh(label: 'Run Clang Tidy', script: 'run-clang-tidy -clang-tidy-binary $(which clang-tidy) -p $WORKSPACE/build/cpp/ ./src/uiucprescon/imagevalidate' )
602602
}
603603
}
604604
post{
@@ -663,7 +663,7 @@ pipeline {
663663
sh(
664664
label: 'Running Pytest',
665665
script:'''mkdir -p reports/coverage
666-
./venv/bin/uv run coverage run --parallel-mode --source=uiucprescon -m pytest --junitxml=reports/pytest.xml --integration
666+
./venv/bin/uv run coverage run --parallel-mode --source=src -m pytest --junitxml=reports/pytest.xml --integration
667667
'''
668668
)
669669
}
@@ -678,7 +678,7 @@ pipeline {
678678
steps {
679679
catchError(buildResult: 'SUCCESS', message: 'Doctest found issues', stageResult: 'UNSTABLE') {
680680
sh( label: 'Running Doctest',
681-
script: '''./venv/bin/uv run coverage run --parallel-mode --source=uiucprescon -m sphinx -b doctest docs/source build/docs -d build/docs/doctrees -v
681+
script: '''./venv/bin/uv run coverage run --parallel-mode --source=src -m sphinx -b doctest docs/source build/docs -d build/docs/doctrees -v
682682
mkdir -p reports
683683
mv build/docs/output.txt reports/doctest.txt
684684
'''
@@ -688,7 +688,7 @@ pipeline {
688688
}
689689
stage('Task Scanner'){
690690
steps{
691-
recordIssues(tools: [taskScanner(highTags: 'FIXME', includePattern: 'uiucprescon/**/*.py', normalTags: 'TODO')])
691+
recordIssues(tools: [taskScanner(highTags: 'FIXME', includePattern: 'src/**/*.py', normalTags: 'TODO')])
692692
}
693693
}
694694
stage('Run MyPy Static Analysis') {
@@ -697,7 +697,7 @@ pipeline {
697697
sh(
698698
label: 'Running Mypy',
699699
script: '''mkdir -p logs
700-
./venv/bin/uv run mypy -p uiucprescon --html-report reports/mypy/html > logs/mypy.log
700+
./venv/bin/uv run mypy -p uiucprescon.imagevalidate --html-report reports/mypy/html > logs/mypy.log
701701
'''
702702
)
703703
}
@@ -714,7 +714,7 @@ pipeline {
714714
catchError(buildResult: 'SUCCESS', message: 'Flake8 found issues', stageResult: 'UNSTABLE') {
715715
sh '''. ./venv/bin/activate
716716
mkdir -p logs
717-
flake8 uiucprescon --format=pylint --tee --output-file=logs/flake8.log
717+
flake8 src --format=pylint --tee --output-file=logs/flake8.log
718718
'''
719719
}
720720
}
@@ -730,7 +730,7 @@ pipeline {
730730
sh(label: 'combining coverage data',
731731
script: '''./venv/bin/uv run coverage combine
732732
./venv/bin/uv run coverage xml -o ./reports/coverage-python.xml
733-
./venv/bin/uv run gcovr --filter uiucprescon/imagevalidate --print-summary --xml -o reports/coverage-c-extension.xml
733+
./venv/bin/uv run gcovr --filter src/uiucprescon/imagevalidate --print-summary --xml -o reports/coverage-c-extension.xml
734734
'''
735735
)
736736
recordCoverage(tools: [[parser: 'COBERTURA', pattern: 'reports/coverage*.xml']])

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ packages = [
7575
"uiucprescon.imagevalidate",
7676
"uiucprescon.imagevalidate.profiles",
7777
]
78+
package-dir = {"uiucprescon.imagevalidate" = "src/uiucprescon/imagevalidate"}
79+
7880
include-package-data = false
7981

8082
[tool.setuptools.package-data]
@@ -84,10 +86,9 @@ include-package-data = false
8486
relative_files = true
8587
branch = true
8688

87-
8889
[tool.mypy]
8990
ignore_missing_imports = true
90-
91+
mypy_path = "src"
9192

9293
[tool.pytest.ini_options]
9394
testpaths = "tests"
@@ -162,9 +163,9 @@ cache-keys = [
162163
{ file = "pyproject.toml" },
163164
{ file = "conanfile.py" },
164165
{ file = "setup.py" },
165-
{ file = "uiucprescon/imagevalidate/CMakeLists.txt" },
166-
{ file = "uiucprescon/**/*.h" },
167-
{ file = "uiucprescon/**/*.cpp" }
166+
{ file = "src/uiucprescon/imagevalidate/CMakeLists.txt" },
167+
{ file = "src/**/*.h" },
168+
{ file = "src/**/*.cpp" }
168169
]
169170

170171
[tool.uv.sources]

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def build_extension(self, ext: Pybind11Extension):
2121
open_jpeg_extension = Pybind11Extension(
2222
"uiucprescon.imagevalidate.openjp2wrap",
2323
sources=[
24-
"uiucprescon/imagevalidate/glue.cpp",
25-
"uiucprescon/imagevalidate/openjp2wrap.cpp",
26-
"uiucprescon/imagevalidate/opj_colorspace_checker.cpp"
24+
"src/uiucprescon/imagevalidate/glue.cpp",
25+
"src/uiucprescon/imagevalidate/openjp2wrap.cpp",
26+
"src/uiucprescon/imagevalidate/opj_colorspace_checker.cpp"
2727
],
2828
language="c++",
2929
libraries=["openjp2"],

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sonar.organization=uiuclibrary
33
sonar.host.url=https://sonarcloud.io
44
sonar.links.scm=https://github.com/UIUCLibrary/imagevalidate
55
sonar.links.homepage=https://www.library.illinois.edu/dccdocs/speedwagon/
6-
sonar.sources=uiucprescon/imagevalidate
6+
sonar.sources=src
77
sonar.tests=tests
88
#sonar.python.pylint.reportPath=reports/pylint.txt
99
sonar.coverageReportPaths=
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)