Skip to content

Commit

Permalink
packaging updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrolexa committed Dec 14, 2024
1 parent 91f7119 commit 8042d0a
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 245 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: Python tests

on:
# We run CI on pushes to the main branch
push:
branches:
- master
# and on all pull requests to the main branch
pull_request:
branches:
- master
# as well as upon manual triggers through the 'Actions' tab of the Github UI
workflow_dispatch:

jobs:
Expand All @@ -19,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout repository
Expand All @@ -35,7 +32,7 @@ jobs:

- name: Install Python package
run: |
python -m pip install .[tests]
python -m pip install .[dev]
- name: Run Python tests
run: |
Expand Down
31 changes: 11 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
name: Upload Python Package
name: PyPi Publisher

on:
workflow_dispatch:
release:
types: [created]
types: [ published ]

jobs:
deploy:
pypi-publisher:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- uses: thevickypedia/pypi-publisher@v3
env:
token: ${{ secrets.PYPI_APIKEY }}
with:
python-version: "3.10"
skip-existing: true

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ docs/_build

#codium
.vscode/

#venv
.venv/
9 changes: 0 additions & 9 deletions AUTHORS.md

This file was deleted.

File renamed without changes.
102 changes: 0 additions & 102 deletions CONTRIBUTING.md

This file was deleted.

3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

PolyLX - python package to visualize and analyze digitized 2D microstructures
Copyright (c) 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
Expand All @@ -19,3 +19,4 @@ 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.

12 changes: 0 additions & 12 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Contents:
tutorial
automodules

.. mdinclude:: ../HISTORY.md
.. mdinclude:: ../CHANGELOG.md
21 changes: 0 additions & 21 deletions environment.yml

This file was deleted.

1 change: 1 addition & 0 deletions polylx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .core import Grain, Boundary, Grains, Boundaries, Sample, Fractnet
from .utils import deg, circular, ortensor

__version__ = "0.5.5"
__author__ = "Ondrej Lexa"
__email__ = "[email protected]"

Expand Down
68 changes: 68 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"


[project]
name = "polylx"
dynamic = ["version"]
description = "A Python package to visualize and analyze microstructures"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
keywords = ["geology", "microstructures"]
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",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
]
dependencies = [
"numpy",
"matplotlib",
"pandas",
"pyarrow",
"seaborn",
"networkx",
"scipy",
"shapely",
"pyshp",
"pyefd",
"jenkspy",
"shapelysmooth",
]

[project.optional-dependencies]
docs = [
"sphinx",
"sphinx_mdinclude",
"sphinx_rtd_theme",
"ipykernel",
"nbsphinx",
"nbsphinx-link"
]
dev = [
"pytest",
"pytest-cov",
"nbval",
"black"
]
jupyter = ["jupyterlab"]

[project.urls]
Homepage = "https://github.com/ondrolexa/polylx"
Documentation = "https://polylx.readthedocs.io/"
Repository = "https://github.com/ondrolexa/polylx.git"
Issues = "https://github.com/ondrolexa/polylx/issues"
Changelog = "https://github.com/ondrolexa/polylx/blob/master/HISTORY.md"

[project.scripts]
ipolylx = "polylx.shell:main"

[tool.hatch.version]
path = "polylx/__init__.py"
74 changes: 0 additions & 74 deletions setup.py

This file was deleted.

0 comments on commit 8042d0a

Please sign in to comment.