From c605e6691b3600ca68b035cf7951c42f5b9205e9 Mon Sep 17 00:00:00 2001 From: Krishna Kumar Date: Fri, 27 Oct 2023 18:32:03 -0500 Subject: [PATCH] PyPI v0.1.1 --- .github/workflows/pypi.yml | 47 +++++++++++++----------- example-notebooks/template-mpm-run.ipynb | 17 ++++----- pyproject.toml | 8 ++-- 3 files changed, 37 insertions(+), 35 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index f146bc3..1f55a07 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,24 +1,27 @@ name: Publish to PyPI -on: [push] +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' jobs: - pypi-publish: - name: Upload release to PyPI - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/dsjobs - permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - name: Poetry image - uses: abatilo/actions-poetry@v2 - - name: Install the project dependencies - run: poetry install - - name: Build package - run: poetry build - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/dsjobs + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Poetry image + uses: abatilo/actions-poetry@v2 + - name: Install the project dependencies + run: poetry install + - name: Build package + run: poetry build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/example-notebooks/template-mpm-run.ipynb b/example-notebooks/template-mpm-run.ipynb index 42db1ee..922bd21 100644 --- a/example-notebooks/template-mpm-run.ipynb +++ b/example-notebooks/template-mpm-run.ipynb @@ -78,11 +78,11 @@ "outputs": [], "source": [ "# Default parameters for the MPM template notebook\n", - "path: str = '/MyData/mpm-benchmarks/2d/uniaxial_stress/' # path to input file\n", + "path: str = \"/MyData/mpm-benchmarks/2d/uniaxial_stress/\" # path to input file\n", "\n", - "input_file: str = 'mpm.json' # input file.json\n", + "input_file: str = \"mpm.json\" # input file.json\n", "\n", - "duration: str = '00:10:00' # Runtime duration ('HH:MM:SS')\n", + "duration: str = \"00:10:00\" # Runtime duration ('HH:MM:SS')\n", "\n", "# The parameters modified in your job will be included in the cell below." ] @@ -157,14 +157,13 @@ "ag = Agave.restore()\n", "\n", "# generate and modify job info\n", - "job_info = ds.generate_job_info(ag, \n", - " appid='mpm-1.0.0', \n", - " jobname='mpm-uniaxial', \n", - " runtime=duration)\n", + "job_info = ds.generate_job_info(\n", + " ag, appid=\"mpm-1.0.0\", jobname=\"mpm-uniaxial\", runtime=duration\n", + ")\n", "\n", "# specify input path and file\n", - "job_info[\"inputs\"] = {\"inputDirectory\": [ ds.get_ds_path_uri(ag, path) ]}\n", - "job_info[\"parameters\"] = {\"inputfile\" : [ input_file ]}\n", + "job_info[\"inputs\"] = {\"inputDirectory\": [ds.get_ds_path_uri(ag, path)]}\n", + "job_info[\"parameters\"] = {\"inputfile\": [input_file]}\n", "print(\"\\n---Job Info---\\n\\n\" + json.dumps(job_info, indent=2))" ] }, diff --git a/pyproject.toml b/pyproject.toml index de961c4..8afbee5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [tool.poetry] name = "dsjobs" -version = "0.1.0" -description = "" +version = "0.1.1" +description = "DSJobs simplifies accessing TAPIS on DesignSafe" authors = [ - "Pedro Arduino ", - "Krishna Kumar " + "Krishna Kumar ", + "Pedro Arduino " ] readme = "README.md" packages = [{include = "dsjobs"}]