Skip to content

Commit

Permalink
Restructure packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrivenaes committed Aug 1, 2019
1 parent cfe614c commit 85a0f44
Show file tree
Hide file tree
Showing 19 changed files with 161 additions and 242 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ __pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
Expand Down Expand Up @@ -46,6 +43,7 @@ coverage.xml
*,cover
.hypothesis/
TMP/
src/xtgeoapp_grd3dmaps/_theversion.py

# Translations
*.mo
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Credits
Development Lead
----------------

* Jan C. Rivenaes <jriv@statoil.com>
* Jan C. Rivenaes <jriv@equinor.com>

Contributors
------------
Expand Down
28 changes: 12 additions & 16 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/Statoil/xtgeo-utils2/issues.
Report bugs at https://github.com/equinor/xtgeoapp-grd3dmaps/issues.

If you are reporting a bug, please include:

Expand All @@ -38,15 +38,15 @@ and "help wanted" is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~

xtgeo-utils2 could always use more documentation, whether as part of the
official xtgeo-utils2 docs, in docstrings, or even on the web in blog posts,
xtgeoapp-grd3dmaps could always use more documentation, whether as part of the
official xtgeoapp-grd3dmaps docs, in docstrings, or even on the web in blog posts,
articles, and such.

Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue
at https://github.com/Statoil/xtgeo-utils2/issues.
at https://github.com/equinor/xtgeoapp-grd3dmaps/issues.

If you are proposing a feature:

Expand All @@ -58,18 +58,18 @@ If you are proposing a feature:
Get Started!
------------

Ready to contribute? Here's how to set up `xtgeo-utils2` for local development.
Ready to contribute? Here's how to set up `xtgeoapp-grd3dmaps` for local development.

1. Fork the `xtgeo-utils2` repo on Github Statoil
1. Fork the `xtgeoapp-grd3dmaps` repo on Github equinor
2. Clone your fork locally::

$ git clone [email protected]:your_name_here/xtgeo-utils2.git
$ git clone [email protected]:your_name_here/xtgeoapp-grd3dmaps.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed,
this is how you set up your fork for local development::

$ mkvirtualenv xtgeo-utils2
$ cd xtgeo-utils2/
$ mkvirtualenv xtgeoapp-grd3dmaps
$ cd xtgeoapp-grd3dmaps/
$ python setup.py develop

4. Create a branch for local development::
Expand All @@ -81,11 +81,10 @@ Ready to contribute? Here's how to set up `xtgeo-utils2` for local development.
5. When you're done making changes, check that your changes pass flake8 and the tests,
including testing other Python versions with tox::

$ flake8 xtgeo-utils2 tests
$ flake8 xtgeoapp-grd3dmaps tests
$ python setup.py test or py.test
$ tox ...?

To get flake8 and tox, just pip install them into your virtualenv.
To get flake8 etc, just pip install them into your virtualenv.

6. Commit your changes and push your branch to GitHub::

Expand All @@ -95,6 +94,7 @@ Ready to contribute? Here's how to set up `xtgeo-utils2` for local development.

7. Submit a pull request through the Git website.


Pull Request Guidelines
-----------------------

Expand All @@ -106,10 +106,6 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.

.. 3. The pull request should work for Python 2.7, 3.4, and for PyPy(?). Check
.. https://travis-ci.org/xxx/xtgeo-utils2/pull_requests (INACTIVE)
.. and make sure that the tests pass for all supported Python versions.
Tips
----

Expand Down
4 changes: 2 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ History

See commits and releases on Github:

* https://github.com/Statoil/xtgeo-utils2/commits/master
* https://github.com/Statoil/xtgeo-utils2/releases
* https://github.com/equinor/xtgeoapp-grd3dmaps/commits/master
* https://github.com/equinor/xtgeoapp-grd3dmaps/releases
12 changes: 0 additions & 12 deletions MANIFEST.in

This file was deleted.

3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ dist: clean ## builds wheel package

