Skip to content
Snippets Groups Projects
Commit a2f8edc5 authored by GromeTT's avatar GromeTT
Browse files

Merge branch 'dev0.2.5' into 'master'

Merge v0.2.5 into master

See merge request !36
parents 8c036fe9 432b44df
Branches
Tags 0.2.5
1 merge request!36Merge v0.2.5 into master
Pipeline #773732 passed
......@@ -2,58 +2,75 @@ image: python:3.7
stages:
- build
- test
- deploy
- release
before_script:
- pip install --upgrade pip
build_wheel:
.build-docs-script: &build-docs-script
- pip install -r requirements.txt
- sphinx-build -b html docs/source docs/build/html
.build-wheel-script: &build-wheel-script
- pip install --upgrade twine setuptools wheel
- python setup.py bdist_wheel
# Pipeline runs only, if commit has a semantic versioning tag.
.if-semantic-versoin-tag:
rules:
- if: $CI_COMMIT_TAG =~ /[0-9](\.[0-9]){2}/
unit-test:
tags:
- wheel
stage: test
script:
- pip install pytest ./
- pytest
pages:
tags:
- doc
stage: build
script:
- *build-docs-script
- mv docs/build/html public
artifacts:
paths:
- public
extends: .if-semantic-versoin-tag
build-pages:
tags:
- wheel
- doc
stage: build
script:
- pip install --upgrade setuptools wheel
- python setup.py bdist_wheel
build_docs:
- *build-docs-script
build-wheel:
tags:
- doc
- wheel
stage: build
script:
- pip install -r requirements.txt
- cd docs
- make html
- *build-wheel-script
deploy_wheel:
release-gitlab:
tags:
- wheel
stage: deploy
script:
- pip install --upgrade setuptools wheel
- python setup.py bdist_wheel
- mv dist/ public
artifacts:
expire_in: never
paths:
- public
only:
- master
deploy_pages:
- *build-wheel-script
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
extends: .if-semantic-versoin-tag
release-pypi:
tags:
- doc
stage: deploy
dependencies:
- deploy_wheel
- wheel
stage: release
script:
- pip install -r requirements.txt
- cd docs
- make html
- mv build/html/ ../public/
artifacts:
expire_in: never
paths:
- public
only:
- master
\ No newline at end of file
- *build-wheel-script
- TWINE_PASSWORD=${PYPI_PASSWORD} TWINE_USERNAME=${PYPI_USERNAME} python -m twine upload dist/*
extends: .if-semantic-versoin-tag
......@@ -5,7 +5,7 @@
setuptools.setup(
name="fml40-reference-implementation",
version="0.2.4.7",
version="0.2.5",
author="Kompetenzzentrum Wald und Holz 4.0",
author_email="s3i@kwh40.de",
description="fml40 reference implementation basic functions",
......
import pprint
import re
from ml.dt_factory import DT_FACTORY, RE_NAMESPACE
from ml.feature import Feature
from ml.role import Role
def test_namespace_re():
assert not RE_NAMESPACE.fullmatch("")
assert not RE_NAMESPACE.fullmatch("a")
assert not RE_NAMESPACE.fullmatch("2")
assert not RE_NAMESPACE.fullmatch("a:b")
assert not RE_NAMESPACE.fullmatch("1:b")
assert not RE_NAMESPACE.fullmatch("b:1")
assert RE_NAMESPACE.fullmatch("a::b")
assert not RE_NAMESPACE.fullmatch("::b")
assert not RE_NAMESPACE.fullmatch("a::")
assert RE_NAMESPACE.fullmatch("ba::aa")
assert not RE_NAMESPACE.fullmatch("b::a::a")
assert not RE_NAMESPACE.fullmatch("b::a::1")
def test_class_instantiation():
for key, s3i_class in DT_FACTORY.items():
s3i_inst = s3i_class()
assert RE_NAMESPACE.fullmatch(s3i_inst.class_name)
import pytest
def test_entry():
assert True
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment