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

Change cruncher names #80

Merged
merged 18 commits into from Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Expand Up @@ -4,6 +4,7 @@ Changelog
master
------

- (`#80 <https://github.com/znicholls/silicone/pull/80>`_) Changed the names of crunchers for brevity. Also changed ``lead_gas`` to ``latest_time_ratio`` and included it in ratio notebook.
- (`#78 <https://github.com/znicholls/silicone/pull/78>`_) Changed how quantile rolling windows works by adding an extra interpolate step for smoothness
- (`#77 <https://github.com/znicholls/silicone/pull/77>`_) Added calculation of variance of rank correlation to stats
- (`#76 <https://github.com/znicholls/silicone/pull/76>`_) Removed command-line interface
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Expand Up @@ -59,6 +59,16 @@ black: $(VENV_DIR) ## use black to autoformat code
echo Not trying any formatting, working directory is dirty... >&2; \
fi;

.PHONY: checks
checks: $(VENV_DIR) ## run checks similar to CI
@echo "=== black ==="; $(VENV_DIR)/bin/black --check src tests setup.py docs/source/conf.py --exclude silicone/_version.py || echo "--- black failed ---" >&2; \
echo "\n\n=== isort ==="; $(VENV_DIR)/bin/isort --check-only --quiet --recursive src tests setup.py || echo "--- isort failed ---" >&2; \
echo "\n\n=== docs ==="; $(VENV_DIR)/bin/sphinx-build -M html docs/source docs/build -qW || echo "--- docs failed ---" >&2; \
echo "\n\n=== notebook tests ==="; $(VENV_DIR)/bin/pytest notebooks -r a --nbval --sanitize-with tests/notebook-tests.cfg || echo "--- notebook tests failed ---" >&2; \
echo "\n\n=== tests ==="; $(VENV_DIR)/bin/pytest tests -r a --cov=silicone --cov-report='' \
&& $(VENV_DIR)/bin/coverage report --fail-under=95 || echo "--- tests failed ---" >&2; \
echo

.PHONY: test-all
test-all: ## run the testsuite and test the notebooks
make test
Expand Down
4 changes: 2 additions & 2 deletions docs/source/database-crunchers.rst
Expand Up @@ -12,10 +12,10 @@ Closest RMS cruncher API
.. automodule:: silicone.database_crunchers.rms_closest
:members:

Lead gas cruncher API
Latest Time Ratio API
=====================

.. automodule:: silicone.database_crunchers.lead_gas
.. automodule:: silicone.database_crunchers.latest_time_ratio
:members:


Expand Down
8 changes: 3 additions & 5 deletions notebooks/00_Introductory_infilling.ipynb
Expand Up @@ -625,7 +625,7 @@
}
],
"source": [
"print(silicone.database_crunchers.DatabaseCruncherRMSClosest.__doc__)"
"print(silicone.database_crunchers.RMSClosest.__doc__)"
]
},
{
Expand Down Expand Up @@ -780,9 +780,7 @@
"metadata": {},
"outputs": [],
"source": [
"cruncher = silicone.database_crunchers.DatabaseCruncherRMSClosest(\n",
" sr15_data_closest_rms\n",
")"
"cruncher = silicone.database_crunchers.RMSClosest(sr15_data_closest_rms)"
]
},
{
Expand All @@ -802,7 +800,7 @@
"output_type": "stream",
"text": [
"\n",
" Filler function derived from :obj:`DatabaseCruncherRMSClosest`.\n",
" Filler function derived from :obj:`RMSClosest`.\n",
"\n",
" Parameters\n",
" ----------\n",
Expand Down