Skip to content
Snippets Groups Projects
Verified Commit 2c2aecbb authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Pull teklia-nerval from pypi

parent 169b3de6
No related branches found
No related tags found
1 merge request!405Pull teklia-nerval from pypi
......@@ -42,14 +42,6 @@ test:
- apt-get update -q
- apt-get install -q -y libgl1
# Add netrc file
- |
echo "
machine gitlab.teklia.com
login gitlab-ci-token
password $CI_JOB_TOKEN
" > ~/.netrc
except:
- schedules
......@@ -68,15 +60,6 @@ docker-build:
except:
- schedules
before_script:
# Add netrc file
- |
echo "
machine gitlab.teklia.com
login gitlab-ci-token
password $CI_JOB_TOKEN
" > ~/.netrc
script:
- ci/build.sh
......@@ -88,15 +71,7 @@ docker-build:
- public
before_script:
# Add netrc file
- |
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]
- pip install -e .[docs]
script:
- mkdocs build --strict --verbose
......@@ -193,9 +168,6 @@ bump-python-deps:
stage: deploy
image: registry.gitlab.teklia.com/infra/devops:latest
variables:
PYPI_GITLAB_URL: https://gitlab.teklia.com/api/v4/projects/210/packages
only:
- schedules
......
......@@ -13,4 +13,4 @@ COPY requirements.txt *-requirements.txt setup.py VERSION README.md ./
# Install DAN as a package with GitLab package registry
RUN --mount=type=secret,id=netrc,target=/root/.netrc \
pip install . --no-cache-dir --index-url https://gitlab.teklia.com/api/v4/projects/210/packages/pypi/simple
pip install . --no-cache-dir
......@@ -17,7 +17,7 @@ fi
IMAGE_TAG="$CI_REGISTRY_IMAGE:$VERSION"
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
if [ "$CI_COMMIT_REF_NAME" = "main" -o -n "$CI_COMMIT_TAG" ]; then
......
......@@ -81,11 +81,9 @@ Add the `docs` extra when installing `teklia-dan`:
```shell
# In a clone of the Git repository
pip install --index-url https://gitlab.teklia.com/api/v4/projects/210/packages/pypi/simple .[docs]
pip install .[docs]
```
The `--index-url` argument is required to find the `nerval` package.
Build the documentation using `mkdocs serve -v`. You can then write in [Markdown](https://www.markdownguide.org/) in the relevant `docs/*.md` files, and see live output on http://localhost:8000.
### Linter
......
......@@ -2,7 +2,7 @@
## Installation
DAN is based on a GitLab package registry containing all the nerval source code.
DAN is published on a GitLab package registry.
You need [a personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with [scope](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#personal-access-token-scopes) `read_api` in order to install this module. You will need to add the below to your `~/.netrc` file:
```shell
......@@ -11,18 +11,16 @@ login __token__
password <YOUR_PERSONAL_TOKEN>
```
If you install DAN as a dependency, the host must have access to this configuration file to be able to download the [nerval repository](https://gitlab.teklia.com/ner/nerval) package.
### As a dependency
To install DAN as a dependency, you need to first add the following line to your `requirements.txt` file:
```shell
--index-url https://gitlab.teklia.com/api/v4/projects/98/packages/pypi/simple --extra-index-url https://gitlab.teklia.com/api/v4/projects/210/packages/pypi/simple
--index-url https://gitlab.teklia.com/api/v4/projects/98/packages/pypi/simple
teklia-dan
```
The `--index-url` argument is required to find the `DAN` package, the `--extra-index-url` argument is needed to find the `nerval` dependency.
The `--index-url` argument is required to find the `DAN` package.
Then you can install it via pip:
......@@ -35,10 +33,10 @@ pip install -r requirements.txt
To install DAN directly, you can install it via pip:
```shell
pip install --index-url https://gitlab.teklia.com/api/v4/projects/98/packages/pypi/simple --extra-index-url https://gitlab.teklia.com/api/v4/projects/210/packages/pypi/simple teklia-dan
pip install --index-url https://gitlab.teklia.com/api/v4/projects/98/packages/pypi/simple teklia-dan
```
The `--index-url` argument is required to find the `DAN` package, the `--extra-index-url` argument is needed to find the `nerval` dependency.
The `--index-url` argument is required to find the `DAN` package.
---
......@@ -55,11 +53,9 @@ For development and tests purpose it may be useful to install the project as a e
To install DAN as an editable package, you can install it via pip:
```shell
pip install --index-url https://gitlab.teklia.com/api/v4/projects/210/packages/pypi/simple -e .
pip install -e .
```
The `--index-url` argument is required to find the `nerval` dependency.
Get started with:
- [Developments](development.md)
......
......@@ -254,11 +254,9 @@ To log your experiment on MLFlow, you need to:
- install the extra requirements via
```shell
$ pip install --index-url https://gitlab.teklia.com/api/v4/projects/210/packages/pypi/simple .[mlflow]
$ pip install .[mlflow]
```
The `--index-url` argument is required to find the `nerval` package.
- update the following arguments:
| Name | Description | Type | Default |
......
......@@ -14,8 +14,5 @@ deps =
commands =
pytest {tty:--color=yes} {posargs}
setenv =
PIP_INDEX_URL=https://gitlab.teklia.com/api/v4/projects/210/packages/pypi/simple
[pytest]
testpaths= tests
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment