Skip to content

Commit

Permalink
Migrate code on github (#1)
Browse files Browse the repository at this point in the history
Co-authored-by: mbertin <[email protected]>
  • Loading branch information
nitreb and mbertin authored Mar 20, 2024
1 parent b2d83f5 commit 095d99c
Show file tree
Hide file tree
Showing 47 changed files with 1,374 additions and 969 deletions.
2 changes: 0 additions & 2 deletions .condarc
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
channel_alias: https://nexus.mercator-ocean.fr/repository
channels:
- conda-proxy
- conda-forge
29 changes: 29 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check format

on: push

jobs:
check-format:
runs-on: self-hosted

steps:
- name: Check out code
uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0'
micromamba-binary-path: ${{ runner.temp }}/bin/micromamba
environment-file: conda_environment.yaml
environment-name: copernicusmarine
condarc-file: .condarc
cache-environment: true
post-cleanup: 'all'

- name: Poetry install
run: poetry install
shell: micromamba-shell {0}

- name: Check format
run: make check-format
shell: micromamba-shell {0}
66 changes: 0 additions & 66 deletions .github/workflows/ci.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run tests

on:
pull_request:
branches: [ "main" ]

jobs:
tests:
runs-on: self-hosted

steps:
- name: Check out code
uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0'
micromamba-binary-path: ${{ runner.temp }}/bin/micromamba
environment-file: conda_environment_test.yaml
environment-name: copernicusmarine_test
condarc-file: .condarc
cache-environment: true
post-cleanup: 'all'

- name: Run tests
env:
COPERNICUS_MARINE_SERVICE_USERNAME: ${{ secrets.COPERNICUS_MARINE_SERVICE_USERNAME }}
COPERNICUS_MARINE_SERVICE_PASSWORD: ${{ secrets.COPERNICUS_MARINE_SERVICE_PASSWORD }}
run: make run-tests
shell: micromamba-shell {0}
30 changes: 30 additions & 0 deletions .github/workflows/tox-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run tests

on:
schedule:
- cron: '0 0 * * 6'

jobs:
tests:
runs-on: self-hosted

steps:
- name: Check out code
uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0'
micromamba-binary-path: ${{ runner.temp }}/bin/micromamba
environment-file: conda_environment_test_tox.yaml
environment-name: copernicusmarine_test_tox
condarc-file: .condarc
cache-environment: true
post-cleanup: 'all'

- name: Run tests
env:
COPERNICUS_MARINE_SERVICE_USERNAME: ${{ secrets.COPERNICUS_MARINE_SERVICE_USERNAME }}
COPERNICUS_MARINE_SERVICE_PASSWORD: ${{ secrets.COPERNICUS_MARINE_SERVICE_PASSWORD }}
run: make run-tests-dependencie-versions
shell: micromamba-shell {0}
121 changes: 0 additions & 121 deletions .gitlab-ci.yml

This file was deleted.

17 changes: 16 additions & 1 deletion CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pytest tests --log-level -vv tests --durations=0 --log-level=info
If you have the [`moi`](https://gitlab.mercator-ocean.fr/internal/shell-utils) command installed:
```sh
VERSION=<VERSION> PYPI_TOKEN=`moi read-secret --name PYPI_TOKEN` make release
VERSION=<VERSION> DOCKER_HUB_USERNAME=`moi read-secret --name DOCKER_HUB_USERNAME` DOCKER_HUB_PUSH_TOKEN=`moi read-secret --name DOCKER_HUB_PUSH_TOKEN` PYPI_TOKEN=`moi read-secret --name PYPI_TOKEN` make release
```

Otherwise:
Expand All @@ -83,3 +83,18 @@ poetry publish --build --username __token__ --password $PYPI_TOKEN
```

Then tag the appropriate persons and add the changelog the Jira issue, before merging the branch.

## Build the Docker image

If you have the [`moi`](https://gitlab.mercator-ocean.fr/internal/shell-utils) command installed:
```sh
VERSION=<VERSION> DOCKER_HUB_USERNAME=`moi read-secret --name DOCKER_HUB_USERNAME` DOCKER_HUB_PUSH_TOKEN=`moi read-secret --name DOCKER_HUB_PUSH_TOKEN` make build-and-publish-dockerhub-image
```

## Update the conda-forge feedstock repository

First, here is the link to the conda-forge feedstock repository: [https://github.com/conda-forge/copernicusmarine-feedstock](https://github.com/conda-forge/copernicusmarine-feedstock).

All the conda-forge informations about this repository are available [here in the README](https://github.com/orgs/conda-forge/teams/copernicusmarine). To update it (new version, new maintainer...), please follow the indicated procedure.

Please also take a look at [this conda-forge documentation](https://conda-forge.org/docs/maintainer/updating_pkgs/#example-workflow-for-updating-a-package) for more information about the update procedure.
18 changes: 0 additions & 18 deletions Dockerfile.ci

This file was deleted.

12 changes: 0 additions & 12 deletions Dockerfile.ci.tests

This file was deleted.

24 changes: 0 additions & 24 deletions Dockerfile.ci.tests.tox

This file was deleted.

7 changes: 7 additions & 0 deletions Dockerfile.dockerhub
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.12.2

ARG VERSION

RUN pip install copernicusmarine==$VERSION

ENTRYPOINT [ "copernicusmarine" ]
Loading

0 comments on commit 095d99c

Please sign in to comment.