diff --git a/.gitignore b/.gitignore index 31589bcc..fc314e18 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ build/ /data/ coverage_report/ dist/ -docs/site/ node_modules/ scripts/private /public/ diff --git a/HISTORY.md b/HISTORY.md new file mode 100644 index 00000000..527a58d4 --- /dev/null +++ b/HISTORY.md @@ -0,0 +1,5 @@ +# History + +## v24.1 (TBD) + +* ... diff --git a/HISTORY.rst b/HISTORY.rst deleted file mode 100644 index 4d0b1077..00000000 --- a/HISTORY.rst +++ /dev/null @@ -1,7 +0,0 @@ -======= -History -======= - -v24.1 (TBD) -------------------- -* ... diff --git a/Makefile b/Makefile index 9c0cf109..277f3b38 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: build docs docs-clean docs-serve docs-all clean clean-test clean-pyc clean-build loc help lint lint-py lint-js format format-py format-js sync-dev +.PHONY: build clean clean-test clean-pyc clean-build loc help lint lint-py lint-js format format-py format-js sync-dev .DEFAULT_GOAL := help define BROWSER_PYSCRIPT @@ -60,29 +60,6 @@ coverage: ## Generate test coverage report coverage html -d coverage_report $(BROWSER) coverage_report/index.html -docs: ## Build documentation {html} - @$(MAKE) -C docs clean - @$(MAKE) -C docs html - @echo "HTML: \"docs/build/html/index.html\"" - -docs-clean: ## Clean documentation - @$(MAKE) -C docs clean - -docs-serve: ## Realtime documentation preview - sphinx-autobuild -b html docs/source docs/build/html --port 5555 - -docs-all: ## Build documentation {html, pdf, docx} - @$(MAKE) -C docs clean - @$(MAKE) -C docs html - @$(MAKE) -C docs singlehtml - @$(MAKE) -C docs latexpdf - @mkdir -p docs/build/docx - @cd docs/build/singlehtml; pandoc -s index.html -o ../docx/pybmds.docx - @echo "HTML: \"docs/build/html/index.html\"" - @echo "Single Page HTML: \"docs/build/singlehtml/index.html\"" - @echo "Microsoft Word: \"docs/build/docx/pybmds.docx\"" - @echo "PDF: \"docs/build/latex/pybmds.pdf\"" - loc: ## Generate lines of code report @cloc \ --exclude-dir=build,dist,migrations,node_modules,logs,private,public,scripts,vendor,venv \ diff --git a/README.md b/README.md index 6924f3b0..21a1c0f4 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,4 @@ -# BMDS webserver +# BMDS UI -Run a webserver that will batch process dose-response data using the US EPA's -benchmark dose modeling software [BMDS](https://www.epa.gov/bmds). Under the hood, this web application -uses the [BMDS Python interface](https://pypi.python.org/pypi/bmds). +A user interface foe execution of dose-response data using the US EPA's Benchmark Dose Modeling Software [BMDS](https://www.epa.gov/bmds). Under the hood, this web application uses the [BMDS Python interface](https://pypi.python.org/pypi/bmds). -To use the webserver, specify a new BMDS Job using a input file formatted like this. - -```json -{ - "dataset_type": "D", - "bmds_version": "BMDS2601", - "datasets": [ - { - "doses": [0, 1.96, 5.69, 29.75], - "ns": [75, 49, 50, 49], - "incidences": [5, 1, 3, 14] - }, - { - "doses": [0, 1.96, 5.69, 29.75], - "ns": [75, 49, 50, 49], - "incidences": [0, 0, 11, 27] - } - ] -} -``` - -You'll receive a Job ID back, and you can check the website to see when the job is complete. Then, results can be downloaded. Results include: - -* The dfile created for each model -* The outfile created for each model -* The parsed output file for each model -* A recommended best-fitting model, using guidance from [Wignall et al. 2014](https://dx.doi.org/10.1289/ehp.1307539) (optional) diff --git a/bmds_ui/analysis/fixtures/initial_data.json b/bmds_ui/analysis/fixtures/initial_data.json index 887fbbbb..7e92bac0 100644 --- a/bmds_ui/analysis/fixtures/initial_data.json +++ b/bmds_ui/analysis/fixtures/initial_data.json @@ -6,7 +6,7 @@ "content_type": 1, "subject": "Homepage", "content": { - "template": "
\n
\n

Welcome to BMDS online.

\n
\n
\n
\n
\n
\n

\n This web-application executes the US EPA's benchmark dose modeling software (BMDS).\n

\n
    \n
  • Load example datasets below to view example input files; for more information, see the documentation\n
  • \n
  • Software is designed for automated BMDS execution using a\n programming language such as Python, R, or Java. To take\n advantage of automation, use the API,\n and see the quickstart section.\n
  • \n