install: dist ## version to VENV install place
@echo "Running ${PIP} (${PYTHON_VERSION}) ..."
@${PIP} install --upgrade ./dist/*
@rsync -av --delete bin/grid3d* ${VIRTUAL_ENV}/bin/.
@${PIP} install --upgrade --global-option=build --global-option='--executable=/usr/bin/env python' .


siteinstall: dist ## Install in project/res (Trondheim) using $TARGET
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
======================================
The scripts in *xtgeo_utils2*
The scripts in *xtgeoapp_grd3dmaps*
======================================

Two scripts here, one for hc thickness maps and one for average maps.
Expand Down
11 changes: 0 additions & 11 deletions bin/grid3d_average_map

This file was deleted.

11 changes: 0 additions & 11 deletions bin/grid3d_contact_map

This file was deleted.

11 changes: 0 additions & 11 deletions bin/grid3d_hc_thickness

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

# General information about the project.
project = u'xtgeo_utils2'
copyright = u"Statoil (contact person: Jan C. Rivenæs, [email protected])"
copyright = u"equinor (contact person: Jan C. Rivenæs, [email protected])"

# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
Expand Down
6 changes: 3 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ From sources
------------

The sources for xtgeo_utils2 can be downloaded from
the `Statoil Git repo`_.
the `equinor Git repo`_.

You can then clone the repository:

.. code-block:: console
$ git clone [email protected]:Statoil/xtgeo-utils2
$ git clone [email protected]:equinor/xtgeoapp-grd3dmaps
Once you have a copy of the source, and you have a `virtual environment`_,
you can install locally (for development and testing) it with:
Expand All @@ -38,5 +38,5 @@ you can install locally (for development and testing) it with:
However, if you will like to contribute, making a personal fork is strongly
recommended, see :ref:`Contributing`.

.. _Statoil Git repo: https://github.com/Statoil/xtgeo-utils2
.. _equinor Git repo: https://github.com/equinor/xtgeoapp-grd3dmaps
.. _virtual environment: http://docs.python-guide.org/en/latest/dev/virtualenvs/
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
xtgeo >= 2.0.0
PyYAML
3 changes: 0 additions & 3 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
pip>=9.0.0
bumpversion>=0.5.3
wheel>=0.29.0
watchdog>=0.8.3
flake8>=2.6.0
tox>=2.3.1
coverage>=4.1
Sphinx>=1.4.8
pytest>=2.9.2
pytest-runner>=2.11.1
versioneer==0.18
8 changes: 0 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,3 @@ test = pytest

[tool:pytest]
addopts = --verbose -x

[versioneer]
VCS = git
style = pep440
versionfile_source = xtgeo_utils2/_version.py
versionfile_build = xtgeo_utils2/_version.py
tag_prefix = ''
parentdir_prefix = xtgeo_utils2-
23 changes: 10 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,10 @@ def src(x):

setup_requirements = ["pytest-runner", "wheel", "setuptools_scm>=3.2.0"]

test_requirements = [
"pytest",
# TODO: put package test requirements here
]
test_requirements = ["pytest"]

hc_function = "grid3d_hc_thickness=" "xtgeoapp_grd3dmaps.avghc.grid3d_hc_thickness:main"
avg_function = "grid3d_average_map=" "xtgeoapp_grd3maps.avghc.grid3d_average_map:main"
con_function = (
"grid3dapp_contact_map=" "xtgeoapp_grd3dmaps.contact.grd3d_contact_map:main"
)
hc_function = "grid3d_hc_thickness=" "xtgeoapp_grd3dmaps.grid3d_hc_thickness:main"
avg_function = "grid3d_average_map=" "xtgeoapp_grd3dmaps.grid3d_average_map:main"


setup(
Expand All @@ -54,17 +48,17 @@ def src(x):
},
description="Make HC thickness, avg maps, etc directly from 3D props",
long_description=readme + "\n\n" + history,
author="Jan C. Rivenaes",
author_email="jriv@statoil.com",
author="Equinor R&T",
author_email="jriv@equinor.com",
url="https://github.com/equinor/xtgeoapp_grd3dmaps",
packages=find_packages("src"),
package_dir={"": "src"},
py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")],
entry_points={"console_scripts": [hc_function, avg_function, con_function]},
entry_points={"console_scripts": [hc_function, avg_function]},
include_package_data=True,
install_requires=requirements,
zip_safe=False,
keywords="xtgeo_utils2",
keywords="xtgeo",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand All @@ -74,6 +68,9 @@ def src(x):
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
test_suite="tests",
tests_require=test_requirements,
Expand Down
Loading

0 comments on commit 85a0f44

Please sign in to comment.