-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move PythonJob from aiida-workgraph to here
- Loading branch information
1 parent
729bd2d
commit bf0658f
Showing
59 changed files
with
8,958 additions
and
0 deletions.
There are no files selected for viewing
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,85 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
# only pushes to main trigger | ||
branches: [main] | ||
pull_request: | ||
# always triggered | ||
|
||
jobs: | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
python-version: ['3.12'] | ||
aiida-version: ['stable'] | ||
|
||
services: | ||
postgres: | ||
image: postgres:10 | ||
env: | ||
POSTGRES_DB: test_aiida | ||
POSTGRES_PASSWORD: '' | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
rabbitmq: | ||
image: rabbitmq:latest | ||
ports: | ||
- 5672:5672 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install project manager | ||
run: | | ||
pip install hatch | ||
- name: Run test suite | ||
env: | ||
PYTEST_ADDOPTS: "--durations=0" | ||
run: | | ||
hatch test --cover | ||
docs: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install project manager | ||
run: | | ||
pip install hatch | ||
- name: Build docs | ||
run: | | ||
hatch run docs:build | ||
static-analysis: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install project manager | ||
run: | | ||
pip install hatch | ||
- name: Run formatter and linter | ||
run: | | ||
hatch fmt --check |
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,33 @@ | ||
name: Publish on PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
# After vMajor.Minor.Patch _anything_ is allowed (without "/") ! | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'aiidateam/aiida-pythonjob' && startsWith(github.ref, 'refs/tags/v') | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install hatch | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install hatch~=1.12.0 | ||
- name: Build and publish | ||
run: | | ||
hatch publish | ||
env: | ||
HATCH_INDEX_USER: __token__ | ||
HATCH_INDEX_AUTH: ${{ secrets.pypi_token }} |
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,13 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: format | ||
name: format | ||
entry: hatch fmt -f | ||
language: system | ||
types: [python] | ||
- id: lint | ||
name: lint | ||
entry: hatch fmt -l | ||
language: system | ||
types: [python] |
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,13 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.12" | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
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,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
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,7 @@ | ||
name: base | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- aiida-core | ||
- aiida-core.services |
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,3 @@ | ||
=========== | ||
Quick Start | ||
=========== |
Oops, something went wrong.