\n
\n
\n
\n
\n {% csrf_token %}\n \n \n

Analyses are deleted after {{days_to_keep_analyses}}.

\n
\n
\n
\n" + "template": "
\n
\n

Welcome to BMDS online.

\n
\n
\n
\n
\n
\n

\n This web-application executes the US EPA's benchmark dose modeling software (BMDS).\n

\n
    \n
  • Load example datasets below to view example input files; for more information, see the documentation\n
  • \n
  • Software is designed for automated BMDS execution using a\n programming language such as Python, R, or Java. To take\n advantage of automation, use the API,\n and see the quickstart section.\n
  • \n
\n
\n
\n
\n
\n {% csrf_token %}\n \n \n

Analyses are deleted after {{days_to_keep_analyses}}.

\n
\n
\n
\n" }, "created": "2021-01-31 08:00:00.123456+00:00", "last_updated": "2021-01-31 08:00:00.123456+00:00" diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d0c3cbf1..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# 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) diff --git a/docs/source/development.md b/docs/development.md similarity index 82% rename from docs/source/development.md rename to docs/development.md index fc239e92..3c3be36b 100644 --- a/docs/source/development.md +++ b/docs/development.md @@ -8,7 +8,7 @@ Make sure you have the following applications installed locally: - [Yarn](https://yarnpkg.com/) - [PostgreSQL](https://www.postgresql.org/) >= 16 -If installing on Windows, all requirements are available using [miniconda](https://docs.conda.io/en/latest/miniconda.html), and do not require administrative access. +If installing on Windows, these packages are available using [miniconda](https://docs.conda.io/en/latest/miniconda.html). ## Initial setup @@ -79,7 +79,7 @@ npm start If you navigate to [localhost](http://127.0.0.1:8000/) and see a website, you're ready to begin coding! -## Visual Studio Code settings +## Visual Studio Code [Visual Studio Code](https://code.visualstudio.com/) is the recommended editor for this project. @@ -89,35 +89,6 @@ Recommended extensions: - [Eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - [Ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) -Recommended workspace settings: - -```json -{ - "restructuredtext.linter.disabled": true, - "[html]": { - "editor.formatOnSave": false - }, - "[python]": { - "editor.formatOnSave": true, - "editor.formatOnPaste": false, - "editor.codeActionsOnSave": { - "source.fixAll": true - } - }, - "[javascript]": { - "editor.formatOnSave": false, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - } - }, - "editor.formatOnSave": true, - "python.linting.flake8Enabled": false, - "python.pythonPath": "./venv/bin/python", - "eslint.workingDirectories": [ - "./frontend" - ] -} -``` ## Additional settings ### Feature flags (frontend) @@ -134,14 +105,10 @@ Future mode can also be enabled via the local setting `ALWAYS_SHOW_FUTURE`. This ```python # bmds_ui\main\settings\local.py - ... - # Shows future-flagged items without login/url parameter - ALWAYS_SHOW_FUTURE = True - ... -``` - -That's it! Now you should be able to view content that's coming soon! +# Shows future-flagged items without login/url parameter +ALWAYS_SHOW_FUTURE = True +``` ### Building a test database diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..cecc7e0b --- /dev/null +++ b/docs/index.md @@ -0,0 +1,18 @@ +# BMDS UI + +BMDS UI is a user interface for running `pybmds`, a python package for dose-response modeling using the US EPA's Benchmark Dose Modeling Software ([BMDS](https://www.epa.gov/bmds)). The user interface is a web application, and it is desgined for running as a web application (such as [BMDS Online](https://bmdsonline.epa.gov)) or a desktop model, which we call BMDS Desktop. + +## BMDS Desktop Capabilities + +BMDS Desktop is designed to run locally on your desktop computer in fully offline mode; it does not interact with any resources on the internet after initial installation. + + +*Screenshot of TUI* + +*Create database* + +*BMDS Desktop User Interface w/ Runs* + +*Dose Response Setup* + +*Dose Response Plot* diff --git a/docs/source/_static/css/style.css b/docs/source/_static/css/style.css deleted file mode 100644 index 4abf7877..00000000 --- a/docs/source/_static/css/style.css +++ /dev/null @@ -1,7 +0,0 @@ -code { - font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif; -} - -.bd-page-width { - max-width: 100%; -} diff --git a/docs/source/_static/img/epa_logo.png b/docs/source/_static/img/epa_logo.png deleted file mode 100644 index fcc6403f..00000000 Binary files a/docs/source/_static/img/epa_logo.png and /dev/null differ diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index f85b901c..00000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,50 +0,0 @@ -project = "BMDS webserver" -copyright = "Public Domain" -author = "U.S. EPA" - -extensions = ["myst_parser"] -souce_suffix = { - ".md": "markdown", - ".rst": "restructuredtext", -} -templates_path = ["_templates"] - -exclude_patterns = [] - - -# HTML settings -html_theme = "pydata_sphinx_theme" -html_static_path = ["_static"] -html_css_files = ["css/style.css"] -html_sidebars = {"**": ["globaltoc.html"]} -html_theme_options = { - "icon_links": [ - { - "name": "GitHub", - "url": "https://github.com/USEPA/bmds-online-private", - "icon": "fa-brands fa-github", - "type": "fontawesome", - }, - { - "name": "U.S. Environmental Protection Agency", - "url": "https://epa.gov/bmds", - "icon": "_static/img/epa_logo.png", - "type": "local", - }, - ], - "use_edit_page_button": False, - "show_toc_level": 2, - "navbar_end": [ - "theme-switcher.html", - "navbar-icon-links.html", - ], -} - -# Latex / PDF settings -latex_elements = { - "printindex": "", - "sphinxsetup": "hmargin={0.9in,0.9in}, vmargin={0.9in,0.9in}, marginpar=1.0in", - "papersize": "letterpaper", - "pointsize": "10pt", - "figure_align": "htbp", -} diff --git a/docs/source/index.md b/docs/source/index.md deleted file mode 100644 index 68e4053f..00000000 --- a/docs/source/index.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -html_theme.sidebar_secondary.remove: true ---- - -# BMDS webserver - -BMDS Server is a web application for conducting dose-response modeling using the US EPA's Benchmark Dose Modeling Software ([BMDS](https://www.epa.gov/bmds)). It utilizes the BMDS package [pybmds](https://pypi.org/project/pybmds/) under the hood, which can be helpful for batch-executing analysis that do not require a user-interface. - -## User's Guide - -```{toctree} -:maxdepth: 2 -development -``` diff --git a/make.bat b/make.bat index 64bdf730..526faaa4 100644 --- a/make.bat +++ b/make.bat @@ -4,9 +4,6 @@ if "%~1" == "" goto :help if /I %1 == help goto :help if /I %1 == sync-dev goto :sync-dev if /I %1 == build goto :build -if /I %1 == docs goto :docs -if /I %1 == docs-serve goto :docs-serve -if /I %1 == docs-all goto :docs-all if /I %1 == test goto :test if /I %1 == lint goto :lint if /I %1 == format goto :format @@ -23,9 +20,6 @@ goto :help echo.Please use `make ^` where ^ is one of echo. sync-dev sync dev environment after code checkout echo. build build application (python wheel) -echo. docs Build documentation {html} -echo. docs-serve Realtime documentation preview -echo. docs-all Build documentation {html, docx} echo. test perform both test-py and test-js echo. coverage generate test coverage report echo. test-py run python tests @@ -52,25 +46,6 @@ python manage.py set_git_commit flit build --no-use-vcs --format=wheel goto :eof -:docs -rmdir /s /q docs\build -sphinx-build -b html docs/source docs/build/html -goto :eof - -:docs-serve -rmdir /s /q docs\build -sphinx-autobuild -b html docs/source docs/build/html --port 5555 -goto :eof - -:docs-all -rmdir /s /q docs\build -sphinx-build -b html docs/source docs/build/html -sphinx-build -b singlehtml docs/source docs/build/singlehtml -cd docs\build\singlehtml -pandoc -s index.html -o pybmds.docx -cd ../../.. -goto :eof - :lint ruff format . --check && ruff check . npm --prefix .\frontend run lint diff --git a/pyproject.toml b/pyproject.toml index 0a3b0355..6f601f5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,11 +54,6 @@ dev = [ "django_extensions==3.2.3", "django-browser-reload==1.12.1", - # docs - "Sphinx~=7.3.7", - "myst-parser~=2.0.0", - "pydata-sphinx-theme~=0.15.2", - # tests "pytest~=8.2.1", "pytest-django~=4.8.0", diff --git a/tests/data/db.yaml b/tests/data/db.yaml index e05e1c6c..b1e34227 100644 --- a/tests/data/db.yaml +++ b/tests/data/db.yaml @@ -5161,11 +5161,11 @@ \
\n

\n This web-application executes the US EPA's benchmark dose modeling software (BMDS).\n \

\n
    \n
  • Load example datasets - below to view example input files; for more information, see the documentation\n + below to view example input files; for more information, see the documentation\n \
  • \n
  • Software is designed for automated BMDS execution using a\n programming language such as Python, R, or Java. To take\n advantage of automation, use the - API,\n and see the quickstart + API,\n and see the quickstart section.\n
  • \n
\n
\n \n \
\n
\n {% csrf_token %}\n \n