Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go Live version #16

Merged
merged 47 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d494f30
Added structure for the documentation.
davidwaroquiers Apr 14, 2023
8f5a4b8
Fixed navigation for api.
davidwaroquiers Apr 14, 2023
3b0a6c5
Updated css styling (Matgenix colors).
davidwaroquiers Apr 29, 2023
f4512c6
Added optional deps for docs.
davidwaroquiers Apr 29, 2023
d4b6ca2
adding shell io object
gpetretto May 5, 2023
fd45cad
remove shabang from template
gpetretto May 5, 2023
d6490be
remove old implementation
gpetretto May 5, 2023
8df6e97
Merge pull request #12 from gpetretto/develop
davidwaroquiers May 5, 2023
861e796
Fixed unit test.
davidwaroquiers May 5, 2023
c588c19
Added structure for the documentation.
davidwaroquiers Apr 14, 2023
b0650d4
Fixed navigation for api.
davidwaroquiers Apr 14, 2023
9a76d82
Updated css styling (Matgenix colors).
davidwaroquiers Apr 29, 2023
5b1c02e
Added optional deps for docs.
davidwaroquiers Apr 29, 2023
ae60ba0
Merge branch 'documentation' of https://github.com/Matgenix/QToolKit …
davidwaroquiers May 5, 2023
f1764ef
modify slurm template
gpetretto May 29, 2023
554695e
Merge remote-tracking branch 'upstream/develop' into develop
gpetretto May 29, 2023
99b1c90
Merge pull request #13 from gpetretto/develop
gpetretto May 29, 2023
cd5a480
Merge branch 'develop' into documentation
davidwaroquiers Jun 6, 2023
9c30d5f
Adding some tests and documentation.
davidwaroquiers Jun 7, 2023
5d39bf5
More unit tests for data objects.
davidwaroquiers Jun 7, 2023
498dffa
Unit tests for data objects.
davidwaroquiers Jun 7, 2023
624bb08
Removed unused core.jobs module
davidwaroquiers Jun 7, 2023
b55f167
Removed unused queue module (directory with __init__.py)
davidwaroquiers Jun 7, 2023
cdff324
Unit tests for base scheduler io.
davidwaroquiers Jun 7, 2023
bc84aa7
Started tests for shell io.
davidwaroquiers Jun 7, 2023
c2f19ed
Set sphinx language to english (en) in conf.py
davidwaroquiers Jun 8, 2023
a21a806
More unit tests for shell IO.
davidwaroquiers Jun 8, 2023
d1646b5
More tests for shell io + few docstrings additions.
davidwaroquiers Jun 8, 2023
469f2c3
Renamed QBase to QTKObject and QEnum to QTKEnum.
davidwaroquiers Jun 8, 2023
c2791e6
update shell io
gpetretto Jun 28, 2023
f0a9e77
fix remote host
gpetretto Jun 28, 2023
20ff3ae
Merge pull request #11 from Matgenix/documentation
gpetretto Jun 29, 2023
20cf8dc
Merge remote-tracking branch 'upstream/develop' into develop
gpetretto Jun 29, 2023
28edf7e
Merge pull request #15 from gpetretto/develop
davidwaroquiers Jul 4, 2023
f6bf66e
Fix name for `ntasks` in slurm template
ml-evs Jul 14, 2023
a3c7c00
Use `ntasks` as the internal variable name
ml-evs Jul 14, 2023
fbb2060
Merge pull request #19 from ml-evs/develop
davidwaroquiers Jul 14, 2023
3b2e773
Merge remote-tracking branch 'upstream/develop' into develop
gpetretto Aug 28, 2023
c03f3d3
add --exclusive to Slurm template
gpetretto Aug 28, 2023
4884234
use etime instead of etimes for compatibility in ShellIO
gpetretto Aug 28, 2023
3739aa6
Merge pull request #20 from gpetretto/develop
gpetretto Aug 29, 2023
838183b
fix bug
Sep 20, 2023
abf5b05
Merge pull request #23 from FabiPi3/fix_shell_parse_jobs_list
gpetretto Sep 20, 2023
179579e
Use ssh for copier git
ml-evs Oct 5, 2023
c48e389
Update repo from copier template and tweak README
ml-evs Oct 6, 2023
eeb1212
Use separate token for test PyPI
ml-evs Oct 6, 2023
6128e0c
Merge pull request #24 from Matgenix/ml-evs/qtk-public-release
ml-evs Oct 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 7a70b18
_src_path: gh:Matgenix/Matgenix-copier-template
_commit: d0e6447
_src_path: [email protected]:Matgenix/Matgenix-copier-template
author_email: [email protected]
author_fullname: David Waroquiers
author_username: davidwaroquiers
Expand All @@ -15,3 +15,4 @@ repository_namespace: matgenix
repository_provider: https://github.com
short_description: QToolKit is a python wrapper interfacing with job queues (e.g.
PBS, SLURM, ...).

