Skip to content

Commit aa89edf

Browse files
committed
Merge branch 'develop'
2 parents e2c5d96 + 2960f68 commit aa89edf

File tree

116 files changed

+1953
-594
lines changed

Some content is hidden

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

116 files changed

+1953
-594
lines changed

.circleci/config.yml

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
version: 2.1
2+
orbs:
3+
codecov: codecov/codecov@5
24
jobs:
3-
test-ruby27:
5+
test-ruby31:
46
docker:
5-
- image: cimg/ruby:2.7-node
7+
- image: cimg/ruby:3.1-node
68
- image: cimg/mysql:8.0
7-
command: [--default-authentication-plugin=mysql_native_password]
9+
command: [ --default-authentication-plugin=mysql_native_password ]
810
environment:
911
MYSQL_ROOT_HOST: '%'
1012
MYSQL_ROOT_PASSWORD: 'root'
@@ -22,8 +24,8 @@ jobs:
2224
- checkout
2325
- restore_cache:
2426
keys:
25-
- qpixel-ruby27-{{ checksum "Gemfile.lock" }}
26-
- qpixel-ruby27-
27+
- qpixel-ruby31-{{ checksum "Gemfile.lock" }}
28+
- qpixel-ruby31-
2729
- run:
2830
name: Install Bundler & gems
2931
command: |
@@ -34,7 +36,7 @@ jobs:
3436
command: |
3537
bundle clean --force
3638
- save_cache:
37-
key: qpixel-ruby27-{{ checksum "Gemfile.lock" }}
39+
key: qpixel-ruby31-{{ checksum "Gemfile.lock" }}
3840
paths:
3941
- ~/gems
4042
- run:
@@ -56,21 +58,19 @@ jobs:
5658
name: Current revision
5759
command: |
5860
git rev-parse $(git rev-parse --abbrev-ref HEAD)
59-
- run:
60-
name: Coveralls token
61-
command: |
62-
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo "Skipping coveralls"; else echo "repo_token: $COVERALLS_REPO_TOKEN" > .coveralls.yml; fi
6361
- run:
6462
name: Test
63+
environment:
64+
RAILS_ENV: test
6565
command: |
6666
bundle exec rails test
6767
- store_test_results:
6868
path: "~/qpixel/test/reports"
69-
system-test-ruby27:
69+
system-test-ruby31:
7070
docker:
71-
- image: cimg/ruby:2.7-browsers
71+
- image: cimg/ruby:3.1-browsers
7272
- image: cimg/mysql:8.0
73-
command: [--default-authentication-plugin=mysql_native_password]
73+
command: [ --default-authentication-plugin=mysql_native_password ]
7474
environment:
7575
MYSQL_ROOT_HOST: '%'
7676
MYSQL_ROOT_PASSWORD: 'root'
@@ -88,8 +88,8 @@ jobs:
8888
- checkout
8989
- restore_cache:
9090
keys:
91-
- qpixel-ruby27-{{ checksum "Gemfile.lock" }}
92-
- qpixel-ruby27-
91+
- qpixel-ruby31-{{ checksum "Gemfile.lock" }}
92+
- qpixel-ruby31-
9393
- run:
9494
name: Install Bundler & gems
9595
command: |
@@ -100,7 +100,7 @@ jobs:
100100
command: |
101101
bundle clean --force
102102
- save_cache:
103-
key: qpixel-ruby27-{{ checksum "Gemfile.lock" }}
103+
key: qpixel-ruby31-{{ checksum "Gemfile.lock" }}
104104
paths:
105105
- ~/gems
106106
- run:
@@ -124,6 +124,8 @@ jobs:
124124
git rev-parse $(git rev-parse --abbrev-ref HEAD)
125125
- run:
126126
name: Test
127+
environment:
128+
RAILS_ENV: test
127129
command: |
128130
bundle exec rails test:system
129131
- store_test_results:
@@ -132,9 +134,9 @@ jobs:
132134
path: "~/qpixel/tmp/screenshots"
133135
when: on_fail
134136

135-
test-ruby31:
137+
test-ruby32:
136138
docker:
137-
- image: cimg/ruby:3.1-node
139+
- image: cimg/ruby:3.2-node
138140
- image: cimg/mysql:8.0
139141
command: [ --default-authentication-plugin=mysql_native_password ]
140142
environment:
@@ -154,8 +156,8 @@ jobs:
154156
- checkout
155157
- restore_cache:
156158
keys:
157-
- qpixel-ruby31-{{ checksum "Gemfile.lock" }}
158-
- qpixel-ruby31-
159+
- qpixel-ruby32-{{ checksum "Gemfile.lock" }}
160+
- qpixel-ruby32-
159161
- run:
160162
name: Install Bundler & gems
161163
command: |
@@ -166,7 +168,7 @@ jobs:
166168
command: |
167169
bundle clean --force
168170
- save_cache:
169-
key: qpixel-ruby31-{{ checksum "Gemfile.lock" }}
171+
key: qpixel-ruby32-{{ checksum "Gemfile.lock" }}
170172
paths:
171173
- ~/gems
172174
- run:
@@ -188,19 +190,18 @@ jobs:
188190
name: Current revision
189191
command: |
190192
git rev-parse $(git rev-parse --abbrev-ref HEAD)
191-
- run:
192-
name: Coveralls token
193-
command: |
194-
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo "Skipping coveralls"; else echo "repo_token: $COVERALLS_REPO_TOKEN" > .coveralls.yml; fi
195193
- run:
196194
name: Test
195+
environment:
196+
RAILS_ENV: test
197197
command: |
198198
bundle exec rails test
199199
- store_test_results:
200200
path: "~/qpixel/test/reports"
201-
system-test-ruby31:
201+
- codecov/upload
202+
system-test-ruby32:
202203
docker:
203-
- image: cimg/ruby:3.1-browsers
204+
- image: cimg/ruby:3.2-browsers
204205
- image: cimg/mysql:8.0
205206
command: [ --default-authentication-plugin=mysql_native_password ]
206207
environment:
@@ -220,8 +221,8 @@ jobs:
220221
- checkout
221222
- restore_cache:
222223
keys:
223-
- qpixel-ruby31-{{ checksum "Gemfile.lock" }}
224-
- qpixel-ruby31-
224+
- qpixel-ruby32-{{ checksum "Gemfile.lock" }}
225+
- qpixel-ruby32-
225226
- run:
226227
name: Install Bundler & gems
227228
command: |
@@ -232,7 +233,7 @@ jobs:
232233
command: |
233234
bundle clean --force
234235
- save_cache:
235-
key: qpixel-ruby31-{{ checksum "Gemfile.lock" }}
236+
key: qpixel-ruby32-{{ checksum "Gemfile.lock" }}
236237
paths:
237238
- ~/gems
238239
- run:
@@ -256,6 +257,8 @@ jobs:
256257
git rev-parse $(git rev-parse --abbrev-ref HEAD)
257258
- run:
258259
name: Test
260+
environment:
261+
RAILS_ENV: test
259262
command: |
260263
bundle exec rails test:system
261264
- store_test_results:
@@ -266,7 +269,7 @@ jobs:
266269

267270
rubocop:
268271
docker:
269-
- image: cimg/ruby:3.1-node
272+
- image: cimg/ruby:3.2-node
270273

271274
working_directory: ~/qpixel
272275

@@ -279,8 +282,8 @@ jobs:
279282
- checkout
280283
- restore_cache:
281284
keys:
282-
- qpixel-ruby31-{{ checksum "Gemfile.lock" }}
283-
- qpixel-ruby31-
285+
- qpixel-ruby32-{{ checksum "Gemfile.lock" }}
286+
- qpixel-ruby32-
284287
- run:
285288
name: Install Bundler & gems
286289
command: |
@@ -291,7 +294,7 @@ jobs:
291294
command: |
292295
bundle clean --force
293296
- save_cache:
294-
key: qpixel-ruby31-{{ checksum "Gemfile.lock" }}
297+
key: qpixel-ruby32-{{ checksum "Gemfile.lock" }}
295298
paths:
296299
- ~/gems
297300
- run:
@@ -301,7 +304,7 @@ jobs:
301304
302305
deploy:
303306
docker:
304-
- image: cimg/ruby:3.1-node
307+
- image: cimg/ruby:3.2-node
305308

306309
working_directory: ~/qpixel
307310

@@ -319,17 +322,15 @@ jobs:
319322
workflows:
320323
test_lint:
321324
jobs:
322-
- test-ruby27
323325
- test-ruby31
324-
- system-test-ruby27
325326
- system-test-ruby31
327+
- test-ruby32
328+
- system-test-ruby32
326329
- rubocop
327330
- deploy:
328331
requires:
329-
- test-ruby27
330-
- test-ruby31
331-
- system-test-ruby27
332-
- system-test-ruby31
332+
- test-ruby32
333+
- system-test-ruby32
333334
- rubocop
334335
filters:
335336
branches:

.github/.codecov.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
codecov:
2+
require_ci_to_pass: false
3+
notify:
4+
wait_for_ci: false
5+
coverage:
6+
status:
7+
project:
8+
default:
9+
target: auto
10+
threshold: 1%
11+
base: auto
12+
patch:
13+
default:
14+
target: auto
15+
threshold: 10%
16+
base: auto
17+
comment:
18+
layout: "condensed_header, condensed_files, components, condensed_footer"
19+
hide_project_coverage: false
20+
component_management:
21+
individual_components:
22+
- component_id: module_controllers
23+
name: controllers
24+
paths:
25+
- app/controllers/**
26+
- component_id: module_helpers
27+
name: helpers
28+
paths:
29+
- app/helpers/**
30+
- component_id: module_jobs
31+
name: jobs
32+
paths:
33+
- app/jobs/**
34+
- component_id: module_models
35+
name: models
36+
paths:
37+
- app/models/**

.github/workflows/mirror.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Mirror to Codeberg
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
mirror:
10+
name: Mirror
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Mirror
20+
uses: yesolutions/mirror-action@master
21+
with:
22+
REMOTE: 'git@codeberg.org:codidact/qpixel'
23+
GIT_SSH_PRIVATE_KEY: ${{ secrets.GIT_SSH_PRIVATE_KEY }}
24+
GIT_SSH_NO_VERIFY_HOST: "true"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,8 @@ dump.rdb
6363
# Ignore IRB files
6464
.irbrc
6565
.irb_history
66+
67+
node_modules
68+
69+
# YARD data
70+
.yardoc

CONTRIBUTING.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
Contributing to QPixel follows broadly the same process as any other Codidact project.
33

44
## What needs doing?
5-
- We have a [roadmap](https://github.com/codidact/qpixel/projects/3) which lists tasks that we deem to be relatively
6-
urgent. This roadmap has different phases and each links to issues that should be worked on during a phase.
5+
- We have a [roadmap](https://github.com/orgs/codidact/projects/6) which lists broad priorities and contains issues
6+
which fall into each priority. Issue labels provide more information about what area, language, and difficulty each
7+
issue involves.
78
- Most bugs and change requests are [here on GitHub](https://github.com/codidact/qpixel/issues). Have a look at all
89
open issues (additionally to the roadmap) to find something that needs doing.
910
- Additional information may be found in the [feature request](https://meta.codidact.com/categories/3/tags/961) and
10-
[bug](https://meta.codidact.com/categories/3/tags/394) tags of Codidact.Meta
11+
[bug](https://meta.codidact.com/categories/3/tags/394) tags of Codidact Meta
1112

1213
Once you've picked what you're going to work on, please **leave a comment** on the issue to indicate you're planning
1314
to work on it; this helps us reduce wasted effort. If there's not already an issue for the feature you want to work
@@ -24,18 +25,32 @@ issue and give it to someone else.
2425
- Once you've made your changes, submit a pull request targeting the `develop` branch.
2526

2627
Keep in mind that **status checks are required to pass** and **at least one approving review** is required from the
27-
team before any pull request can be merged. If status checks don't pass, we won't be able to merge - there are no
28-
exceptions, so please fix the failures and commit again. You can always mark your pull request as a draft while
29-
you're still trying to make it work.
28+
team before any pull request can be merged. If status checks don't pass, we won't be able to merge. You can always mark
29+
your pull request as a draft while you're still trying to make it work.
3030

31-
## What standards are there?
32-
We have a [code style and standards document](CODE-STANDARDS.md) with information for each applicable language.
33-
Please make sure you follow these if possible; if there's a good reason why not, please document it in your code,
34-
add a linter exception, and let us know why in your pull request.
31+
## What guidelines are there?
32+
When developing, please bear the following in mind:
3533

36-
## Be nice; be respectful when contributing
37-
Always be constructive, especially when giving feedback. Always presume that others are acting with good intent.
34+
* **Avoid jQuery**. We are moving the project away from jQuery; some critical dependencies remain
35+
which mean we haven't yet been able to remove it, but new code should use vanilla JS wherever practical.
36+
* **Follow existing styles**. Your code should be in line with the code style used throughout the project. Rubocop is
37+
provided for Ruby code and your code should pass it. There is no linter for JS but style will be manually checked when
38+
your pull request is reviewed.
39+
* **Test your code**. You should both test manually by trying any new/changed/updated functionality, and include
40+
automated tests with your PR. All tests must pass before your PR can be accepted. There is an automated status check
41+
for pull requests which will fail if your code is not sufficiently covered by tests.
42+
* **Develop for accessibility**. Particularly when changing front-end code, develop with accessibility as a primary
43+
concern. Content should adhere to WCAG wherever possible. This extends to your code as well - write code that is
44+
accessible and clear for developers who come after you, including comments where necessary.
3845

46+
Detailed style guidance for each language is available [here](CODE-STANDARDS.md).
3947

48+
Developer documentation for the QPixel internal API is available [here](https://docs.dev.codidact.org/).
4049

50+
If you're in doubt about how to approach or design something, leave a comment on the issue so that we can discuss your
51+
proposed changes - we'd rather have a discussion first than have to reject hard work you've already done.
4152

53+
## Be nice; be respectful
54+
Always be constructive, especially when giving feedback. Always presume that others are acting with good intent.
55+
Contributors and contributions must abide by the
56+
[Codidact Code of Conduct](https://github.com/codidact/qpixel?tab=coc-ov-file#readme).

0 commit comments

Comments
 (0)