Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/colab install #155

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.9']

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- id: cache-dependencies
name: Cache dependencies
uses: actions/cache@v2.1.7
with:
path: ${{ github.workspace }}/.venv
key: dependencies-${{ hashFiles('**/poetry.lock') }}
restore-keys: dependencies-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -37,7 +43,12 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test a minimal install
run: |
pip install .
python -m pip install -U pip poetry
poetry --version
poetry check --no-interaction
poetry config virtualenvs.in-project true
poetry install --no-interaction
# pip install .
python tests/test_minimal.py
- name: Install APT and dependencies On Linux
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ key.asc
.~*
VERSION*

*.lock
setup.py

test/test_data/*.xlsx
21 changes: 0 additions & 21 deletions project.toml

This file was deleted.

80 changes: 80 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[tool.poetry]
name = "welleng"
version = "0.7.3"
description = "A collection of Well Engineering tools"
authors = ["Jonathan Corcutt <jonnycorcutt@gmail.com>"]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/jonnymaserati/welleng"
repository = "https://github.com/python-poetry/poetry"
documentation = "https://jonnymaserati.github.io/welleng/build/html/index.html"
keywords = [
"well",
"trajectory",
"wellpath",
"wellbore",
"drilling",
"drill",
"error",
"separation",
"minimum curvature",
"iscwsa",
"owsg",
"well engineering",
"wells",
"drilling engineering",
"directional drilling",
"mwd",
"survey",
"covariance",
"digitalization",
"automation",
"volve",
"witsml",
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Natural Language :: English",
"Topic :: Scientific/Engineering",
]
include = [
{path = "errors/*.yaml"},
{path = "errors/tool_codes/*.yaml"},
{path = "exchange/*.yaml"}
]
exclude = [
"tests/*.py"
]

[tool.poetry.dependencies]
python = ">=3.9, <3.12"
numpy = "^1.18"
scipy = "^1.10.1"
Pint = "^0.20.1"
PyYAML = "^6.0"
vtk = "^9.2.6"
magnetic-field-calculator = {version="^1.0.2", optional=true}
networkx = {version="^3.0", optional=true}
openpyxl = {version="^3.1.2", optional=true}
pandas = {version="^1.5.3", optional=true}
tabulate = {version="^0.9.0", optional=true}
trimesh = {version="^3.21.3", optional=true}
utm = {version="^0.7.0", optional=true}
vedo = {version="^2023.4.4", optional=true}
python-fcl = {version="^0.7.0", optional=true}

[tool.poetry.dev-dependencies]
# numba = {version="^0.56.4", optional=true}

[tool.poetry.extras]
easy = ["magnetic-field-calculator", "networkx", "openpyxl", "pandas",
"tabulate", "trimesh", "utm", "vedo"]
advanced = ["magnetic-field-calculator", "networkx", "openpyxl", "pandas",
"tabulate", "trimesh", "utm", "vedo", "python-fcl"]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

127 changes: 0 additions & 127 deletions setup.py

This file was deleted.

5 changes: 3 additions & 2 deletions welleng/survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
from scipy.optimize import minimize
from scipy.spatial.transform import Rotation as R

from .version import __version__
from .version import __version__ as VERSION

from .utils import (
MinCurve,
get_nev,
Expand Down Expand Up @@ -1930,7 +1931,7 @@ def export_csv(

author = kwargs.get('author', 'Jonny Corcutt')
comments = [
f"welleng, version: {__version__}\n"
f"welleng, version: {VERSION}\n"
f"author, {author}\n"
]
comments.extend([
Expand Down
4 changes: 3 additions & 1 deletion welleng/version.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = '0.7.3'
import importlib.metadata

__version__ = importlib.metadata.version('welleng') # in case I missed one