Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into mongomock
  • Loading branch information
ikondov committed Apr 9, 2024
2 parents c56dad0 + 5fd3884 commit a561654
Show file tree
Hide file tree
Showing 78 changed files with 750 additions and 686 deletions.
30 changes: 1 addition & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,7 @@ jobs:
pip install .[workflow-checks,graph-plotting,flask-plotting]
pytest fireworks
pytest_pymongo4:
working_directory: ~/fireworks
docker:
- image: continuumio/miniconda3:4.6.14
- image: circleci/mongo:latest
steps:
- checkout
- run:
command: |
export PATH=$HOME/miniconda3/bin:$PATH
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda create -q -n test-environment python=3.8
source activate test-environment
conda update --quiet --all
pip install --quiet --ignore-installed -r requirements.txt -r requirements-ci.txt
- run:
name: Run fireworks tests
command: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate test-environment
pip install --quiet -e .
pip install --quiet --upgrade pymongo
pytest fireworks
workflows:
version: 2
build_and_test:
jobs:
- pytest
- pytest_pymongo4
jobs: [pytest]
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
pytest:
runs-on: ubuntu-latest

services:
mongodb:
image: mongo
ports:
- 27017:27017

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install dependencies
run: |
pip install -r requirements.txt -r requirements-ci.txt
- name: Run fireworks tests
shell: bash -l {0}
run: |
pip install .[workflow-checks,graph-plotting,flask-plotting]
pytest fireworks
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: ^docs

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.3.5
hooks:
- id: ruff
args: [--fix, --ignore, D]
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# <img alt="FireWorks" src="docs_rst/_static/FireWorks_logo.png" width="250">
<h1 align="center">
<img alt="FireWorks" src="docs_rst/_static/fireworks-logo.svg" width="350">
</h1>

FireWorks stores, executes, and manages calculation workflows.

Expand All @@ -9,7 +11,8 @@ FireWorks stores, executes, and manages calculation workflows.
If you like FireWorks, you might also like [rocketsled](https://github.com/hackingmaterials/rocketsled).

If you find FireWorks useful, please consider citing the paper:
```

```txt
Jain, A., Ong, S. P., Chen, W., Medasani, B., Qu, X., Kocher, M., Brafman, M.,
Petretto, G., Rignanese, G.-M., Hautier, G., Gunter, D., and Persson, K. A.
(2015) FireWorks: a dynamic workflow system designed for high-throughput
Expand Down
1 change: 1 addition & 0 deletions docs_rst/_static/fireworks-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs_rst/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# 'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
Expand Down Expand Up @@ -309,5 +309,5 @@ def skip(app, what, name, obj, skip, options):


# AJ: a hack found online to get __init__ to show up in docs
def setup(app):
def setup(app) -> None:
app.connect("autodoc-skip-member", skip)
1 change: 1 addition & 0 deletions docs_rst/config_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ A few basic parameters that can be tweaked are:
* ``WEBSERVER_PORT: 5000`` - the default port on which to run the web server
* ``QUEUE_JOBNAME_MAXLEN: 20`` - the max length of the job name to send to the queuing system (some queuing systems limit the size of job names)
* ``MONGOMOCK_SERVERSTORE_FILE`` - path to a non-empty JSON file, if set then mongomock will be used instead of MongoDB; this file should be initialized with '{}'
* ``ROCKET_STREAM_LOGLEVEL: INFO`` - the streaming log level of the rocket launcher logger (valid values: DEBUG, INFO, WARNING, ERROR, CRITICAL)

Parameters that you probably shouldn't change
---------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs_rst/firetask_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Let's explore custom Firetasks with an example: a custom Python script for addin
input_array = fw_spec['input_array']
m_sum = sum(input_array)

print(f"The sum of {input_array} is: {m_sum}"
print(f"The sum of {input_array} is: {m_sum}")

return FWAction(stored_data={'sum': m_sum}, mod_spec=[{'_push': {'input_array': m_sum}}])

Expand Down
Loading

0 comments on commit a561654

Please sign in to comment.