Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • atr/dan
1 result
Show changes
Commits on Source (19)
# This file contains revisions to be ignored by git blame.
# These revisions are expected to be formatting-only changes.
#
# Calling `git blame --ignore-revs-file .git-blame-ignore-revs` will
# tell git blame to ignore changes made by these revisions when assigning
# assigning blame, as if the change never happened.
#
# You can enable this as a default for your local repository by running
# `git config blame.ignoreRevsFile .git-blame-ignore-revs`
# This will probably be automatically picked by your IDE
# (VSCode+GitLens and JetBrains products are confirmed to this)
#
# Important: if you are switching to the branch without this file,
# `git blame` will fail with an error
#
# Guidelines:
# - Only large automated refactorings are expected to be included in this file.
# Do not add new revision just because it feels unimportant
# - When adding sinle revision use inline comment to link relevant issue/MR
# Example:
## d4a8b7307acc2dc8a8833ccfa65426ad28b3ffc9 # https://gitlab.teklia.com/atr/dan/issues/12345
# - When adding multiple revisions precede each addition (this could be multiple revisions) with a link to
# line with word START and link to relevant issue/MR and conclude with line END and link to the
# same issue/MR
# Example:
# # START https://gitlab.teklia.com/atr/dan/issues/12345
# 6f0bd2d8a1e6cd2e794cd39976e9756e0c85ac66
# d53974df11dbc22cbea9dc7dcbc9896c25979a27
# ... <rest of the list>
# # END https://gitlab.teklia.com/atr/dan/issues/12345
# - Please append new lines to the end of the file, no matter of real chronological
# order of revisions
# - Since this is using hashes for reformatting it might be a good idea to update
# this file in separate MR when relevant changes already landed in master. By
# utilizing this manner you will be safe from random rebase/squash issues
# - Only put full 40-character hashes on this list
# START https://gitlab.teklia.com/atr/dan/-/merge_requests/408
05db961d87448647e8f59f6b728b321b17263042
838c7df40b3c6ba223008416e2a654fe40bfcf4a
# END https://gitlab.teklia.com/atr/dan/-/merge_requests/408
...@@ -42,19 +42,11 @@ test: ...@@ -42,19 +42,11 @@ test:
- apt-get update -q - apt-get update -q
- apt-get install -q -y libgl1 - apt-get install -q -y libgl1
# Add netrc file
- |
echo "
machine gitlab.teklia.com
login gitlab-ci-token
password $CI_JOB_TOKEN
" > ~/.netrc
except: except:
- schedules - schedules
script: script:
- tox -- -v - tox -e teklia-dan -- -v
docker-build: docker-build:
stage: build stage: build
...@@ -68,15 +60,6 @@ docker-build: ...@@ -68,15 +60,6 @@ docker-build:
except: except:
- schedules - schedules
before_script:
# Add netrc file
- |
echo "
machine gitlab.teklia.com
login gitlab-ci-token
password $CI_JOB_TOKEN
" > ~/.netrc
script: script:
- ci/build.sh - ci/build.sh
...@@ -88,18 +71,10 @@ docker-build: ...@@ -88,18 +71,10 @@ docker-build:
- public - public
before_script: before_script:
# Add netrc file - pip install tox
- |
echo "
machine gitlab.teklia.com
login gitlab-ci-token
password $CI_JOB_TOKEN
" > ~/.netrc
- pip install --index-url https://gitlab.teklia.com/api/v4/projects/210/packages/pypi/simple -e .[docs]
script: script:
- mkdocs build --strict --verbose - tox -e doc
docs-build: docs-build:
extends: .docs extends: .docs
...@@ -177,30 +152,22 @@ deploy-pypi: ...@@ -177,30 +152,22 @@ deploy-pypi:
only: only:
- tags - tags
variables:
TWINE_USERNAME: gitlab-ci-token
TWINE_PASSWORD: ${CI_JOB_TOKEN}
TWINE_REPOSITORY_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi
before_script: before_script:
- pip install twine - pip install twine build
script: script:
- python setup.py sdist bdist_wheel - python -m build
- twine upload --repository-url ${TWINE_REPOSITORY_URL} dist/* - twine upload -r pypi dist/*
bump-python-deps: bump-python-deps:
stage: deploy stage: deploy
image: registry.gitlab.teklia.com/infra/devops:latest image: registry.gitlab.teklia.com/infra/devops:latest
variables:
PYPI_GITLAB_URL: https://gitlab.teklia.com/api/v4/projects/210/packages
only: only:
- schedules - schedules
script: script:
- devops python-deps requirements.txt doc-requirements.txt - devops python-deps pyproject.toml doc-requirements.txt
release-notes: release-notes:
stage: deploy stage: deploy
......
...@@ -31,7 +31,9 @@ repos: ...@@ -31,7 +31,9 @@ repos:
rev: v2.2.6 rev: v2.2.6
hooks: hooks:
- id: codespell - id: codespell
args: ['--write-changes'] args:
- --write-changes
- --exclude-file=LICENCE
- repo: https://github.com/PyCQA/doc8 - repo: https://github.com/PyCQA/doc8
rev: v1.1.1 rev: v1.1.1
hooks: hooks:
......
More information on https://atr.pages.teklia.com/contributing/.
...@@ -9,8 +9,7 @@ WORKDIR /src ...@@ -9,8 +9,7 @@ WORKDIR /src
# Copy DAN data # Copy DAN data
COPY dan dan COPY dan dan
COPY requirements.txt *-requirements.txt setup.py VERSION README.md ./ COPY pyproject.toml README.md ./
# Install DAN as a package with GitLab package registry # Install DAN as a package
RUN --mount=type=secret,id=netrc,target=/root/.netrc \ RUN pip install . --no-cache-dir
pip install . --no-cache-dir --index-url https://gitlab.teklia.com/api/v4/projects/210/packages/pypi/simple
This diff is collapsed.
This diff is collapsed.
include LICENSE include LICENSE
include requirements.txt include LICENCE
include doc-requirements.txt
include mlflow-requirements.txt
include VERSION
include README.md include README.md
.PHONY: release .PHONY: release
release: release:
$(eval version:=$(shell cat VERSION)) # Grep the version from pyproject.toml, squeeze multiple spaces, delete double and single quotes, get 3rd val.
echo $(version) # This command tolerates multiple whitespace sequences around the version number.
git commit VERSION -m "Version $(version)" $(eval version:=$(shell grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3))
echo Releasing version $(version)
git commit pyproject.toml -m "Version $(version)"
git tag $(version) git tag $(version)
git push origin main $(version) git push origin main $(version)
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
For more details about this package, make sure to see the documentation available at <https://atr.pages.teklia.com/dan/>. For more details about this package, make sure to see the documentation available at <https://atr.pages.teklia.com/dan/>.
This is an open-source project, licensed using [the MIT license](https://opensource.org/license/mit/). This is an open-source project, licensed using [the CeCILL-C license](https://cecill.info/index.en.html).
## Inference ## Inference
......
0.2.0rc4
...@@ -17,7 +17,7 @@ fi ...@@ -17,7 +17,7 @@ fi
IMAGE_TAG="$CI_REGISTRY_IMAGE:$VERSION" IMAGE_TAG="$CI_REGISTRY_IMAGE:$VERSION"
cd $CI_PROJECT_DIR cd $CI_PROJECT_DIR
docker build -f Dockerfile . -t "$IMAGE_TAG" --secret id=netrc,src=$HOME/.netrc docker build -f Dockerfile . -t "$IMAGE_TAG"
# Publish the image on the main branch or on a tag # Publish the image on the main branch or on a tag
if [ "$CI_COMMIT_REF_NAME" = "main" -o -n "$CI_COMMIT_TAG" ]; then if [ "$CI_COMMIT_REF_NAME" = "main" -o -n "$CI_COMMIT_TAG" ]; then
......
# Copyright Teklia (contact@teklia.com) & Denis Coquenet
# This code is licensed under CeCILL-C
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import logging import logging
......
# Copyright Teklia (contact@teklia.com) & Denis Coquenet
# This code is licensed under CeCILL-C
""" """
Convert DAN predictions to BIO format. Convert DAN predictions to BIO format.
""" """
......
# Copyright Teklia (contact@teklia.com) & Denis Coquenet
# This code is licensed under CeCILL-C
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import argparse import argparse
import errno import errno
......
# Copyright Teklia (contact@teklia.com) & Denis Coquenet
# This code is licensed under CeCILL-C
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Preprocess datasets for training. Preprocess datasets for training.
......
# Copyright Teklia (contact@teklia.com) & Denis Coquenet
# This code is licensed under CeCILL-C
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Analyze dataset and display statistics in markdown format. Analyze dataset and display statistics in markdown format.
......
# Copyright Teklia (contact@teklia.com) & Denis Coquenet
# This code is licensed under CeCILL-C
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import logging import logging
from collections import Counter, defaultdict from collections import Counter, defaultdict
......
# Copyright Teklia (contact@teklia.com) & Denis Coquenet
# This code is licensed under CeCILL-C
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Download images of a dataset from a split extracted by DAN Download images of a dataset from a split extracted by DAN
......
# Copyright Teklia (contact@teklia.com) & Denis Coquenet
# This code is licensed under CeCILL-C
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from pathlib import Path from pathlib import Path
......