-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from Telecominfraproject/develop
Merge develop into master in preparation for the 1.8 release Highlights for the upcoming release: - Raman simulation - automatic building of Docker images - bugfixes, refactoring, CI and docs improvements
- Loading branch information
Showing
42 changed files
with
3,093 additions
and
1,014 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
cp -nr /oopt-gnpy/examples /shared | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
IMAGE_NAME=telecominfraproject/oopt-gnpy | ||
IMAGE_TAG=$(git describe --tags) | ||
|
||
ALREADY_FOUND=0 | ||
docker pull ${IMAGE_NAME}:${IMAGE_TAG} && ALREADY_FOUND=1 | ||
|
||
if [[ $ALREADY_FOUND == 0 ]]; then | ||
docker build . -t ${IMAGE_NAME} | ||
docker tag ${IMAGE_NAME} ${IMAGE_NAME}:${IMAGE_TAG} | ||
|
||
# shared directory setup: do not clobber the real data | ||
mkdir trash | ||
cd trash | ||
docker run -it --rm --volume $(pwd):/shared ${IMAGE_NAME} ./transmission_main_example.py | ||
else | ||
echo "Image ${IMAGE_NAME}:${IMAGE_TAG} already available, will just update the other tags" | ||
fi | ||
|
||
docker images | ||
|
||
do_docker_login() { | ||
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin | ||
} | ||
|
||
if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then | ||
if [[ "${TRAVIS_BRANCH}" == "develop" || "${TRAVIS_BRANCH}" == "docker" ]]; then | ||
echo "Publishing latest" | ||
docker tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:latest | ||
do_docker_login | ||
if [[ $ALREADY_FOUND == 0 ]]; then | ||
docker push ${IMAGE_NAME}:${IMAGE_TAG} | ||
fi | ||
docker push ${IMAGE_NAME}:latest | ||
elif [[ "${TRAVIS_BRANCH}" == "master" ]]; then | ||
echo "Publishing stable" | ||
docker tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:stable | ||
do_docker_login | ||
if [[ $ALREADY_FOUND == 0 ]]; then | ||
docker push ${IMAGE_NAME}:${IMAGE_TAG} | ||
fi | ||
docker push ${IMAGE_NAME}:stable | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
dist: xenial | ||
sudo: false | ||
language: python | ||
services: docker | ||
python: | ||
- "3.6" | ||
- "3.7" | ||
# command to install dependencies | ||
install: | ||
install: skip | ||
script: | ||
- python setup.py install | ||
- pip install pytest-cov rstcheck | ||
script: | ||
- pytest --cov-report=xml --cov=gnpy | ||
- rstcheck --ignore-roles cite --ignore-directives automodule --recursive --ignore-messages '(Duplicate explicit target name.*)' . | ||
- ./examples/transmission_main_example.py | ||
- ./examples/path_requests_run.py | ||
- ./examples/transmission_main_example.py examples/raman_edfa_example_network.json --sim examples/sim_params.json --show-channels | ||
- sphinx-build docs/ x-throwaway-location | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) | ||
jobs: | ||
include: | ||
- stage: test | ||
name: Docker image | ||
script: | ||
- git fetch --unshallow | ||
- ./.docker-travis.sh | ||
- docker images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM python:3.7-slim | ||
COPY . /oopt-gnpy | ||
WORKDIR /oopt-gnpy | ||
RUN python setup.py install | ||
WORKDIR /shared/examples | ||
ENTRYPOINT ["/oopt-gnpy/.docker-entry.sh"] | ||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,3 @@ Module contents | |
--------------- | ||
|
||
.. automodule:: gnpy | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Oops, something went wrong.