Skip to content

Commit

Permalink
Merge pull request #9 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Moved Jobs from threads to independent processes.
  • Loading branch information
seamm authored Mar 24, 2023
2 parents 725f58f + 2c4f3bf commit 1e9fa35
Show file tree
Hide file tree
Showing 39 changed files with 1,138 additions and 658 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ on:
pull_request:
branches:
- "main"
schedule:
# Run on master by default Sunday morning at 3:30:
# Scheduled workflows run on the latest commit on the default or base branch.
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "30 3 * * 0"

jobs:
ci:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/CodeQL.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]

jobs:
codeql:
name: CodeQL
uses: molssi-seamm/devops/.github/workflows/CodeQL.yaml@main
7 changes: 0 additions & 7 deletions .github/workflows/Docs.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,3 @@ target/
# Cookiecutter
output/
python_boilerplate/

# pyenv python configuration file
.python-version
7 changes: 7 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
History
=======

2023.3.23 -- Substantial improvements to JobServer
* Switched to independent process for Jobs, which means they are fully independent of
the JobServer and continue to run if the JobServer stops
* Discover existing running jobs on startup and monitor them.
* Added status information for the machine the JobServer is on as well as Jobs
* Provide a GUI if run from the commandline, showing the log and status.

0.9.1 (2020-05-29)
------------------

Expand Down
42 changes: 26 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
MODULE := seamm_jobserver
.PHONY: clean clean-test clean-pyc clean-build docs help
.PHONY: help clean clean-build clean-docs clean-pyc clean-test lint format typing test
.PHONY: dependencies test-all coverage html docs servedocs release check-release
.PHONY: dist install uninstall
.DEFAULT_GOAL := help

define BROWSER_PYSCRIPT
import os, webbrowser, sys
try:
Expand All @@ -10,6 +13,7 @@ except:

webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef

export BROWSER_PYSCRIPT

define PRINT_HELP_PYSCRIPT
Expand All @@ -21,7 +25,9 @@ for line in sys.stdin:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef

export PRINT_HELP_PYSCRIPT

BROWSER := python -c "$$BROWSER_PYSCRIPT"

help:
Expand All @@ -47,32 +53,37 @@ clean-test: ## remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
find . -name '.pytype' -exec rm -fr {} +

lint: ## check style with yapf
black --check --diff --extend-exclude '_version.py' $(MODULE) tests
flake8 $(MODULE) tests
lint: ## check style with black and flake8
black --extend-exclude '_version.py' --check --diff $(MODULE) tests
flake8 --color never $(MODULE) tests

format: ## reformat with with yapf and isort
black --extend-exclude '_version.py' $(MODULE) tests

test: ## run tests quickly with the default Python
py.test

test-all: ## run tests on every Python version with tox
tox
pytest tests/

coverage: ## check code coverage quickly with the default Python
coverage run --source $(MODULE) -m pytest
coverage report -m
coverage html
pytest -v --cov=$(MODULE) --cov-report term --color=yes tests/

coverage-html: ## check code coverage quickly with the default Python, showing as html
pytest -v --cov=$(MODULE) --cov-report=html:htmlcov --cov-report term --color=yes tests/
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/$(MODULE).rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ $(MODULE)
clean-docs: ## remove files associated with building the docs
rm -f docs/api/$(MODULE).rst
rm -f docs/api/modules.rst
$(MAKE) -C docs clean

html: clean-docs ## generate Sphinx HTML documentation, including API docs
sphinx-apidoc -o docs/api $(MODULE)
$(MAKE) -C docs html
rm -f docs/api/$(MODULE).rst
rm -f docs/api/modules.rst

docs: html ## Make the html docs and show in the browser
$(BROWSER) docs/_build/html/index.html

servedocs: docs ## compile the docs watching for changes
Expand All @@ -93,4 +104,3 @@ install: uninstall ## install the package to the active Python's site-packages

uninstall: clean ## uninstall the package
pip uninstall --yes $(MODULE)

54 changes: 28 additions & 26 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,56 @@ SEAMM JobServer
===============


.. image:: https://img.shields.io/travis/molssi-seamm/seamm_jobserver.svg
:target: https://travis-ci.org/molssi-seamm/seamm_jobserver
:alt: Build Status
.. image:: https://img.shields.io/github/issues-pr-raw/molssi-seamm/seamm_jobserver
:target: https://github.com/molssi-seamm/seamm_jobserver/pulls
:alt: GitHub pull requests

.. image:: https://codecov.io/gh/molssi-seamm/seamm_jobserver/branch/master/graph/badge.svg
:target: https://codecov.io/gh/molssi-seamm/seamm_jobserver
:alt: Code Coverage
.. image:: https://github.com/molssi-seamm/seamm_jobserver/workflows/CI/badge.svg
:target: https://github.com/molssi-seamm/seamm_jobserver/actions
:alt: Build Status

.. image:: https://img.shields.io/lgtm/grade/python/g/molssi-seamm/seamm_jobserver.svg?logo=lgtm&logoWidth=18
:target: https://lgtm.com/projects/g/molssi-seamm/seamm_jobserver/context:python
:alt: Code Quality
.. image:: https://codecov.io/gh/molssi-seamm/seamm_jobserver/branch/main/graph/badge.svg
:target: https://codecov.io/gh/molssi-seamm/seamm_jobserver
:alt: Code Coverage

