Skip to content

Commit 677a55a

Browse files
authored
feat: rewrite programming-challenges CLI (#3)
1 parent 7aa12f3 commit 677a55a

File tree

256 files changed

+16827
-1879
lines changed

Some content is hidden

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

256 files changed

+16827
-1879
lines changed

.commitlintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "extends": ["@commitlint/config-conventional"] }

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ insert_final_newline = true
1212

1313
[*.py]
1414
indent_size = 4
15+
16+
[*.txt]
17+
indent_size = 1
18+
trim_trailing_whitespace = false
19+
insert_final_newline = false

.github/CONTRIBUTING.md

Lines changed: 0 additions & 112 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/BUG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: '🐛 Bug Report'
3+
about: 'Report an unexpected problem or unintended behavior.'
4+
title: '[Bug]'
5+
labels: 'bug'
6+
---
7+
8+
<!--
9+
Please provide a clear and concise description of what the bug is. Include
10+
screenshots if needed. Please make sure your issue has not already been fixed.
11+
-->
12+
13+
## Steps To Reproduce
14+
15+
1. Step 1
16+
2. Step 2
17+
18+
## The current behavior
19+
20+
## The expected behavior
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: '📜 Documentation'
3+
about: 'Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...).'
4+
title: '[Documentation]'
5+
labels: 'documentation'
6+
---
7+
8+
<!-- Please make sure your issue has not already been fixed. -->
9+
10+
## Documentation
11+
12+
<!-- Please uncomment the type of documentation problem this issue address -->
13+
14+
<!-- Documentation is Missing -->
15+
<!-- Documentation is Confusing -->
16+
<!-- Documentation has Typo errors -->
17+
18+
## Proposal
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: '✨ Feature Request'
3+
about: 'Suggest a new feature idea.'
4+
title: '[Feature]'
5+
labels: 'feature request'
6+
---
7+
8+
<!-- Please make sure your issue has not already been fixed. -->
9+
10+
## Description
11+
12+
<!-- A clear and concise description of the problem or missing capability... -->
13+
14+
## Describe the solution you'd like
15+
16+
<!-- If you have a solution in mind, please describe it. -->
17+
18+
## Describe alternatives you've considered
19+
20+
<!-- Have you considered any alternative solutions or workarounds? -->

.github/ISSUE_TEMPLATE/IMPROVEMENT.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: '🔧 Improvement'
3+
about: 'Improve structure/format/performance/refactor/tests of the code.'
4+
title: '[Improvement]'
5+
labels: 'improvement'
6+
---
7+
8+
<!-- Please make sure your issue has not already been fixed. -->
9+
10+
## Type of Improvement
11+
12+
<!-- Please uncomment the type of improvements this issue address -->
13+
14+
<!-- Files and Folders Structure -->
15+
<!-- Performance -->
16+
<!-- Refactoring code -->
17+
<!-- Tests -->
18+
<!-- Not Sure? -->
19+
20+
## Proposal

.github/ISSUE_TEMPLATE/QUESTION.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: '🙋 Question'
3+
about: 'Further information is requested.'
4+
title: '[Question]'
5+
labels: 'question'
6+
---
7+
8+
### Question

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- Please first discuss the change you wish to make via issue before making a change. It might avoid a waste of your time. -->
2+
3+
## What changes this PR introduce?
4+
5+
## List any relevant issue numbers
6+
7+
## Is there anything you'd like reviewers to focus on?

.github/workflows/ci.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: 'ci'
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
lint:
11+
runs-on: 'ubuntu-latest'
12+
steps:
13+
- uses: 'actions/checkout@v2'
14+
15+
- name: 'Use Node.js'
16+
uses: 'actions/[email protected]'
17+
with:
18+
node-version: '16.x'
19+
20+
- name: 'Cache dependencies'
21+
uses: 'actions/[email protected]'
22+
with:
23+
path: '.npm'
24+
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
25+
26+
- name: 'Install'
27+
run: 'npm ci --cache .npm --prefer-offline'
28+
29+
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
30+
- run: 'npm run lint:editorconfig'
31+
- run: 'npm run lint:markdown'
32+
- run: 'npm run lint:typescript'
33+
34+
build:
35+
runs-on: 'ubuntu-latest'
36+
steps:
37+
- uses: 'actions/checkout@v2'
38+
39+
- name: 'Use Node.js'
40+
uses: 'actions/[email protected]'
41+
with:
42+
node-version: '16.x'
43+
44+
- name: 'Cache dependencies'
45+
uses: 'actions/[email protected]'
46+
with:
47+
path: '.npm'
48+
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
49+
50+
- name: 'Install'
51+
run: 'npm ci --cache .npm --prefer-offline'
52+
53+
54+
- name: 'Build'
55+
run: 'npm run build'
56+
57+
test:
58+
runs-on: 'ubuntu-latest'
59+
steps:
60+
- uses: 'actions/checkout@v2'
61+
62+
- name: 'Use Node.js'
63+
uses: 'actions/[email protected]'
64+
with:
65+
node-version: '16.x'
66+
67+
- name: 'Cache dependencies'
68+
uses: 'actions/[email protected]'
69+
with:
70+
path: '.npm'
71+
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
72+
73+
- name: 'Install'
74+
run: 'npm ci --cache .npm --prefer-offline'
75+
76+
77+
- name: 'Test'
78+
run: 'npm run test'
79+
80+
challenges:
81+
runs-on: 'ubuntu-latest'
82+
steps:
83+
- uses: 'actions/checkout@v2'
84+
85+
- name: 'Use Docker'
86+
uses: 'actions-hub/docker/cli@master'
87+
env:
88+
SKIP_LOGIN: true
89+
90+
- name: 'Use Node.js'
91+
uses: 'actions/[email protected]'
92+
with:
93+
node-version: '16.x'
94+
95+
- name: 'Cache dependencies'
96+
uses: 'actions/[email protected]'
97+
with:
98+
path: '.npm'
99+
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
100+
101+
- name: 'Install'
102+
run: 'npm ci --cache .npm --prefer-offline'
103+
104+
- name: 'Build'
105+
run: 'npm run build'
106+
107+
- name: 'Install programming-challenges'
108+
run: 'npm install --global'
109+
110+
- name: 'Test'
111+
run: 'programming-challenges run test --affected'

.gitignore

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
31
# dependencies
42
node_modules
5-
.pnp
6-
.pnp.js
3+
.npm
74

8-
# lockfiles
9-
package-lock.json
10-
yarn.lock
11-
pnpm-lock.yaml
5+
# debug
6+
npm-debug.log*
127

138
# production
149
build
10+
__pycache__
1511

16-
# envs
17-
.env
18-
.env.production
19-
20-
# debug
21-
npm-debug.log*
22-
yarn-debug.log*
23-
yarn-error.log*
12+
# testing
13+
coverage
2414

2515
# editors
2616
.vscode
@@ -29,3 +19,4 @@ yarn-error.log*
2919

3020
# misc
3121
.DS_Store
22+
temp

.gitpod.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
image: 'gitpod/workspace-full'
22

33
tasks:
4-
- init: 'npm install'
4+
- name: 'programming-challenges'
5+
before: 'npm install --global npm@7 && npm clean-install'
6+
init: 'npm run build'
7+
command: 'npm install --global && programming-challenges'
8+
9+
github:
10+
prebuilds:
11+
master: true
12+
branches: true
13+
pullRequests: true
14+
pullRequestsFromForks: true
15+
addComment: true
16+
addBadge: true
17+
addLabel: true

.markdownlint.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD024": false,
5+
"MD033": false,
6+
"MD041": false
7+
}

0 commit comments

Comments
 (0)