-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from drsmith48/drs-dev
drs-dev
- Loading branch information
Showing
87 changed files
with
1,591 additions
and
1,540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[bumpversion] | ||
current_version = 0.2.0 | ||
commit = True | ||
tag = True | ||
verbose = True | ||
list = True | ||
|
||
[bumpversion:file:fdp/__init__.py] | ||
search = __version__ = '{current_version}' | ||
replace = __version__ = '{new_version}' | ||
|
||
[bumpversion:file:docs/source/conf.py] | ||
search = version = '{current_version}' | ||
replace = version = '{new_version}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[run] | ||
source = fdp | ||
branch = False | ||
|
||
[report] | ||
show_missing = True | ||
ignore_errors = True | ||
exclude_lines = | ||
pragma: no cover | ||
if self.debug: | ||
if debug: | ||
if self.verbose: | ||
if verbose: | ||
if VERBOSE: | ||
if __name__ == .__main__.: | ||
|
||
[html] | ||
directory = htmlcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[flake8] | ||
exclude = docs | ||
max-line-length = 79 | ||
show-source = True | ||
statistics = True | ||
output-file = flake8.output.txt | ||
tee = True | ||
max-complexity = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Lead developers: | ||
David R. Smith | ||
Kevin Tritz | ||
Howard Yuh | ||
Commits from authors: | ||
277 David R. Smith | ||
37 ktritz | ||
22 dmkriete | ||
2 hyyuh | ||
1 Howard Yuh | ||
Commits from obsolete FDF repository: | ||
261 David R. Smith | ||
41 Kevin Tritz | ||
17 ktritz | ||
10 Howard Yuh | ||
7 John Schmitt | ||
4 hyyuh | ||
2 jcschmitt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Release v0.2.0 -- 2017-04-19\n | ||
4abf46b tests | ||
6564d4c changed 'fdp_globals' to 'globals' throughout repo | ||
dea305b changed fdp_globals import | ||
ea12a72 tests | ||
54cb3a7 Merge branch 'drs-dev' of github.com:drsmith48/fdp into drs-dev | ||
74c271f tests | ||
ff08bd2 tests | ||
63ce140 tests | ||
af97cda testing for logbook.py and machine.py | ||
8fbaf30 pytest setup | ||
534f00a created new test directory and configured for pytest; run 'pytest' or 'make test' | ||
3f59f74 minor | ||
be1449c minor | ||
a8e38e3 fixed axis removal from multi-dim signals | ||
9400ca8 Merge branch 'master' into drs-dev | ||
8e2d471 Merge pull request #54 from drsmith48/plotpsirz | ||
33c025e debugging eq.plotrz.plot() | ||
7adfae2 bfield() method for equilibria | ||
ddd16a5 minor fixes | ||
ea8852b changed 'zero level' indices to floats | ||
09f779a changed iteritems to iter() | ||
7d32fd6 docs | ||
bab6bbc docs | ||
fa1a1fb docs | ||
17e9578 removed pushes from bumps in Makefile | ||
a06ac9b run 'authors' recipe prior to 'bump-*' recipes in Makefile | ||
\n | ||
Release v0.1.4 -- 2017-04-07 | ||
|
||
a2842c8 added automatic CHANGELOG.txt updates with 'bump-*' recipes in Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
======================== | ||
How to contribute | ||
======================== | ||
|
||
* Github repository: https://github.com/Fusion-Data-Platform/fdp | ||
* Submit bugs and feature requests as Github issues: https://github.com/Fusion-Data-Platform/fdp/issues | ||
* Google group: https://groups.google.com/forum/#!forum/fusion-data-platform | ||
|
||
**Code** | ||
|
||
Thank you for your interest in the FDP project. To contribute to the FDP code base, fork the repo at Github and submit pull requests with your contributions. Read more: | ||
|
||
* https://guides.github.com/activities/forking/ | ||
* https://help.github.com/articles/fork-a-repo/ | ||
|
||
**Style** | ||
|
||
Please try to follow the `PEP8 style guide <https://www.python.org/dev/peps/pep-0008/>`_. To scan for PEP8 conformance, run ``make lint`` in the top-level directory. | ||
|
||
**Makefile utilities** | ||
|
||
The top-level ``Makefile`` contains several utilities for generating docs, code style/quality reviews, and versioning: | ||
|
||
.. code-block:: shell | ||
$ make help | ||
help show this help message | ||
docs build HTML and PDF documents | ||
docs-html build HTML documents | ||
docs-pdf build PDF documents | ||
test run pytest in current Python environment | ||
lint run flake8 for code quality review | ||
autopep run autopep8 to fix minor pep8 violations | ||
authors update AUTHORS.txt | ||
bump-major update AUTHORS and CHANGELOG; bump major version and tag | ||
bump-minor update AUTHORS and CHANGELOG; bump minor version and tag | ||
bump-patch update AUTHORS and CHANGELOG; bump patch version and tag | ||
clean remove all build, docs, and Python artifacts | ||
clean-docs remove docs/build | ||
clean-pyc remove Python file artifacts | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,185 @@ | ||
.PHONY: build-docs | ||
.DEFAULT_GOAL := help | ||
|
||
DOCDIR = docs | ||
today := $(shell date +%F) | ||
|
||
build-docs: | ||
rm -rf $(DOCDIR)/build/html/ | ||
$(MAKE) -C $(DOCDIR) html | ||
nextmajorversion := $(shell bumpversion \ | ||
--no-commit --no-tag --dry-run --list major --allow-dirty | \ | ||
grep "^new_version=.*$$" | \ | ||
grep -o "[0-9]*\.[0-9]*\.[0-9]*$$") | ||
nextminorversion := $(shell bumpversion \ | ||
--no-commit --no-tag --dry-run --list minor --allow-dirty | \ | ||
grep "^new_version=.*$$" | \ | ||
grep -o "[0-9]*\.[0-9]*\.[0-9]*$$") | ||
nextpatchversion := $(shell bumpversion \ | ||
--no-commit --no-tag --dry-run --list patch --allow-dirty | \ | ||
grep "^new_version=.*$$" | \ | ||
grep -o "[0-9]*\.[0-9]*\.[0-9]*$$") | ||
|
||
define LEAD_AUTHORS | ||
Lead developers: | ||
David R. Smith | ||
Kevin Tritz | ||
Howard Yuh | ||
endef | ||
export LEAD_AUTHORS | ||
|
||
|
||
define FDF_SHORTLOG | ||
Commits from obsolete FDF repository: | ||
261 David R. Smith | ||
41 Kevin Tritz | ||
17 ktritz | ||
10 Howard Yuh | ||
7 John Schmitt | ||
4 hyyuh | ||
2 jcschmitt | ||
endef | ||
export FDF_SHORTLOG | ||
|
||
define PRINT_HELP_PYSCRIPT | ||
import re, sys | ||
for line in sys.stdin: | ||
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) | ||
if match: | ||
target, help = match.groups() | ||
print("%-20s %s" % (target, help)) | ||
endef | ||
export PRINT_HELP_PYSCRIPT | ||
|
||
|
||
define BROWSER_PYSCRIPT | ||
import os, webbrowser, sys | ||
try: | ||
from urllib import pathname2url | ||
except: | ||
from urllib.request import pathname2url | ||
|
||
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) | ||
endef | ||
export BROWSER_PYSCRIPT | ||
BROWSER := python -c "$$BROWSER_PYSCRIPT" | ||
|
||
|
||
.PHONY: help | ||
help: ## show this help message | ||
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) | ||
|
||
|
||
.PHONY: docs | ||
docs: docs-pdf docs-html ## build HTML and PDF documents | ||
|
||
|
||
.PHONY: docs-html | ||
docs-html: ## build HTML documents | ||
$(MAKE) -C docs/ html | ||
@$(BROWSER) docs/build/html/index.html | ||
|
||
|
||
.PHONY: docs-pdf | ||
docs-pdf: ## build PDF documents | ||
$(MAKE) -C docs/ latexpdf | ||
|
||
|
||
.PHONY: outdated | ||
outdated: # list outdated conda and pip packages | ||
@echo "outdated conda packages" | ||
@conda update --dry-run --all | ||
@echo "outdated pip packages (may be managed by conda)" | ||
@pip list --outdated | ||
|
||
|
||
.PHONY: test | ||
test: ## run pytest in current Python environment | ||
pytest | ||
|
||
|
||
.PHONY: coverage | ||
coverage: ## check test coverage and show report in terminal | ||
@rm -f .coverage | ||
coverage run --module pytest | ||
coverage report | ||
|
||
|
||
.PHONY: coverage-html | ||
coverage-html: coverage ## check test coverage and show report in browser | ||
@rm -fr htmlcov/ | ||
@coverage html | ||
@$(BROWSER) htmlcov/index.html | ||
|
||
|
||
.PHONY: lint | ||
lint: ## run flake8 for code quality review | ||
@rm -f flake8.output.txt | ||
flake8 --exit-zero fdp/ | ||
|
||
|
||
.PHONY: autopep | ||
autopep: ## run autopep8 to fix minor pep8 violations | ||
autopep8 --in-place -r fdp/ | ||
autopep8 --in-place -r test/ | ||
|
||
|
||
.PHONY: authors | ||
authors: ## update AUTHORS.txt | ||
@echo "$$LEAD_AUTHORS" > AUTHORS.txt | ||
@echo "Commits from authors:" >> AUTHORS.txt | ||
@git shortlog -s -n >> AUTHORS.txt | ||
@echo "$$FDF_SHORTLOG" >> AUTHORS.txt | ||
|
||
|
||
.PHONY: bump-major | ||
bump-major: authors ## update AUTHORS and CHANGELOG; bump major version and tag | ||
@cp -f CHANGELOG.txt tmp.txt | ||
@rm -f CHANGELOG.txt | ||
@echo "Release v$(nextmajorversion) -- $(today)\n" > CHANGELOG.txt | ||
@git log --oneline `git describe --tags --abbrev=0`..HEAD >> CHANGELOG.txt | ||
@echo "\n" >> CHANGELOG.txt | ||
@cat tmp.txt >> CHANGELOG.txt | ||
@rm -f tmp.txt | ||
@git add CHANGELOG.txt AUTHORS.txt | ||
@git commit -m "updated CHANGELOG.txt and AUTHORS.txt" | ||
@bumpversion major # runs 'git commit' and 'git tag' | ||
|
||
|
||
.PHONY: bump-minor | ||
bump-minor: authors ## update AUTHORS and CHANGELOG; bump minor version and tag | ||
@mv CHANGELOG.txt tmp.txt | ||
@echo "Release v$(nextminorversion) -- $(today)\n" > CHANGELOG.txt | ||
@git log --oneline `git describe --tags --abbrev=0`..HEAD >> CHANGELOG.txt | ||
@echo "\n" >> CHANGELOG.txt | ||
@cat tmp.txt >> CHANGELOG.txt | ||
@rm -f tmp.txt | ||
@git add CHANGELOG.txt AUTHORS.txt | ||
@git commit -m "updated CHANGELOG.txt and AUTHORS.txt" | ||
@bumpversion minor # runs 'git commit' and 'git tag' | ||
|
||
|
||
.PHONY: bump-patch | ||
bump-patch: authors ## update AUTHORS and CHANGELOG; bump patch version and tag | ||
@cp -f CHANGELOG.txt tmp.txt | ||
@rm -f CHANGELOG.txt | ||
@echo "Release v$(nextpatchversion) -- $(today)\n" > CHANGELOG.txt | ||
@git log --oneline `git describe --tags --abbrev=0`..HEAD >> CHANGELOG.txt | ||
@echo "\n" >> CHANGELOG.txt | ||
@cat tmp.txt >> CHANGELOG.txt | ||
@rm -f tmp.txt | ||
@git add CHANGELOG.txt AUTHORS.txt | ||
@git commit -m "updated CHANGELOG.txt and AUTHORS.txt" | ||
@bumpversion patch # runs 'git commit' and 'git tag' | ||
|
||
|
||
.PHONY: clean | ||
clean: clean-pyc clean-docs ## remove all build, docs, and Python artifacts | ||
|
||
|
||
.PHONY: clean-docs | ||
clean-docs: ## remove docs/build | ||
rm -rf docs/build | ||
|
||
|
||
.PHONY: clean-pyc | ||
clean-pyc: ## remove Python file artifacts | ||
find . -name '*.pyc' -exec rm -f {} + | ||
find . -name '*.pyo' -exec rm -f {} + | ||
find . -name '*~' -exec rm -f {} + | ||
find . -name '__pycache__' -exec rm -fr {} + |
Oops, something went wrong.