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

WIP: New queue #39

Closed
wants to merge 110 commits into from
Closed
Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
2aa2bbb
First minimal working implementation
gpetretto May 17, 2023
e7be6ca
add submit function
gpetretto May 17, 2023
b0216c2
revised configurations
gpetretto May 22, 2023
a9c82ab
first daemon implementation based on supervisor
gpetretto May 24, 2023
b96f9ea
refactor modules, JobController and CLI
gpetretto Jun 1, 2023
161872f
Added dependencies in pyproject.toml.
davidwaroquiers Jun 2, 2023
7cb1abc
updates on queries and CLI
gpetretto Jun 2, 2023
a370bee
move remote document inside Firework document
gpetretto Jun 5, 2023
7618341
more functionalities and bug fixes
gpetretto Jun 5, 2023
0f43a33
improve check_run_status and more CLI
gpetretto Jun 6, 2023
cccf38c
helper to generate configuration
gpetretto Jun 9, 2023
daa2ce3
more refactoring of configuration
gpetretto Jun 12, 2023
28d5df7
refactor project cli
gpetretto Jun 13, 2023
0f8b9e9
Merge remote-tracking branch 'origin/config_deps' into worker
gpetretto Jun 13, 2023
287f00d
more CLI options
gpetretto Jun 16, 2023
38570dc
Merge pull request #1 from Matgenix/config
gpetretto Jun 16, 2023
278fddb
refactor exec config and typer error handling
gpetretto Jun 18, 2023
6d8a9ff
Merge branch 'config' into develop
gpetretto Jun 18, 2023
54ff0ea
more CLI. fix FW task
gpetretto Jun 21, 2023
568a6dc
update remote host
gpetretto Jun 28, 2023
3382890
improve cli
gpetretto Jun 30, 2023
4349881
optional warnings in ConfigManager
gpetretto Jul 3, 2023
ded7c13
document configuration options and revise RemoteWorker
gpetretto Jul 4, 2023
a42c058
get_jobstore function
gpetretto Jul 4, 2023
a6235cc
Temporarily add qtoolkit as git dependency
ml-evs Jul 8, 2023
eceb1a5
Use default/first worker if not passed to submit function
ml-evs Jul 8, 2023
f85d4c1
Add simple usage instructions (need checking)
ml-evs Jul 8, 2023
4443d43
Use strict jobflow deps to avoid pydantic errors
ml-evs Jul 8, 2023
5345de6
Add .DS_store to gitignore
gpetretto Jul 10, 2023
a814ca3
enforce connecting of the remote host
gpetretto Jul 10, 2023
80b130e
Pin to the development jobflow
ml-evs Jul 10, 2023
8c768fd
Remove incorrect usage docs
ml-evs Jul 10, 2023
e3bae86
restart connection for remote host if connection is dropped
gpetretto Jul 11, 2023
49f1450
Enable `ConfigManager` warnings for `jf project check`
ml-evs Jul 11, 2023
a6f8915
add run time information
gpetretto Jul 12, 2023
059e2c8
Handle case that date in fw dict is already a date
ml-evs Jul 12, 2023
a3f796e
Use string datetime when pinging jobs
ml-evs Jul 12, 2023
92bffd8
Merge pull request #7 from ml-evs/develop
davidwaroquiers Jul 17, 2023
9886e44
Added documentation structure.
davidwaroquiers Jul 17, 2023
9917104
cli message for global options
gpetretto Jul 19, 2023
c1d0b96
fix FlowInfo for string updated_on
gpetretto Jul 24, 2023
2539e79
Move fallback worker config up to submit function
ml-evs Aug 3, 2023
52eb795
Do not allow null workers when constructing a firework
ml-evs Aug 3, 2023
593224a
Merge pull request #12 from ml-evs/ml-evs/fix
gpetretto Aug 14, 2023
808ca4a
improve CLI, include allow_external_references
gpetretto Aug 14, 2023
8d32d9f
disable job_ids options in the CLI
gpetretto Aug 16, 2023
87c0753
Add work_dir checker to project check CLI
ml-evs Aug 14, 2023
5476690
Use `Path` for remote operations to deal with spaces in dir names
ml-evs Aug 14, 2023
d1298ef
Add validator for absoluteness of `work_dir`
ml-evs Aug 14, 2023
a325d6d
Format `error_job` the same way as `error_remote`
ml-evs Aug 16, 2023
5e6d494
Merge pull request #15 from ml-evs/ml-evs/fix
gpetretto Aug 18, 2023
ae9d83e
restore queries based on job id
gpetretto Aug 19, 2023
0bf90b5
Fixed jf flow list.
davidwaroquiers Aug 21, 2023
fe03b05
Fixed state query in jobcontroller.
davidwaroquiers Aug 21, 2023
b29c55a
more fix for id based searches
gpetretto Aug 22, 2023
a606cc6
Merge pull request #17 from Matgenix/job_id
gpetretto Aug 22, 2023
ff4b2ed
Merge pull request #18 from Matgenix/flow_info
gpetretto Aug 22, 2023
07c20e5
Merge pull request #9 from Matgenix/docs_template
davidwaroquiers Aug 22, 2023
49b82a2
fix flow query for ONGOING state
gpetretto Aug 23, 2023
24d2eda
Added STOPPED and CANCELLED Job States.
davidwaroquiers Aug 23, 2023
279f79c
Fixed flow queries by state for STOPPED and FAILED.
davidwaroquiers Aug 23, 2023
e4cb1e4
Merge pull request #22 from Matgenix/stopped_cancelled_states
gpetretto Aug 24, 2023
994ed7f
jf flow info and other cli updates
gpetretto Aug 24, 2023
ff181ba
fix job query
gpetretto Aug 25, 2023
9605bf6
modify name search field
gpetretto Aug 28, 2023
c48634b
Merge pull request #23 from Matgenix/flow_info
gpetretto Aug 28, 2023
5c63247
fix query with aggregation
gpetretto Aug 29, 2023
434becc
fix query by name
gpetretto Sep 5, 2023
7bcd12e
more filtering options for CLI
gpetretto Sep 15, 2023
c77029c
tune start date search in CLI
gpetretto Sep 18, 2023
87fbb80
fix typo
Sep 21, 2023
0ccbd98
Merge pull request #25 from FabiPi3/fix_typo
gpetretto Sep 21, 2023
b1edf7f
Run CI on PRs to develop branch
ml-evs Sep 21, 2023
0d539fe
set full path for queue files
gpetretto Sep 22, 2023
92f9a57
Merge pull request #28 from ml-evs/ml-evs/tweak_CI
davidwaroquiers Sep 26, 2023
a077df4
pydantic2 updates
gpetretto Sep 28, 2023
37124c3
Use the qtoolkit and jobflow PyPI packages, add direct pydantic dep (…
ml-evs Oct 10, 2023
1cfc5b8
Fix CI trigger config
ml-evs Oct 10, 2023
3542a70
Linting fixes and CI config for multiple Python 3.9+ (#34)
ml-evs Oct 11, 2023
d8aa3c1
add index to the folder name
gpetretto Oct 11, 2023
e6b4d33
Merge branch 'develop' into pydantic2
gpetretto Oct 11, 2023
2d98143
Merge branch 'develop' of github.com:Matgenix/jobflow-remote into pyd…
gpetretto Oct 11, 2023
5fe779f
fix settings for python 3.9
gpetretto Oct 11, 2023
ce590bb
Merge pull request #35 from Matgenix/fix_index
gpetretto Oct 12, 2023
d37a417
New queue handling
gpetretto Nov 10, 2023
0f1d96e
Merge branch 'develop' into queue
gpetretto Nov 10, 2023
e2429a9
Merge remote-tracking branch 'origin/develop' into queue
gpetretto Nov 10, 2023
a60d5c5
Merge branch 'pydantic2' into queue
gpetretto Nov 10, 2023
20b9c33
fix retry
gpetretto Nov 10, 2023
7751ed3
fix py3.9
gpetretto Nov 14, 2023
d01d71c
split runner execution
gpetretto Nov 15, 2023
d21d8ad
implement max_jobs per worker. switch to schedule package. Fix for sp…
gpetretto Nov 16, 2023
13dc947
first implementation of batch submission
gpetretto Nov 21, 2023
e050ba0
fixes and updates
gpetretto Nov 22, 2023
4c81cde
fix export typing
gpetretto Nov 23, 2023
79a05de
fix dynamic flow. Add graph utils
gpetretto Nov 27, 2023
2b32951
some fix and test dash graph app
gpetretto Nov 29, 2023
138a7b1
fix dynamics flow and more graphs
gpetretto Dec 7, 2023
d6ec17c
fix cli bug and add docstrings
gpetretto Dec 8, 2023
e6b5a8c
Avoid Job deserialization in Runner.
gpetretto Dec 11, 2023
1a664cc
fix date inizialization
gpetretto Dec 12, 2023
818f015
Merge branch 'queue' into references
gpetretto Dec 12, 2023
74507b7
fix db_id in output's metadata
gpetretto Dec 12, 2023
8d0e824
fix output
gpetretto Dec 12, 2023
33ba565
more docstrings
gpetretto Dec 13, 2023
478ada9
Documentation initial version
gpetretto Dec 20, 2023
be342ae
Merge branch 'references' into queue
gpetretto Dec 20, 2023
2c383f6
breaking: change db_id type to str
gpetretto Dec 22, 2023
328c6df
breaking: rename CANCELLED JobState to USER_STOPPED and the related m…
gpetretto Dec 22, 2023
f2ddac4
more documentation
gpetretto Dec 22, 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
1 change: 0 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ repository_namespace: Matgenix
repository_provider: https://github.com/
short_description: jobflow-remote is a python package to run jobflow workflows on
remote resources

34 changes: 11 additions & 23 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ name: testing

on:
push:
branches:
- develop

pull_request:
branches: [main]

# Cancel running workflows when additional changes are pushed
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
Expand All @@ -14,7 +21,7 @@ jobs:

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

Expand All @@ -29,8 +36,9 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
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 @@ -48,23 +56,3 @@ jobs:

- name: Test
run: pytest --cov=jobflow_remote --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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,6 @@ cython_debug/

# PyCharm
.idea/

# macOS
.DS_store
32 changes: 16 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
default_language_version:
python: python3
python: python3.9
#exclude: '^src/{{ package_name }}/some/directory/'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/myint/autoflake
rev: v2.0.0
rev: v2.2.1
hooks:
- id: autoflake
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black]
Expand All @@ -29,18 +29,18 @@ repos:
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
entry: pflake8
files: ^src/
additional_dependencies:
- pyproject-flake8==6.0.0
- flake8-bugbear==22.12.6
- flake8-typing-imports==1.14.0
- flake8-docstrings==1.6.0
- flake8-rst-docstrings==0.3.0
- flake8-rst==0.8.0
- pyproject-flake8
- flake8-bugbear
- flake8-typing-imports
- flake8-docstrings
- flake8-rst-docstrings
- flake8-rst
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
Expand All @@ -49,7 +49,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.6.0
hooks:
- id: mypy
files: ^src/
Expand All @@ -58,13 +58,13 @@ repos:
- types-pkg_resources==0.1.2
- types-paramiko
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.6
hooks:
- id: codespell
stages: [commit, commit-msg]
args: [--ignore-words-list, 'titel,statics,ba,nd,te']
args: [--ignore-words-list, 'titel,statics,ba,nd,te,nin']
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py38-plus]
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@

