Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/6.5.3 #1267

Merged
merged 8 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Expand All @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at developers@coda.co. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@networkcanvas.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
9 changes: 4 additions & 5 deletions build-resources/scripts/afterSignHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ const path = require('path');
const electronNotarize = require('@electron/notarize');

async function note(params) {
// Only notarize the app on Mac OS only.
// Only notarize the app on macOS.
if (process.platform !== 'darwin') {
return;
}
console.log('afterSign hook triggered', params);

const appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`);
if (!fs.existsSync(appPath)) {
Expand All @@ -23,9 +22,9 @@ async function note(params) {
tool: 'notarytool',
appBundleId: 'org.codaco.NetworkCanvasInterviewer6',
appPath,
appleApiKey: '~/.private_keys/AuthKey_J58L47W6H9.p8',
appleApiKeyId: 'J58L47W6H9', // This is taken from the filename of the .p8 file in your icloud drive
appleApiIssuer: '69a6de92-60bf-47e3-e053-5b8c7c11a4d1',
appleApiKey: '~/.private_keys/AuthKey_A78M67RCH9.p8',
appleApiKeyId: 'A78M67RCH9', // Taken from https://appstoreconnect.apple.com/access/integrations/api
appleApiIssuer: '69a6de92-60bf-47e3-e053-5b8c7c11a4d1',// As above
});

console.log('Done notarizing');
Expand Down
4 changes: 2 additions & 2 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget android-versionCode="6415" id="org.codaco.NetworkCanvasInterviewer6" ios-CFBundleIdentifier="org.codaco.networkCanvasInterviewerBusiness" ios-CFBundleVersion="6415" version="6.5.2"
<widget android-versionCode="6415" id="org.codaco.NetworkCanvasInterviewer6" ios-CFBundleIdentifier="org.codaco.networkCanvasInterviewerBusiness" ios-CFBundleVersion="6415" version="6.5.3"
xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Network Canvas Interviewer</name>
<description>
A tool for conducting Network Canvas Interviews.
</description>
<author email="developers@coda.co" href="http://coda.co">
<author email="hello@complexdatacollective.org" href="http://complexdatacollective.org">
Complex Data Collective
</author>
<content src="index.html"/>
Expand Down
48 changes: 21 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "network-canvas-interviewer",
"version": "6.5.2",
"version": "6.5.3",
"productName": "Network Canvas Interviewer",
"description": "A tool for conducting Network Canvas Interviews.",
"author": "Complex Data Collective",
Expand Down Expand Up @@ -56,7 +56,7 @@
"@codaco/eslint-plugin-spellcheck": "0.0.14",
"@codaco/shared-consts": "~0.0.1-alpha.3",
"@codaco/ui": "~5.8.5",
"@electron/notarize": "~1.2.3",
"@electron/notarize": "~2.3.0",
"@faker-js/faker": "~6.0.0-alpha.5",
"@zippytech/sorty": "^2.0.0",
"ajv": "^6.5.4",
Expand Down
2 changes: 1 addition & 1 deletion public/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "network-canvas-interviewer",
"version": "6.5.2",
"version": "6.5.3",
"productName": "Network Canvas Interviewer",
"description": "A tool for conducting Network Canvas Interviews.",
"author": "Complex Data Collective",
Expand Down
113 changes: 112 additions & 1 deletion src/utils/__tests__/createSorter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,117 @@ describe('Types', () => {
});
});

describe('Categorical sorting', () => {
it('sorts items based on categorical values', () => {
const mockItems = [
{
category: ['cow'],
name: 'alice',
},
{
category: ['duck'],
name: 'bob',
},
{
category: ['lizard'],
name: 'charlie',
},
{
category: ['cow'],
name: 'david',
},
];

const sorter = createSorter([
{
property: 'category',
type: 'categorical',
hierarchy: ['duck', 'lizard', 'cow'],
},
{
property: 'name',
type: 'string',
direction: 'asc',
},
]);

const result = sorter(mockItems).map((item) => item.name);
expect(result).toEqual(['alice', 'david', 'charlie', 'bob']);
});

it('handles items with multiple categories', () => {
const mockItems = [
{
category: ['duck', 'lizard'],
name: 'alice',
},
{
category: ['cow', 'duck'],
name: 'bob',
},
{
category: ['cow'],
name: 'charlie',
},
{
category: ['lizard'],
name: 'david',
},
];

const sorter = createSorter([
{
property: 'category',
type: 'categorical',
hierarchy: ['cow', 'duck', 'lizard'],
},
{
property: 'name',
type: 'string',
direction: 'asc',
},
]);

const result = sorter(mockItems).map((item) => item.name);
expect(result).toEqual(['david', 'alice', 'bob', 'charlie']);
});

it('handles missing categories', () => {
const mockItems = [
{
name: 'alice',
},
{
category: ['duck'],
name: 'bob',
},
{
category: ['lizard'],
name: 'charlie',
},
{
name: 'david',
},
];

const sorter = createSorter([
{
property: 'category',
type: 'categorical',
hierarchy: ['lizard', 'duck', 'cow'],
},
{
property: 'name',
type: 'string',
direction: 'asc',
},
]);

const result = sorter(mockItems).map((item) => item.name);
expect(result).toEqual(['bob', 'charlie', 'alice', 'david']);
});
});

describe('Order direction', () => {
it('orders ascending with "asc"', () => {
const mockItems = [
Expand Down Expand Up @@ -994,7 +1105,7 @@ describe('processProtocolSortRule', () => {
property: 'category',
direction: 'asc',
};
expect(processProtocolSortRule(codebookVariables)(rule).type).toEqual('string');
expect(processProtocolSortRule(codebookVariables)(rule).type).toEqual('categorical');
});

it('ordinal', () => {
Expand Down