diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8e3c78c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,55 @@ +name: main + +on: [push, pull_request] + +jobs: + lint: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.9, "3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: | + requirements.txt + tests-requirements.txt + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f tests-requirements.txt ]; then pip install -r tests-requirements.txt; fi + - name: Check code quality with isort, black and flake8 + run: | + make quality + + test: + + needs: lint + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.9, "3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: | + requirements.txt + tests-requirements.txt + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f tests-requirements.txt ]; then pip install -r tests-requirements.txt; fi + - run: make test \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index f7e6bbc..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,112 +0,0 @@ -variables: - PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" - -cache: - paths: - - .cache/pip - -before_script: - - python -V - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pip install -e . - -stages: - - quality - - test - - doc - - deploy - -.parallel: - parallel: - matrix: - - PYTHON_IMAGE: ['python:3.8','python:3.9','python:3.10'] - -quality: - stage: quality - image: 'python:3.9' - script: - - make quality - -test: - stage: test - needs: [quality] - image: $PYTHON_IMAGE - script: - - make test - parallel: !reference [.parallel,parallel] - -test-datasets: - stage: test - when: manual - needs: [quality] - image: $PYTHON_IMAGE - script: - - pip install -r datasets-requirements.txt - - make test-datasets - parallel: !reference [.parallel,parallel] - -coverage: - stage: quality - image: 'python:3.9' - script: - - make test-coverage - coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' - artifacts: - when: always - reports: - coverage_report: - coverage_format: cobertura - path: coverage.xml - junit: junit.xml - -test-docs: - stage: test - when: manual - needs: [quality] - image: 'python:3.9' - script: - - pip install -r docs/docs-requirements.txt - - make docs - -pages: - stage: doc - needs: [test-docs] - image: 'python:3.9' - script: - - pip install -r docs/docs-requirements.txt - - make docs - - mv docs/build/html public - artifacts: - paths: - - public - only: - - main - - tags - -# .publish: -# stage: deploy -# needs: [test] -# image: 'python:3.9' -# script: -# - pip install twine -# - python setup.py sdist bdist_wheel -# - twine upload --repository-url $TWINE_REPOSITORY_URL dist/* - -# publish-unstable: -# extends: .publish -# variables: -# TWINE_REPOSITORY_URL: "https://repos.tech.orange/artifactory/api/pypi/mislabeled-local-pypi-unstable" -# only: -# - main -# except: -# - tags - -# publish-release: -# extends: .publish -# variables: -# TWINE_REPOSITORY_URL: "https://repos.tech.orange/artifactory/api/pypi/mislabeled-local-pypi-stable" -# only: -# - tags -# except: -# - branches \ No newline at end of file diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/MANIFEST.in b/MANIFEST.in index f9bd145..259261b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,3 @@ include requirements.txt +include LICENSE +include README.md diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a199e77..0000000 --- a/setup.cfg +++ /dev/null @@ -1,8 +0,0 @@ -[metadata] -description-file = README.rst - -[aliases] -test = pytest - -[tool:pytest] -addopts = --doctest-modules