From 6fe3e6ebc9f7933cebfba07d21a359b2c80f747c Mon Sep 17 00:00:00 2001 From: Alvin Noe Ladines Date: Wed, 11 Sep 2024 20:06:18 +0200 Subject: [PATCH] Use pypi pkgs --- .github/workflows/publish.yml | 36 +++++++++++++++++++++++++++++++++++ pyproject.toml | 8 ++++---- 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ae3d516 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,36 @@ +# Upload python package to pypi server and github release. +# Reference: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ + +name: Upload Python Package + +on: + release: + types: [published] + +jobs: + publish-to-pypi: + name: >- + Publish distribution to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/nomad-parser-plugins-atomistic + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.9" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index ce6e8fd..19078af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [project] -name = "atomisticparsers" +name = "nomad-parser-plugins-atomistic" version = "1.0" description = "Collection of NOMAD parsers for atomistic codes." readme = "README.md" @@ -11,9 +11,9 @@ authors = [{ name = "The NOMAD Authors" }] license = { file = "LICENSE" } dependencies = [ "nomad-lab>=1.3.6.dev1", - "nomad-schema-plugin-simulation-workflow@git+https://github.com/nomad-coe/nomad-schema-plugin-simulation-workflow.git@develop", - "nomad-schema-plugin-run@git+https://github.com/nomad-coe/nomad-schema-plugin-run.git@develop", - "simulationparsers@git+https://github.com/nomad-coe/simulation-parsers.git@develop", + "nomad-schema-plugin-simulation-workflow>=1.0.1", + "nomad-schema-plugin-run@>=1.0.1", + "nomad-parser-plugins-simulation>=1.0.2", "lxml>=5.2", "mdanalysis==2.7.0", "panedr>=0.2",