Skip to content

Commit

Permalink
fix: Missing static files
Browse files Browse the repository at this point in the history
  • Loading branch information
nbonnotte committed Dec 13, 2024
1 parent 58350ed commit 9023f51
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 39 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ jobs:
python-version: '3.11'
cache: 'poetry'

- name: Install local project
run: make init

- name: Package project
run: poetry build
run: make build

- name: Store the distribution
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ jobs:
python-version: '3.11'
cache: 'poetry'

- name: Install local project
run: make init

- name: Package project
run: poetry build
run: make build

- name: Store the distribution
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
python-version: ${{ matrix.pyversion }}
cache: 'poetry'

- name: Install local project
run: make init

- name: Unit tests
run: make test-unit

Expand Down
23 changes: 14 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ init: ## Bootstrap for local development
poetry install
poetry run pre-commit install

# Build

.PHONY: build
build: init schemas # Build package
rm -rf dist
poetry build -vvv

# Tests

.PHONY: test
test: init test-unit test-e2e ## Launch all the test tasks (unit, end-to-end)

.PHONY: test-unit
test-unit: schemas-xsd ## Launch unit tests
test-unit: build ## Launch unit tests
poetry run pytest --cov $(PYTEST_ARGS)

.PHONY: test-e2e
Expand Down Expand Up @@ -55,10 +61,9 @@ test-e2e-case:


.PHONY: prepare-test-env
prepare-test-env: schemas-xsd
prepare-test-env: build
@echo -e "$(YELLOW)Preparting tests$(NO_COLOR)"
rm -rf $(TEST_ENV_DIR) dist
poetry build
rm -rf $(TEST_ENV_DIR)
poetry run virtualenv $(TEST_ENV_DIR)
$(TEST_ENV_DIR)/bin/pip install dist/*.whl
rm -rf $(TEST_OUTPUT_DIR)
Expand All @@ -79,11 +84,11 @@ cli/src/dac7/schemas/%.xsd: schemas/xml/%.xsd

.PHONY: schemas-json
schemas-json:
$(DAC7_CMD) schemas json2xml > schemas/json/DPIXML_v1.1-fr1.json
$(DAC7_CMD) schemas build platform-operator > schemas/json/partial/platform_operator.json
$(DAC7_CMD) schemas build other-platform-operators > schemas/json/partial/other_platform_operators.json
$(DAC7_CMD) schemas build entity-sellers > schemas/json/partial/entity_sellers.json
$(DAC7_CMD) schemas build individual-sellers > schemas/json/partial/individual_sellers.json
poetry run dac7 schemas json2xml > schemas/json/DPIXML_v1.1-fr1.json
poetry run dac7 schemas build platform-operator > schemas/json/partial/platform_operator.json
poetry run dac7 schemas build other-platform-operators > schemas/json/partial/other_platform_operators.json
poetry run dac7 schemas build entity-sellers > schemas/json/partial/entity_sellers.json
poetry run dac7 schemas build individual-sellers > schemas/json/partial/individual_sellers.json

# Implements this pattern for autodocumenting Makefiles:
# https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 0 additions & 18 deletions schemas/json/DPIXML_v1.1-fr1.json
Original file line number Diff line number Diff line change
Expand Up @@ -990,25 +990,16 @@
"properties": {
"dpi:TransmittingCountry": {
"const": "FR",
"enum": [
"FR"
],
"title": "Dpi:Transmittingcountry",
"type": "string"
},
"dpi:ReceivingCountry": {
"const": "FR",
"enum": [
"FR"
],
"title": "Dpi:Receivingcountry",
"type": "string"
},
"dpi:MessageType": {
"const": "DPI",
"enum": [
"DPI"
],
"title": "Dpi:Messagetype",
"type": "string"
},
Expand Down Expand Up @@ -1693,25 +1684,16 @@
"properties": {
"@xmlns:dpi": {
"const": "urn:oecd:ties:dpi",
"enum": [
"urn:oecd:ties:dpi"
],
"title": "@Xmlns:Dpi",
"type": "string"
},
"@xmlns:stf": {
"const": "urn:oecd:ties:dpistf",
"enum": [
"urn:oecd:ties:dpistf"
],
"title": "@Xmlns:Stf",
"type": "string"
},
"@version": {
"const": "1.0",
"enum": [
"1.0"
],
"title": "@Version",
"type": "string"
},
Expand Down

0 comments on commit 9023f51

Please sign in to comment.