Skip to content

Commit 5fa7dbb

Browse files
Remove duplicate files
1 parent a370a46 commit 5fa7dbb

15 files changed

Lines changed: 19 additions & 1075 deletions

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ jobs:
3737
- name: Install dependencies
3838
run: |
3939
python -m pip install --upgrade pip
40+
pip install -e ..
4041
pip install -e ".[dev]"
4142
4243
- name: Lint with ruff
4344
run: |
44-
ruff check shexstatements api --output-format=github
45+
ruff check api --output-format=github
4546
4647
- name: Type check with mypy
4748
run: |
48-
mypy shexstatements api --ignore-missing-imports
49+
mypy api --ignore-missing-imports
4950
continue-on-error: true
5051

5152
- name: Run tests with pytest
@@ -143,7 +144,7 @@ jobs:
143144
- name: Build backend image
144145
uses: docker/build-push-action@v5
145146
with:
146-
context: ./backend
147+
context: .
147148
file: ./backend/Dockerfile
148149
push: false
149150
tags: shexstatements-backend:test

.github/workflows/release-pypi.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ jobs:
1313
name: Build distribution
1414
runs-on: ubuntu-latest
1515

16-
defaults:
17-
run:
18-
working-directory: backend
19-
2016
steps:
2117
- name: Checkout repository
2218
uses: actions/checkout@v4
@@ -41,7 +37,7 @@ jobs:
4137
uses: actions/upload-artifact@v4
4238
with:
4339
name: python-package-distributions
44-
path: backend/dist/
40+
path: dist/
4541

4642
publish-to-pypi:
4743
name: Publish to PyPI

backend/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1313
# Create non-root user for security
1414
RUN useradd --create-home --shell /bin/bash appuser
1515

16-
# Copy project files
17-
COPY pyproject.toml .
16+
# Install shared shexstatements package from repository root
17+
COPY setup.py README.md requirements.txt ./
1818
COPY shexstatements/ ./shexstatements/
19-
COPY api/ ./api/
19+
RUN pip install --no-cache-dir .
2020

21-
# Install the application and dependencies
22-
RUN pip install --no-cache-dir -e . && \
23-
apt-get purge -y gcc && \
21+
# Install backend API package
22+
COPY backend/pyproject.toml ./backend/pyproject.toml
23+
COPY backend/api/ ./backend/api/
24+
RUN pip install --no-cache-dir -e ./backend --no-deps
25+
26+
# Clean build dependencies
27+
RUN apt-get purge -y gcc && \
2428
apt-get autoremove -y && \
2529
rm -rf /var/lib/apt/lists/*
2630

backend/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66

77
[project]
8-
name = "shexstatements"
8+
name = "shexstatements-backend"
99
version = "1.0.0"
1010
description = "Tool to generate Shape Expressions from CSV files and spreadsheets"
1111
requires-python = ">=3.12"
@@ -37,6 +37,7 @@ classifiers = [
3737
]
3838

3939
dependencies = [
40+
"shexstatements>=0.7",
4041
"fastapi>=0.109.0",
4142
"uvicorn[standard]>=0.27.0",
4243
"python-multipart>=0.0.6",
@@ -65,7 +66,6 @@ docs = [
6566
]
6667

6768
[project.scripts]
68-
shexstatements = "shexstatements.cliargs:main"
6969
shexstatements-api = "api.main:run_server"
7070

7171
[project.urls]
@@ -79,7 +79,7 @@ requires = ["hatchling"]
7979
build-backend = "hatchling.build"
8080

8181
[tool.hatch.build.targets.wheel]
82-
packages = ["shexstatements", "api"]
82+
packages = ["api"]
8383

8484
[tool.pytest.ini_options]
8585
testpaths = ["tests"]

backend/shexstatements/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

backend/shexstatements/cliargs.py

Lines changed: 0 additions & 69 deletions
This file was deleted.

backend/shexstatements/errors.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

backend/shexstatements/shexfromapplprofilecsv.py

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)