.. image:: https://readthedocs.org/projects/mopac-step/badge/?version=latest
:target: https://mopac-step.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://github.com/molssi-seamm/seamm_jobserver/workflows/CodeQL/badge.svg
:target: https://github.com/molssi-seamm/seamm_jobserver/security/code-scanning
:alt: Code Quality

.. image:: https://pyup.io/repos/github/molssi-seamm/seamm_jobserver/shield.svg
:target: https://pyup.io/repos/github/molssi-seamm/seamm_jobserver/
:alt: Updates for Dependencies
.. image:: https://github.com/molssi-seamm/seamm_jobserver/workflows/Release/badge.svg
:target: https://molssi-seamm.github.io/seamm_jobserver/index.html
:alt: Documentation Status

.. image:: https://img.shields.io/pypi/v/seamm_jobserver.svg
:target: https://pypi.python.org/pypi/seamm_jobserver
:alt: PyPi VERSION
:target: https://pypi.python.org/pypi/seamm_jobserver
:alt: PyPi VERSION


The JobServer for the SEAMM environment


* Free software: BSD license
* Documentation: https://seamm-jobserver.readthedocs.io.
* Documentation: https://molssi-seamm.github.io/seamm_jobserver/index.html
* Code: https://github.com/molssi-seamm/seamm_jobserver


Features
--------

* TODO
The SEAMM JobServer handles executing Jobs for the Dashboard.

Credits
-------

This package was created with Cookiecutter_ and the `molssi-seamm/cookiecutter-seamm-plugin`_ project template.
Acknowledgements
----------------

This package was created with the `molssi-seamm/cookiecutter-seamm-plugin`_ tool, which
is based on the excellent Cookiecutter_.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`molssi-seamm/cookiecutter-seamm-plugin`: https://github.com/molssi-seamm/cookiecutter-seamm-plugin

Developed by the Molecular Sciences Software Institute (MolSSI_),
which receives funding from the `National Science Foundation`_ under
award OAC-1547580 and CHE-2136142.
Developed by the Molecular Sciences Software Institute (MolSSI_), which receives funding
from the `National Science Foundation`_ under award CHE-2136142.

.. _MolSSI: https://www.molssi.org
.. _MolSSI: https://molssi.org
.. _`National Science Foundation`: https://www.nsf.gov
15 changes: 6 additions & 9 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:

# Dependencies for this module
- seamm
- psutil

# Testing
- black
Expand All @@ -18,16 +19,12 @@ dependencies:
- pytest
- pytest-cov

- py-cpuinfo
# Documentation
- pydata-sphinx-theme
- sphinx-design

# Pip-only installs
- pip:
# Testing
- yapf

# Documentation
- rinohtype
- pygments
- sphinx-rtd-theme
- pystemmer

- sphinx-copybutton
- sphinxnotes-strike
16 changes: 16 additions & 0 deletions docs/_static/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Static Doc Directory

Add any paths that contain custom static files (such as style sheets) here,
relative to the `conf.py` file's directory.
They are copied after the builtin static files,
so a file named "default.css" will overwrite the builtin "default.css".

The path to this folder is set in the Sphinx `conf.py` file in the line:
```python
templates_path = ['_static']
```

## Examples of file to add to this directory
* Custom Cascading Style Sheets
* Custom JavaScript code
* Static logo images
Binary file added docs/_static/SEAMM inverted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/SEAMM logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
@import "../basic.css";

html[data-theme="light"] {
--pst-color-primary: #ed1c24;
--pst-color-warning: #ed1c24;
--pst-color-primary-highlight: #bc151b;
--pst-color-secondary: #1d35e7;
--pst-color-secondary-highlight: #3e51e3;

}

html[data-theme="dark"] {
--pst-color-primary: #ed1c24;
--pst-color-warning: #ed1c24;
--pst-color-primary-highlight: #bc151b;
--pst-color-background: #1A1A1A;
--pst-color-secondary: #1d35e7;
--pst-color-secondary-highlight: #3e51e3;


}

html[data-theme="light"] a:hover {
color: #1A1A1A;
}

html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 {
color: #ffffff;
}


html[data-theme="dark"] a {
color: #ffffff;
}

html[data-theme="dark"] .reference.external {
text-decoration: underline;

}

html[data-theme="dark"] p .reference.internal {
text-decoration: underline;

}

html[data-theme="dark"] a:hover {
color: #ed1c24;
}

html[data-theme="dark"] .prev-next-area a p.prev-next-title {
color: white;
}

html[data-theme="dark"] .prev-next-area:hover a:hover p.prev-next-title:hover {
color: #ed1c24;
}

html[data-theme="dark"] dt:target {
background-color: #000000;
}

html .toctree-wrapper li[class^=toctree-l] {
list-style: circle;
}

img:not(.logo__image, .footer_logo) {
padding: 20px;
}


.footer_logo {
max-height: 60px;
}
Binary file added docs/_static/molssi_main_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/molssi_main_logo_inverted_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/molssi_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/nsf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions docs/_templates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Templates Doc Directory

Add any paths that contain templates here, relative to
the `conf.py` file's directory.
They are copied after the builtin template files,
so a file named "page.html" will overwrite the builtin "page.html".

The path to this folder is set in the Sphinx `conf.py` file in the line:
```python
html_static_path = ['_templates']
```

## Examples of file to add to this directory
* HTML extensions of stock pages like `page.html` or `layout.html`
23 changes: 0 additions & 23 deletions docs/_templates/footer.html

This file was deleted.

Loading

0 comments on commit 1e9fa35

Please sign in to comment.