Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into canadianpress-auto…
Browse files Browse the repository at this point in the history
…-tagger
  • Loading branch information
petrjasek committed Feb 26, 2024
2 parents c3164ed + 8839733 commit 4ac7dd6
Show file tree
Hide file tree
Showing 53 changed files with 15,883 additions and 1,301 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "client" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "server"
schedule:
interval: "weekly"

14 changes: 8 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
working-directory: server

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'

Expand All @@ -34,7 +34,9 @@ jobs:

- run: mypy .

- run: nosetests tests
- run: black --check .

- run: pytest tests

- run: python manage.py app:initialize_data

Expand All @@ -48,12 +50,12 @@ jobs:
working-directory: client

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14.x'

- run: npm install --no-audit
- run: npm ci

- run: npm run build
3 changes: 1 addition & 2 deletions client/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
package-lock=false

package-lock=true
441 changes: 220 additions & 221 deletions client/extensions/auto-tagger/src/auto-tagging.tsx

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions client/extensions/upload-iptc/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ const extension: IExtension = {
activate: (superdesk: ISuperdesk) => {
const result: IExtensionActivationResult = {
contributions: {
iptcMapping: (data, item: IArticle) => {
const categories = superdesk.entities.vocabulary.getVocabulary(PHOTO_CAT_ID).items;
const supp_categories = superdesk.entities.vocabulary.getVocabulary(PHOTO_SUPPCAT_ID).items;

iptcMapping: (data, item: IArticle) => Promise.all([
superdesk.entities.vocabulary.getVocabulary(PHOTO_CAT_ID),
superdesk.entities.vocabulary.getVocabulary(PHOTO_SUPPCAT_ID),
]).then(([categories, supp_categories]: [Array<ISubject>, Array<ISubject>]) => {
Object.assign(item, {
slugline: toString(data.ObjectName),
byline: toString(data['By-line']),
Expand Down Expand Up @@ -106,8 +106,8 @@ const extension: IExtension = {

console.debug('iptc', data, item);

return Promise.resolve(item);
},
return item;
}),
},
};

Expand Down
Loading

0 comments on commit 4ac7dd6

Please sign in to comment.