Skip to content

Commit

Permalink
Merge pull request #117 from jcrivenaes/dev
Browse files Browse the repository at this point in the history
Added logo, some badges, and general fixes
  • Loading branch information
jcrivenaes authored May 16, 2019
2 parents e6f5d9f + 7bdf2e4 commit 506d45c
Show file tree
Hide file tree
Showing 14 changed files with 826 additions and 42 deletions.
9 changes: 0 additions & 9 deletions .pypirc

This file was deleted.

22 changes: 13 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,21 @@ matrix:
- SOURCEDEPLOY=1

before_install:
- echo "PWD is $PWD"
- unset -f pushd
- unset -f popd
- git clone https://github.com/matthew-brett/multibuild
- ls -l
- source multibuild/common_utils.sh
- source multibuild/travis_steps.sh
- before_install
- echo "PWD is $PWD"
- unset -f pushd
- unset -f popd
- git clone https://github.com/matthew-brett/multibuild
- ls -l
- source multibuild/common_utils.sh
- source multibuild/travis_steps.sh
- before_install

install:
- build_wheel $REPO_DIR $PLAT
- pip install bandit
- build_wheel $REPO_DIR $PLAT

before_script:
- bandit -c bandit.yml -r src/xtgeo

script:
- install_run $PLAT
Expand Down
13 changes: 10 additions & 3 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@

# History (changelog) #

## 2.0.0 ##
## dev ##

* Adding services for code improvements (codacy, bandit)

* First version after Open Sourcing to LGPL v3+
## 2.0.1 ##

* Minor improvements in setup and documentation
* Travis automatic deploy works now

## 2.0.0 ##

* First version after Open Sourcing to LGPL v3+

## Version 0 and 1 ##

Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
# > setenv PYTHON_SHORT 2.7; setenv PYTHON_SHORT 2.7;
# > make install
#
# OLD:
# SDP special:
# $TARGET may also be applied explicitly for e.g. install at /project/res
# > setenv RESTARGET ${SDP_BINDIST_ROOT}/lib/python${PYTHON_SHORT}/site-packages
# > make oldsiteinstall TARGET=$RESTARGET
# > make sdpsiteinstall TARGET=$RESTARGET
#
# NEW:
# Instead of TARGET, the preferred method is now setting PREFIX instead:
Expand Down Expand Up @@ -78,6 +78,7 @@ cclean: clean-cc ## remove all C compiling (CXTGeo) build
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr wheel*/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -fr {} +
Expand Down Expand Up @@ -175,7 +176,7 @@ install: dist ## version to VENV install place
@${PIP} install --upgrade .


oldsiteinstall: allclean dist ## Install in Equinor using $TARGET (old)
sdpsiteinstall: allclean dist ## Install in Equinor using $TARGET (old)
@echo $(HOST)
\rm -fr ${TARGET}/${APPLICATION}
\rm -fr ${TARGET}/${APPLICATION}-*
Expand All @@ -184,8 +185,8 @@ oldsiteinstall: allclean dist ## Install in Equinor using $TARGET (old)

siteinstall: allclean dist ## Install to custom place using $PREFIX aka make siteinstall PREFIX=/local/usr
@echo $(HOST)
\rm -fr ${TARGET}/${APPLICATION}
\rm -fr ${TARGET}/${APPLICATION}-*
\rm -fr ${PREFIX}/${APPLICATION}
\rm -fr ${PREFIX}/${APPLICATION}-*
pip install --prefix=${PREFIX} .


Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# XTGeo #
[![Build Status](https://travis-ci.com/equinor/xtgeo.svg?branch=master)](https://travis-ci.com/equinor/xtgeo)
[![PyPI version](https://badge.fury.io/py/xtgeo.svg)](https://badge.fury.io/py/xtgeo)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c209aeed6a2a40b08ea859aeadf31cb0)](https://www.codacy.com/app/jcrivenaes/xtgeo?utm_source=github.com&utm_medium=referral&utm_content=equinor/xtgeo&utm_campaign=Badge_Grade)

## Introduction ##

Expand Down Expand Up @@ -34,6 +36,15 @@ pip install xtgeo
For detailed installation instructions (implies C compiling), see
the documentation.

## Documentation ##

XTGeo will be present at readthedocs soon. In the mean time, clone the project
and run

```
make docs
```


## Getting started ##

Expand Down
1 change: 1 addition & 0 deletions bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skips: ['B101', 'B311']
Binary file added docs/images/xtgeo-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
770 changes: 770 additions & 0 deletions docs/images/xtgeo-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ tox==2.3.1
coverage==4.1
Sphinx
sphinx-rtd-theme
bandit
10 changes: 4 additions & 6 deletions scripts/config.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
SWIGURL="https://ftp.osuosl.org/pub/blfs/conglomeration/swig"
SWIG="swig-3.0.12"
#!/bin/bash

function pre_build {

echo "Prebuild stage, install swig..."
build_swig
}

function run_tests {
set -x
# need to install git on the test docker image to get the test data
apt-get -y update > /dev/null
apt-get -y install git > /dev/null
git clone --depth 1 https://github.com/equinor/xtgeo-testdata ../../xtgeo-testdata
ls -l ..
ls -l ../..
pip install pytest

python -c "import xtgeo; print(xtgeo.__version__)"
pushd ..
pytest tests/test_well
pytest tests
}
15 changes: 6 additions & 9 deletions src/xtgeo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# pylint: skip-file
"""The XTGeo Python module."""



from __future__ import division, absolute_import
from __future__ import print_function
import os
Expand Down Expand Up @@ -40,7 +38,6 @@ def _xprint(msg):

_xprint('XTGEO __init__ ...')

import os
# to avoid problems in batch runs when no DISPLAY is set:
_xprint('Import matplotlib etc...')
import matplotlib as mplib
Expand All @@ -54,15 +51,15 @@ def _xprint(msg):

if display == '' or 'grid' in dhost or 'lgc' in dhost or ertbool:

print('')
print('=' * 79)
_xprint('')
_xprint('=' * 79)

print(
'XTGeo info: No display found or ERT server. Using non-interactive '
'Agg backend for matplotlib'
_xprint(
'XTGeo info: No display found or a batch (e.g. ERT) server. '
'Using non-interactive Agg backend for matplotlib'
)
mplib.use('Agg')
print('=' * 79)
_xprint('=' * 79)

#
# Order matters!
Expand Down
2 changes: 1 addition & 1 deletion src/xtgeo/cxtgeo/clib/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ endmacro(make_library)

FILE(GLOB SOURCES *.c)
set (SOURCE_FILES ${SOURCES})
set (CMAKE_C_FLAGS "-Wall -O2 -fPIC -Wno-unused-but-set-variable")
set (CMAKE_C_FLAGS "-Wall -O2 -fPIC -Wno-unused-but-set-variable -std=c99")

add_library(cxtgeo STATIC ${SOURCE_FILES})
2 changes: 2 additions & 0 deletions src/xtgeo/cxtgeo/clib/src/libxtg.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
*
*/

#define _GNU_SOURCE
#include <stdio.h>


#define PI 3.14159265358979323846
#define M_PI 3.14159265358979323846
#define PIHALF 1.57079632679489661923

#define FLOATEPS 1.0E-05
Expand Down
1 change: 1 addition & 0 deletions src/xtgeo/cxtgeo/clib/src/x_nint.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
*/

#define _ISOC99_SOURCE
#include "libxtg_.h"
#include <math.h>

Expand Down

0 comments on commit 506d45c

Please sign in to comment.