89 changes: 89 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Publish and Deploy

on:
release:
types:
- published

env:
PUBLISH_UPDATE_BRANCH: main
GIT_USER_NAME: Matgenix
GIT_USER_EMAIL: "[email protected]"

jobs:

publish:
name: Publish package
runs-on: ubuntu-latest
if: github.repository == 'matgenix/qtoolkit' && startsWith(github.ref, 'refs/tags/v')

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install Python dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
pip install -e .[all]

- name: Update changelog
uses: CharMixer/auto-changelog-action@v1
with:
token: ${{ secrets.RELEASE_PAT_BOT }}
release_branch: ${{ env.PUBLISH_UPDATE_BRANCH }}
exclude_labels: "duplicate,question,invalid,wontfix,dependency_updates,skip_changelog"

- name: Update '${{ env.PUBLISH_UPDATE_BRANCH }}'
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.RELEASE_PAT_BOT }}
branch: ${{ env.PUBLISH_UPDATE_BRANCH }}
unprotect_reviews: true
sleep: 15
force: true
tags: true

- name: Get tagged versions
run: echo "PREVIOUS_VERSION=$(git tag -l --sort -version:refname | sed -n 2p)" >> $GITHUB_ENV

- name: Create release-specific changelog
uses: CharMixer/auto-changelog-action@v1
with:
token: ${{ secrets.RELEASE_PAT_BOT }}
release_branch: ${{ env.PUBLISH_UPDATE_BRANCH }}
since_tag: "${{ env.PREVIOUS_VERSION }}"
output: "release_changelog.md"
exclude_labels: "duplicate,question,invalid,wontfix,dependency_updates,skip_changelog"

- name: Append changelog to release body
run: |
gh api /repos/${{ github.repository }}/releases/${{ github.event.release.id }} --jq '.body' > release_body.md
cat release_changelog.md >> release_body.md
gh api /repos/${{ github.repository }}/releases/${{ github.event.release.id }} -X PATCH -F body='@release_body.md'
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT_BOT }}

- name: Build source distribution
run: python -m build

- name: Publish package to Test PyPI first
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository-url: https://test.pypi.org/legacy/

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
42 changes: 21 additions & 21 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'
cache: pip
cache-dependency-path: pyproject.toml

Expand All @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
Expand All @@ -49,22 +49,22 @@ jobs:
- name: Test
run: pytest --cov=qtoolkit --cov-report=xml

# docs:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
#
# - uses: actions/setup-python@v4
# with:
# python-version: '3.11'
# cache: pip
# cache-dependency-path: pyproject.toml
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install .[strict,docs]
#
# - name: Build
# run: jupyter-book build docs --path-output docs_build
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[strict,docs]

- name: Build
run: jupyter-book build docs --path-output docs_build
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ instance/
.scrapy

# Sphinx documentation
docs/_build/
doc/_build/

# PyBuilder
.pybuilder/
Expand Down Expand Up @@ -154,3 +154,6 @@ cython_debug/

# PyCharm
.idea/

# macOS
.DS_store
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
default_language_version:
python: python3
#exclude: '^src/{{ package_name }}/some/directory/'
exclude: '^doc/'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand All @@ -9,6 +9,7 @@ repos:
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
exclude: .copier-answers.yml
- id: trailing-whitespace
- repo: https://github.com/myint/autoflake
rev: v2.0.0
Expand Down Expand Up @@ -67,4 +68,4 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Contributing to QToolKit

Full name is Queue Tool Kit

We love your input! We want to make contributing to as easy and
transparent as possible, whether it's:

