Skip to content

Commit 381ec6e

Browse files
authored
Merge branch 'master' into master
2 parents 0aa3391 + 222c029 commit 381ec6e

378 files changed

Lines changed: 11240 additions & 3822 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @exercism/python

.github/stale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ exemptLabels:
99
- epic
1010
- enhancement
1111
- beginner friendly
12+
- awaiting review
1213
# Label to use when marking an issue as stale
1314
staleLabel: abandoned
1415
# Comment to post when marking an issue as stale. Set to `false` to disable

.travis.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1-
sudo: false
2-
31
language: python
4-
2+
dist: xenial
3+
54
python:
65
- 2.7
7-
- 3.3
8-
- 3.4
96
- 3.5
107
- 3.6
8+
- 3.7
119
- nightly
1210

1311
matrix:
12+
include:
13+
# Python 3.4 not supported in xenial
14+
- python: 3.4
15+
dist: trusty
16+
- env: JOB=HOUSEKEEPING
17+
install: ./bin/fetch-configlet
18+
before_script: ./bin/check-readmes.sh
19+
script:
20+
# May provide more useful output than configlet fmt
21+
# if JSON is not valid or items are incomplete
22+
- ./bin/configlet lint .
23+
# Verify correct formatting in config.json
24+
- ./bin/configlet fmt . && git diff --quiet
1425
allow_failures:
1526
- python: nightly
1627

17-
install:
18-
- pip install -r requirements-travis.txt
19-
2028
before_script:
2129
- flake8
22-
- ./bin/fetch-configlet
23-
- ./bin/configlet lint .
24-
25-
script:
30+
31+
script:
2632
- ./test/check-exercises.py

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Please see the [contributing guide](https://github.com/exercism/docs/blob/master
1414
## Working on the Exercises
1515

1616
We welcome both improvements to the existing exercises and new exercises.
17-
A list of missing exercise can be found here: http://exercism.io/languages/python/todo
17+
A list of missing exercise can be found here: https://github.com/exercism/python/issues/417#issuecomment-366040062
1818

1919

2020
### Conventions
@@ -23,13 +23,14 @@ A list of missing exercise can be found here: http://exercism.io/languages/pytho
2323
- We use `unittest` (Python Standard Library) and no 3rd-party-framework.
2424
- We use the parameter order `self.assertEqual(actual, expected)` ([#440](https://github.com/exercism/python/issues/440)).
2525
- We use context managers (`with self.assertRaises(\<exception type\>):`) for testing for exceptions ([#477](https://github.com/exercism/python/issues/477)).
26+
- We use an established utility method to confirm that expected exceptions contain a non-empty message. This method must be included for any test class with an exception-based test case ([#1080](https://github.com/exercism/python/issues/1080#issuecomment-442068539)).
2627
- We use `assertIs(actual, True)` and `assertIs(actual, False)` rather than `assertTrue(actual)` or `assertFalse(actual)` ([#419](https://github.com/exercism/python/pull/419)).
2728
- We use a comment string in the test file to reference the version of the exercise's `canonical-data.json` that tests were adapted from (wording can be found in: [#784](https://github.com/exercism/python/issues/784)).
2829

2930

3031
### Testing
3132

32-
All exercises must be compatible with Python versions 2.7 and 3.3 upwards.
33+
All exercises must be compatible with Python versions 2.7 and 3.4 upwards.
3334

3435
To test a single exercise (e.g., with Python 2.7):
3536
```
@@ -71,9 +72,5 @@ If you're interested, Tim Pope even has an [entire blog post](http://tbaggery.co
7172

7273
If you're new to Git, take a look at [this short guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md#git-basics).
7374

74-
75-
## Python icon
76-
The Python logo is an unregistered trademark. We are using a derived logo with the permission of the Python Software Foundation.
77-
7875
## License
7976
This repository uses the [MIT License](/LICENSE).

bin/check-readmes.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
get_timestamp()
4+
{
5+
path="$1"
6+
git log -n1 --pretty=format:%ct -- "$path"
7+
}
8+
9+
ret=0
10+
for exercise in $(ls -d exercises/*/); do
11+
meta_dir="${exercise}.meta"
12+
if [ -d "$meta_dir" ]; then
13+
meta_timestamp="$(get_timestamp "$meta_dir")"
14+
readme_timestamp="$(get_timestamp "${exercise}README.md")"
15+
if [ "$meta_timestamp" -gt "$readme_timestamp" ]; then
16+
ret=1
17+
echo "$(basename "$exercise"): .meta/ contents newer than README. Please regenerate it with configlet."
18+
fi
19+
fi
20+
done
21+
22+
exit $ret

0 commit comments

Comments
 (0)