Commit 40750649 authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

URL change to new git instance.

parent 51711771
...@@ -19,12 +19,12 @@ build-job: ...@@ -19,12 +19,12 @@ build-job:
- python3 setup.py sdist bdist_wheel - python3 setup.py sdist bdist_wheel
- apt-get install -y -qq curl - apt-get install -y -qq curl
# get the current package id # get the current package id
- 'export ID=$(curl --request GET --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://gitext.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages" | grep -P "(?<=.id.:)(\\d+)" -o )' - 'export ID=$(curl --request GET --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages" | grep -P "(?<=.id.:)(\\d+)" -o )'
# remove the package, as we want a new build even if the version number did not change # remove the package, as we want a new build even if the version number did not change
- 'echo $ID' - 'echo $ID'
- 'curl --request DELETE --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://gitext.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/$ID"' - 'curl --request DELETE --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/$ID"'
# upload # upload
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url https://gitext.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/* --verbose - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/* --verbose
only: only:
changes: changes:
- pymagglobal/*.py - pymagglobal/*.py
...@@ -37,10 +37,10 @@ test-conda: ...@@ -37,10 +37,10 @@ test-conda:
image: continuumio/miniconda3 image: continuumio/miniconda3
script: script:
- conda install cartopy - conda install cartopy
- pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@gitext.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple - pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple
- python3 tests/run_tests.py - python3 tests/run_tests.py
- pip uninstall -y pymagglobal - pip uninstall -y pymagglobal
- pip install pymagglobal[tests] --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@gitext.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple - pip install pymagglobal[tests] --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple
- python3 tests/run_tests.py - python3 tests/run_tests.py
only: only:
changes: changes:
...@@ -55,10 +55,10 @@ test-job: ...@@ -55,10 +55,10 @@ test-job:
script: script:
- apt-get update -y -qq - apt-get update -y -qq
- apt-get install -y -qq python3-dev python3-pip python3-cartopy - apt-get install -y -qq python3-dev python3-pip python3-cartopy
- pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@gitext.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple - pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple
- python3 tests/run_tests.py - python3 tests/run_tests.py
- pip uninstall -y pymagglobal - pip uninstall -y pymagglobal
- pip install pymagglobal[tests] --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@gitext.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple - pip install pymagglobal[tests] --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple
- python3 tests/run_tests.py - python3 tests/run_tests.py
artifacts: artifacts:
paths: paths:
...@@ -74,7 +74,7 @@ pages: ...@@ -74,7 +74,7 @@ pages:
script: script:
- apt-get update -y -qq - apt-get update -y -qq
- apt-get install -y -qq python3-dev python3-pip python3-cartopy - apt-get install -y -qq python3-dev python3-pip python3-cartopy
- pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@gitext.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple - pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple
- pip install sphinx sphinx-argparse - pip install sphinx sphinx-argparse
- sphinx-build -b html docs public - sphinx-build -b html docs public
artifacts: artifacts:
......
...@@ -9,7 +9,7 @@ By default, `pymagglobal` includes several models. Use ...@@ -9,7 +9,7 @@ By default, `pymagglobal` includes several models. Use
```console ```console
$ pymagglobal --list-models $ pymagglobal --list-models
``` ```
to get a list of these default models or go to [pymagglobal/dat](https://gitext.gfz-potsdam.de/sec23/korte/pymagglobal/-/tree/master/pymagglobal/dat) for further information. Using to get a list of these default models or go to [pymagglobal/dat](https://git.gfz-potsdam.de/sec23/korte/pymagglobal/-/tree/master/pymagglobal/dat) for further information. Using
```console ```console
$ pymagglobal ... <path/to/your_model> $ pymagglobal ... <path/to/your_model>
``` ```
...@@ -49,7 +49,7 @@ Data files are licensed under [CC-BY 4.0](https://creativecommons.org/licenses/b ...@@ -49,7 +49,7 @@ Data files are licensed under [CC-BY 4.0](https://creativecommons.org/licenses/b
`pymagglobal` is distributed via the PyPI registry of this repository. It can be installed using `pymagglobal` is distributed via the PyPI registry of this repository. It can be installed using
```console ```console
$ pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@gitext.gfz-potsdam.de/api/v4/projects/1055/packages/pypi/simple $ pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/1055/packages/pypi/simple
``` ```
Since [conda](https://docs.conda.io/) version 4.6, conda and pip get along well. So you can also run `pip install ...` from inside your conda environment. Since [conda](https://docs.conda.io/) version 4.6, conda and pip get along well. So you can also run `pip install ...` from inside your conda environment.
...@@ -61,7 +61,7 @@ $ nix-shell ...@@ -61,7 +61,7 @@ $ nix-shell
from within the `pymagglobal` root directory. You may also use the nix-expression [pymagglobal.nix] to include `pymagglobal` in your own environments. from within the `pymagglobal` root directory. You may also use the nix-expression [pymagglobal.nix] to include `pymagglobal` in your own environments.
## Documentation ## Documentation
Check out the extended documention [here](https://sec23.gitext-pages.gfz-potsdam.de/korte/pymagglobal). From the command line, you can use `pymagglobal` to get various results from the models. For example, Check out the extended documention [here](https://sec23.git-pages.gfz-potsdam.de/korte/pymagglobal). From the command line, you can use `pymagglobal` to get various results from the models. For example,
```console ```console
$ pymagglobal dipole gufm1 $ pymagglobal dipole gufm1
``` ```
...@@ -126,7 +126,7 @@ $ python tests/run_tests.py ...@@ -126,7 +126,7 @@ $ python tests/run_tests.py
``` ```
from `<pymagglobal>`. Some tests require `FieldTools`, `packaging` and `orthopoly` and will be skipped, if the respective pacakges are not available. You can install `orthopoly` and `packaging` together with `pymagglobal`, by running from `<pymagglobal>`. Some tests require `FieldTools`, `packaging` and `orthopoly` and will be skipped, if the respective pacakges are not available. You can install `orthopoly` and `packaging` together with `pymagglobal`, by running
```console ```console
$ pip install pymagglobal[tests] --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@gitext.gfz-potsdam.de/api/v4/projects/1055/packages/pypi/simple $ pip install pymagglobal[tests] --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/1055/packages/pypi/simple
``` ```
We also provide the expression for a nix-shell with all dependencies installed. This will however not test your local installation, but your local repository. To perform the tests, run We also provide the expression for a nix-shell with all dependencies installed. This will however not test your local installation, but your local repository. To perform the tests, run
......
...@@ -64,7 +64,7 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] ...@@ -64,7 +64,7 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# Add external links to source code # Add external links to source code
def linkcode_resolve(domain, info): def linkcode_resolve(domain, info):
'''Returns external links to the source of objects''' '''Returns external links to the source of objects'''
url = 'https://gitext.gfz-potsdam.de/sec23/korte/pymagglobal' url = 'https://git.gfz-potsdam.de/sec23/korte/pymagglobal'
filename = info['module'].replace('.', '/') + '.py' filename = info['module'].replace('.', '/') + '.py'
if info['fullname'] in core_members: if info['fullname'] in core_members:
return url + '/-/tree/master/' + info['module'] + '/core.py' return url + '/-/tree/master/' + info['module'] + '/core.py'
......
...@@ -22,9 +22,9 @@ Installation ...@@ -22,9 +22,9 @@ Installation
.. code-block:: bash .. code-block:: bash
$ pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@gitext.gfz-potsdam.de/api/v4/projects/1055/packages/pypi/simple $ pip install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/1055/packages/pypi/simple
See also `here <https://gitext.gfz-potsdam.de/sec23/korte/pymagglobal#installation>`_ and `here <https://gitext.gfz-potsdam.de/sec23/korte/pymagglobal#testing>`_. See also `here <https://git.gfz-potsdam.de/sec23/korte/pymagglobal#installation>`_ and `here <https://git.gfz-potsdam.de/sec23/korte/pymagglobal#testing>`_.
.. include:: ../pymagglobal/dat/README.rst .. include:: ../pymagglobal/dat/README.rst
...@@ -54,4 +54,4 @@ Indices and tables ...@@ -54,4 +54,4 @@ Indices and tables
* :ref:`genindex` * :ref:`genindex`
* :ref:`modindex` * :ref:`modindex`
* :ref:`search` * :ref:`search`
* `Repository <https://gitext.gfz-potsdam.de/sec23/korte/pymagglobal/>`_ * `Repository <https://git.gfz-potsdam.de/sec23/korte/pymagglobal/>`_
...@@ -80,7 +80,7 @@ class ListModelsAction(argparse.Action): ...@@ -80,7 +80,7 @@ class ListModelsAction(argparse.Action):
print(f'Currently available models are:') print(f'Currently available models are:')
for it in models_list: for it in models_list:
print(it) print(it)
print(f'Visit https://gitext.gfz-potsdam.de/sec23/korte/pymagglobal/' print(f'Visit https://git.gfz-potsdam.de/sec23/korte/pymagglobal/'
f'-/tree/master/pymagglobal/dat for detailed information.') f'-/tree/master/pymagglobal/dat for detailed information.')
parser.exit() parser.exit()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment