-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
154 additions
and
95 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
name: Upload Python Package | ||
name: PyPi Publisher | ||
|
||
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_APIKEY }} | ||
pypi-publisher: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: thevickypedia/pypi-publisher@v3 | ||
env: | ||
token: ${{ secrets.PYPI_APIKEY }} | ||
with: | ||
python-version: "3.10" | ||
skip-existing: true |
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,36 @@ | ||
name: Python testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Testing on ${{matrix.os}} | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
# setuptools_scm requires a non-shallow clone of the repository | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Python package | ||
run: | | ||
python -m pip install .[test] | ||
- name: Run Python tests | ||
run: | | ||
python -m pytest |
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 |
---|---|---|
|
@@ -53,6 +53,3 @@ docs/notebooks/.ipynb_checkpoints/ | |
|
||
# virtual environment | ||
.venv | ||
|
||
# pre-commit | ||
.pre-commit-config.yaml |
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,40 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-illegal-windows-names | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 24.8.0 | ||
hooks: | ||
- id: black | ||
args: [--line-length=88] | ||
exclude: ^(.venv/|docs/) | ||
types: ["python"] | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 7.1.1 | ||
hooks: | ||
- id: flake8 | ||
args: | ||
- --max-line-length=88 | ||
- --ignore=F401,E501,W503,E731,E743,E741,E203 | ||
exclude: ^(.venv/|docs/) | ||
types: ["python"] | ||
|
||
- repo: local | ||
hooks: | ||
- id: pytest | ||
name: pytest | ||
entry: ./.venv/bin/pytest | ||
language: system | ||
types: [python] | ||
pass_filenames: false | ||
always_run: true |
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,22 @@ | ||
MIT License | ||
|
||
APSG - The package for structural geologists. | ||
Copyright (c) 2015-2024, Ondrej Lexa | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -1,58 +1,57 @@ | ||
[tool.poetry] | ||
[project] | ||
name = "apsg" | ||
version = "1.3.0" | ||
dynamic = ["version"] | ||
description = "APSG - The package for structural geologists" | ||
authors = ["Ondrej Lexa <[email protected]>"] | ||
readme = "README.md" | ||
license = "MIT" | ||
repository = "https://github.com/ondrolexa/apsg" | ||
documentation = "https://apsg.readthedocs.io" | ||
requires-python = ">=3.10" | ||
license = { file = "LICENSE" } | ||
keywords = ["structural geology", "stereonet", "orientation data"] | ||
authors = [{ name = "Ondrej Lexa", email = "[email protected]" }] | ||
maintainers = [{ name = "Ondrej Lexa", email = "[email protected]" }] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
include = ["AUTHORS.md", "CHANGELOG.md", "CONTRIBUTING.md"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
numpy = "^2.1" | ||
matplotlib = "^3.9" | ||
pyqt5 = "^5.15" | ||
scipy = "^1.14" | ||
sqlalchemy = "^1.3" | ||
pandas = "^2.1" | ||
|
||
|
||
[tool.poetry.group.docs.dependencies] | ||
sphinx = "*" | ||
ipykernel = "*" | ||
nbsphinx = "*" | ||
|
||
|
||
[tool.poetry.group.extra.dependencies] | ||
jupyterlab = "^4" | ||
|
||
dependencies = ["numpy", "matplotlib", "scipy", "sqlalchemy", "pandas"] | ||
|
||
[project.optional-dependencies] | ||
test = ["pytest"] | ||
dev = [ | ||
"black", | ||
"sphinx", | ||
"sphinx_rtd_theme", | ||
"readthedocs-sphinx-search", | ||
"ipykernel", | ||
"nbsphinx", | ||
"autodocsumm", | ||
] | ||
extra = ["jupyterlab", "pyqt5"] | ||
|
||
[tool.poetry.group.test.dependencies] | ||
pytest = "*" | ||
black = "*" | ||
[project.urls] | ||
Homepage = "https://github.com/ondrolexa/apsg" | ||
Documentation = "https://apsg.readthedocs.io" | ||
Repository = "https://github.com/ondrolexa/apsg.git" | ||
Issues = "https://github.com/ondrolexa/apsg/issues" | ||
Changelog = "https://github.com/ondrolexa/apsg/blob/master/CHANGELOG.md" | ||
|
||
[tool.poetry.scripts] | ||
[project.scripts] | ||
iapsg = "apsg.shell:main" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["src/apsg"] | ||
|
||
[tool.hatch.version] | ||
path = "src/apsg/__init__.py" | ||
|
||
[tool.black] | ||
line-length = 88 | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
\.toml | ||
|
@@ -61,7 +60,3 @@ exclude = ''' | |
|\.ini | ||
)/ | ||
''' | ||
|
||
[[tool.poetry.source]] | ||
name = "pypi-public" | ||
url = "https://pypi.org/simple/" |
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,6 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import importlib.metadata | ||
from apsg.math import ( | ||
Vector3 as vec, | ||
Vector2 as vec2, | ||
|
@@ -99,6 +98,6 @@ | |
"quicknet", | ||
) | ||
|
||
__version__ = importlib.metadata.version("apsg") | ||
__version__ = "1.3.1" | ||
__author__ = "Ondrej Lexa" | ||
__email__ = "[email protected]" |