**[Full Documentation][docs]**

jobflow-remote is a Python software for ... Features of jobflow-remote include

- Feature A
- Feature B
- ...
jobflow-remote is a Python package to run jobflow workflows on remote resources.

## Quick start

Expand Down Expand Up @@ -60,12 +56,12 @@ jobflow-remote is developed and maintained by Matgenix SRL.

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

[help-forum]: https://https://github.com//Matgenix/jobflow_remote/issues
[issues]: https://https://github.com//Matgenix/jobflow_remote/issues
[installation]: https://https://github.com//Matgenix/jobflow_remote/blob/main/INSTALL.md
[contributing]: https://github.com/Matgenix/jobflow_remote/blob/main/CONTRIBUTING.md
[codeofconduct]: https://github.com/Matgenix/jobflow_remote/blob/main/CODE_OF_CONDUCT.md
[changelog]: https://https://github.com//Matgenix/jobflow_remote/blob/main/CHANGELOG.md
[contributors]: https://Matgenix.github.io/jobflow_remote/graphs/contributors
[license]: https://raw.githubusercontent.com/Matgenix/jobflow_remote/main/LICENSE
[docs]: https://Matgenix.github.io/jobflow_remote/
[help-forum]: https://github.com//Matgenix/jobflow-remote/issues
[issues]: https://github.com//Matgenix/jobflow-remote/issues
[installation]: https://https://github.com//Matgenix/jobflow-remote/blob/main/INSTALL.md
[contributing]: https://github.com/Matgenix/jobflow-remote/blob/main/CONTRIBUTING.md
[codeofconduct]: https://github.com/Matgenix/jobflow-remote/blob/main/CODE_OF_CONDUCT.md
[changelog]: https://github.com//Matgenix/jobflow-remote/blob/main/CHANGELOG.md
[contributors]: https://Matgenix.github.io/jobflow-remote/graphs/contributors
[license]: https://raw.githubusercontent.com/Matgenix/jobflow-remote/blob/main/LICENSE
[docs]: https://Matgenix.github.io/jobflow-remote/
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/jobflow_remote
50 changes: 50 additions & 0 deletions doc/source/_static/index-images/api.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions doc/source/_static/index-images/contributor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions doc/source/_static/index-images/getting_started.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions doc/source/_static/index-images/image_licences.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
getting_started.svg: https://www.svgrepo.com/svg/393367/rocket (PD Licence)
user_guide.svg: https://www.svgrepo.com/svg/75531/user-guide (CC0 Licence)
api.svg: https://www.svgrepo.com/svg/157898/gears-configuration-tool (CC0 Licence)
contributor.svg: https://www.svgrepo.com/svg/57189/code-programing-symbol (CC0 Licence)
47 changes: 47 additions & 0 deletions doc/source/_static/index-images/user_guide.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading