Skip to content

Commit

Permalink
BLD: simplify setup.py and reorder build folders
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrivenaes committed Feb 8, 2021
1 parent 4216349 commit abdb213
Show file tree
Hide file tree
Showing 29 changed files with 347 additions and 675 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci-test-xtgeo-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches: [master]

jobs:

build_pywheels:
name: PY ${{ matrix.python-version }} on linux

Expand All @@ -31,5 +30,5 @@ jobs:
- name: Test with pytest
run: |
git clone --depth 1 https://github.com/equinor/xtgeo-testdata ../xtgeo-testdata
pip install pytest
pip install -r requirements/requirements_test.txt
pytest --disable-warnings
6 changes: 3 additions & 3 deletions .github/workflows/ci-test-xtgeo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ env:
CIBW_BEFORE_ALL_MACOS: "brew install swig"
CIBW_BEFORE_TEST: |
cd {project}
pip install -r requirements.txt
pip install -r requirements_test.txt
pip install -r requirements/requirements.txt
pip install -r requirements/requirements_test.txt
CIBW_TEST_COMMAND: |
cd {project}
Expand Down Expand Up @@ -74,5 +74,5 @@ jobs:
- name: Test with pytest
run: |
git clone --depth 1 https://github.com/equinor/xtgeo-testdata ../xtgeo-testdata
pip install pytest
pip install -r requirements/requirements_test.txt
pytest --disable-warnings
2 changes: 1 addition & 1 deletion .github/workflows/deploy-xtgeo-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
CIBW_BEFORE_ALL_LINUX: "sh scripts/swig_manylinux.sh"
CIBW_BEFORE_ALL_WINDOWS: "choco install -y --no-progress --allow-empty-checksums -r swig --version=4.0.1"
CIBW_BEFORE_ALL_MACOS: "brew install swig"
# CIBW_TEST_COMMAND: "python -c \"import xtgeo; print(xtgeo.__version__)\""
CIBW_TEST_COMMAND: 'python -c "import xtgeo; print(xtgeo.__version__)"'
CIBW_BUILD: |
cp36-manylinux_x86_64
cp37-manylinux_x86_64
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ src/xtgeo/_theversion.py
src/xtgeo/cxtgeo/cxtgeo*

# other
.venv*
.idea/
.projectile
.dir-locals.el
Expand All @@ -79,3 +80,4 @@ tmp_buildswig
_skbuild/
pip-wheel-metadata/
.vscode/
.venv*/
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ build:
python:
version: 3.6
install:
- requirements: requirements.txt
- requirements: docs/requirements.txt
- requirements: requirements/requirements.txt
- requirements: requirements/requirements_docs.txt
- method: setuptools
path: .
system_packages: true
Expand Down
2 changes: 1 addition & 1 deletion ci/jenkins/testkomodo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ install_package () {
}

install_test_dependencies () {
pip install -r requirements_test.txt
pip install -r requirements/requirements_test.txt
}

