Skip to content

Commit

Permalink
Starting pre-release cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
evhub committed Feb 12, 2017
1 parent 73f2136 commit 61c3c3c
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: git://github.com/pre-commit/pre-commit-hooks.git
sha: v0.7.1
sha: e626cd57090d8df0be21e4df0f4e55cc3511d6ab
hooks:
- id: check-added-large-files
- id: check-byte-order-marker
Expand Down
38 changes: 38 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,41 @@ Contributing to Coconut is as simple as
- stubs
- `__coconut__.pyi`
+ A MyPy stub file for specifying the type of all the objects defined in Coconut's package header (which is saved as `__coconut__.py`).
- tests
- `__init__.py`
+ Imports everything in `main_test.py`.
- `__main__.py`
+ When run, compiles all of the test source code, but _does not run any tests_. To run the tests, the command `make test`, or a `pytest` command to run a specific test, is necessary.
- `main_test.py`
+ Contains `TestCase` subclasses that run all of the commands for testing the Coconut files in `src`.
- src
- `extras.coco`
+ Directly imports and calls functions in the Coconut package, including from `convenience.py` and icoconut.
- `runnable.coco`
+ Makes sure the argument `--arg` was passed when running the file.
- `runner.coco`
+ Runs `main` from `cocotest/agnostic/main.py`.
- cocotest
+ _Note: Files in the folders below all get compiled into the top-level cocotest directory. The folders are only for differentiating what files to compile on what Python version._
- agnostic
- `__init__.coco`
+ Contains a docstring that `main.coco` asserts exists.
- `main.coco`
+ Contains the main test entry point as well as many simple, one-line tests.
- `specific.coco`
+ Tests to be run only on a specific Python version, but not necessarily only under a specific `--target`.
- `suite.coco`
+ Tests objects defined in `util.coco`.
- `tutorial.coco`
+ Tests all the examples in `TUTORIAL.md`.
- `util.coco`
+ Contains objects used in `suite.coco`.
- python2
- `py2_test.coco`
+ Tests to be run only on Python 2 with `--target 2`.
- python3
- `py3_test.coco`
+ Tests to be run only on Python 3 with `--target 3`.
- python35
- `py35_test.coco`
+ Tests to be run only on Python 3.5 with `--target 3.5`.
2 changes: 1 addition & 1 deletion coconut/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def fixpath(path):
"sphinx": (1, 5, 2),
"pygments": (2, 2, 0),
"recommonmark": (0, 4, 0),
"sphinx_bootstrap_theme": (0, 4, 13),
"sphinx_bootstrap_theme": (0, 4, 14),
"psutil": (5, 1, 3),
"jupyter": (1, 0, 0),
"jupyter-console": (5, 1, 0),
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

from __future__ import print_function, absolute_import, unicode_literals, division

from coconut.root import * # NOQA
from tests.main_test import * # NOQA
6 changes: 4 additions & 2 deletions tests/src/runnable.coco
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env coconut-run
import sys
assert sys.argv[1] == "--arg"
"<success>" |> print

if __name__ == "__main__":
assert sys.argv[1] == "--arg"
"<success>" |> print

0 comments on commit 61c3c3c

Please sign in to comment.