Expand Down Expand Up @@ -64,6 +62,9 @@ We have a few tips for writing good PRs that are accepted into the main repo:
to python](https://docs.python-guide.org/writing/tests) for some good
resources on writing good tests.
- Understand your contributions will fall under the same license as this repo.
- This project uses `pre-commit` for uniform linting across many developers. You can install
it through the extra dev dependencies with `pip install -e .[dev]` and then run `pre-commit install`
to activate it for you local repository.

When you submit your PR, our CI service will automatically run your tests.
We welcome good discussion on the best ways to write your code, and the comments
Expand Down
20 changes: 20 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Installation

Clone this repository and then install with `pip` in the virtual environment of your choice.

```
git clone git@https://github.com:matgenix/qtoolkit
cd qtoolkit
pip install .
```

## Development installation

You can use

```
pip install -e .[dev,tests]
```

to perform an editable installation with additional development and test dependencies.
You can then activate `pre-commit` in your local repository with `pre-commit install`.
38 changes: 10 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,20 @@
# QToolKit

[![tests](https://img.shields.io/github/actions/workflow/status/matgenix/qtoolkit/testing.yml?branch=main&label=tests)](https://github.com/matgenix/qtoolkit/actions?query=workflow%3Atesting)
[![tests](https://img.shields.io/github/actions/workflow/status/matgenix/qtoolkit/testing.yml?branch=main&label=tests)](https://github.com/matgenix/qtoolkit/actions/workflows/testing.yml)
[![code coverage](https://img.shields.io/codecov/c/gh/matgenix/qtoolkit)](https://codecov.io/gh/matgenix/qtoolkit)
[![pypi version](https://img.shields.io/pypi/v/qtoolkit?color=blue)](https://pypi.org/project/qtoolkit)
![supported python versions](https://img.shields.io/pypi/pyversions/qtoolkit)

** [Full Documentation][docs] **
**[Full Documentation][docs]**

QToolKit is a python software for ... Features of QToolKit include

- Feature A
- Feature B
- ...

## Quick start

How to get started.

## Installation

How to install.

## User guide

How to use the software.
> **Warning**:
> :construction: This repository is still under construction. :construction:

## Need help?

Ask questions about QToolKit on the [QToolKit support forum][help-forum].
If you've found an issue with QToolKit, please submit a bug report on [GitHub Issues][issues].

## Reference

Full reference

## What’s new?

Track changes to qtoolkit through the [changelog][changelog].
Expand All @@ -60,11 +41,12 @@ QToolKit is developed and maintained by Matgenix SRL.

A full list of all contributors can be found [here][contributors].

[help-forum]: https://github.com/materialsproject/atomate2/issues
[issues]: https://github.com/materialsproject/atomate2/issues
[installation]: https://matgenix.github.io/qtoolkit/user/install.html
[help-forum]: https://https://github.com/matgenix/qtoolkit/issues
[issues]: https://https://github.com/matgenix/qtoolkit/issues
[installation]: https://https://github.com/matgenix/qtoolkit/blob/main/INSTALL.md
[contributing]: https://github.com/matgenix/qtoolkit/blob/main/CONTRIBUTING.md
[codeofconduct]: https://github.com/matgenix/qtoolkit/blob/main/CODE_OF_CONDUCT.md
[contributors]: https://matgenix.github.io/qtoolkit/about/contributors.html
[license]: https://raw.githubusercontent.com/matgenix//main/LICENSE
[changelog]: https://https://github.com/matgenix/qtoolkit/blob/main/CHANGELOG.md
[contributors]: https://matgenix.github.io/qtoolkit/graphs/contributors
[license]: https://raw.githubusercontent.com/matgenix/qtoolkit/main/LICENSE
[docs]: https://matgenix.github.io/qtoolkit/
72 changes: 72 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Makefile for Sphinx documentation
#

# PYVER needs to be major.minor, just "3" doesn't work - it will result in
# issues with the amendments to PYTHONPATH and install paths (see DIST_VARS).

# Use explicit "version_info" indexing since make cannot handle colon characters, and
# evaluate it now to allow easier debugging when printing the variable

PYVER:=$(shell python3 -c 'from sys import version_info as v; print("{0}.{1}".format(v[0], v[1]))')
PYTHON = python$(PYVER)

# You can set these variables from the command line.
SPHINXOPTS ?=
SPHINXBUILD ?= LANG=C sphinx-build
PAPER ?=
# # For merging a documentation archive into a git checkout of numpy/doc
# # Turn a tag like v1.18.0 into 1.18
# # Use sed -n -e 's/patttern/match/p' to return a blank value if no match
# TAG ?= $(shell git describe --tag | sed -n -e's,v\([1-9]\.[0-9]*\)\.[0-9].*,\1,p')

FILES=

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -WT --keep-going -d build/doctrees $(PAPEROPT_$(PAPER)) \
$(SPHINXOPTS) source

.PHONY: help clean html version-check html-build

#------------------------------------------------------------------------------

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " clean to remove generated doc files and start fresh"
@echo " html to make standalone HTML files"

clean:
-rm -rf build/*
find . -name generated -type d -prune -exec rm -rf "{}" ";"


#------------------------------------------------------------------------------
# Automated generation of all documents
#------------------------------------------------------------------------------

# Build the current QToolKit version, and extract docs from it.
# We have to be careful of some issues:
#
# - Everything must be done using the same Python version
#

#SPHINXBUILD="LANG=C sphinx-build"


#------------------------------------------------------------------------------
# Basic Sphinx generation rules for different formats
#------------------------------------------------------------------------------
generate: build/generate-stamp
build/generate-stamp: $(wildcard source/reference/*.rst)
mkdir -p build
touch build/generate-stamp

html: api-doc html-build
html-build: generate
mkdir -p build/html build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html $(FILES)
@echo
@echo "Build finished. The HTML pages are in build/html."
api-doc:
sphinx-apidoc -e -f -o source/api ../src/qtoolkit
Loading
Loading