start_tests () {
Expand Down
9 changes: 6 additions & 3 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ up your fork for local development (first time):
$ python -m venv .
$ source bin/activate
$ cd /your_path_to_git_clone/xtgeo/
$ pip install -r requirements_dev.txt
$ pip install pip -U
$ pip install -r requirements/requirements_dev.txt
$ python setup.py clean
$ python setup.py develop
$ pytest # to check that stuff works
4. Create a branch for local development:

Expand All @@ -103,7 +105,8 @@ Now you can make your changes locally.
$ Use `pytest` for running tests
$ Run `black` on your python code, then there is no discussions on formatting
To get `flake8`, `pylint` and `black` and just pip install them into your virtualenv.
To get ``flake8``, ``pylint`` and ``black`` and just pip install them into
your virtualenv.

6. If you want to edit C code, take contact with the author for detailed instructions.

Expand All @@ -116,7 +119,7 @@ To get `flake8`, `pylint` and `black` and just pip install them into your virtua
$ git commit -m "AAA: Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature
8. Submit a pull request through the Git website.
8. Submit a pull request through the Github website.

Writing commit messages
-----------------------
Expand Down
36 changes: 18 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ exclude = '''
# manylinyx1 vs manylinux2010 issues (for Equinor Komodo installs)
[build-system]
requires = [
"pip>=19.1.1",
"setuptools>=30.3.0",
"wheel",
"scikit-build",
'cmake==3.13.3; python_version < "3.7" and platform_system == "Linux"',
'cmake==3.15.3; python_version >= "3.7" and platform_system == "Linux"',
'cmake==3.18.0; platform_system != "Linux"',
"ninja",
"setuptools_scm>=3.2.0",
'numpy==1.10.4; python_version == "3.4"',
'numpy==1.13.3; python_version >= "3.5" and python_version < "3.7" and platform_system == "Linux"',
'numpy==1.16.0; python_version >= "3.7" or platform_system != "Linux"',
'Sphinx',
'sphinx-rtd-theme',
'sphinxcontrib-apidoc',
'sphinx-autodoc-typehints',
'recommonmark',
]
"pip>=19.1.1",
"setuptools>=30.3.0",
"wheel",
"scikit-build",
'cmake==3.13.3; python_version < "3.7" and platform_system == "Linux"',
'cmake==3.15.3; python_version >= "3.7" and platform_system == "Linux"',
'cmake==3.18.0; platform_system != "Linux"',
"ninja",
"setuptools_scm>=3.2.0",
'numpy==1.10.4; python_version == "3.4"',
'numpy==1.13.3; python_version >= "3.5" and python_version < "3.7" and platform_system == "Linux"',
'numpy==1.16.0; python_version >= "3.7" or platform_system != "Linux"',
'Sphinx',
'sphinx-rtd-theme',
'sphinxcontrib-apidoc',
'sphinx-autodoc-typehints',
'recommonmark',
]
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions requirements/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
setuptools>=43
setuptools_scm>=3.2.0
scikit-build
ninja>=1.9.0.post1
cmake>3.13.3
pip>=20
wheel>=0.29.0
flake8
pydocstyle
coverage>=4.1
pytest-runner>=2.11.1
pre-commit
coverage>=4.1
Sphinx
sphinx-rtd-theme
sphinxcontrib-apidoc
sphinx-autodoc-typehints
recommonmark
bandit
numpy>1.13.1
pandas>=0.21.0
segyio>=1.8.6
matplotlib>=1.5
scipy>=0.17
shapely>=1.6.2; python_version < "3.8"
shapely==1.7a2; python_version == "3.8"
black
autopep8
pylint
pytest>=6
pytest-cov
h5py>=3
hdf5plugin>=2.3
tables>=3.5
File renamed without changes.
6 changes: 4 additions & 2 deletions docs/requirements.txt → requirements/requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
pip>=19.1.1
setuptools>=30.3.0
cmake==3.13.3
cmake>=3.13.3
scikit-build
ninja
setuptools_scm
sphinxcontrib-apidoc
pydocstyle
Sphinx
sphinx-rtd-theme
sphinxcontrib-apidoc
sphinx-autodoc-typehints
recommonmark
File renamed without changes.
11 changes: 11 additions & 0 deletions requirements/requirements_setup.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# requirements for setup on localhost
# see also ...setup_ci.txt and pyproject.toml
pip>=20
setuptools>=43
wheel
numpy
cmake
setuptools_scm
scikit-build
ninja
pytest-runner
File renamed without changes.
9 changes: 9 additions & 0 deletions requirements/requirements_setup_extras.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
flake8
pydocstyle
coverage>=4.1
pre-commit
coverage>=4.1
bandit
autopep8
pylint
pytest-cov
File renamed without changes.
40 changes: 0 additions & 40 deletions requirements_dev.txt

This file was deleted.

70 changes: 0 additions & 70 deletions scripts/.appveyor.yml

This file was deleted.

Loading

0 comments on commit abdb213

Please sign in to comment.