diff --git a/.github/workflows/deploy-tag.yml b/.github/workflows/deploy-tag.yml index 066f1193b..73292f247 100644 --- a/.github/workflows/deploy-tag.yml +++ b/.github/workflows/deploy-tag.yml @@ -26,7 +26,7 @@ jobs: ref: ${{ format('v{0}', inputs.release-version) }} - name: Set up Python 3.10 (w/ cache) - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' cache: 'pip' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2c4b5b51d..2e32eb08b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 (w/ cache) - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' cache: 'pip' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2302a3e89..47c0fd17a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -56,9 +56,9 @@ jobs: node-version: "18" cache: ${{ steps.detect-package-manager.outputs.manager }} - name: Setup Pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v5 - name: Restore cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ./docs/.eleventy/cache @@ -74,7 +74,7 @@ jobs: run: ${{ steps.detect-package-manager.outputs.manager }} run build working-directory: ./docs - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: ./docs/_site @@ -88,4 +88,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 4cd5877a3..aa6008866 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -35,6 +35,24 @@ jobs: working-directory: ${{ matrix.app }} run: npm clean-install-test --no-audit --no-fund + - name: Coveralls + uses: coverallsapp/github-action@v2 + with: + base-path: ${{ matrix.app }} + parallel: true + flag-name: run-${{ join(matrix.*, ' - ') }} + - name: Build (if necessary) working-directory: ${{ matrix.app }} run: npm run build --if-present + + finish: + needs: build + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v2 + with: + parallel-finished: true + carryforward: "run-front,run-graphql,run-export" diff --git a/.gitignore b/.gitignore index cc769c6d1..7cb56df9f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ sails/.tmp nodemon.dev.json /.idea/ /.run/ + +coverage/ diff --git a/JOURNAL.md b/JOURNAL.md index f2d7adaf6..6f8e9b485 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -1,5 +1,20 @@ # Journal de développement +## Lundi 30 septembre 2024 + +### Ce que j'ai aimé/appris + +- reprendre l'écriture de ce journal 😄 +- remettre les mains dans le code en retrouvant Roch et Nicolas à Paris 8 +- supprimer du code en redirigeant une fonctionnalité vers le module `stylo-export` +- supprimer la dépendance au _submodule_ git +- l'équilibre papote / code + +### Ce que j'ai trouvé difficile + +- revenir dans un contexte qui a bougé pendant un an, ne pas être au fait des tenants et aboutissants de certaines réflexions (métadonnées) +- constater qu'un bug empêche l'affichage des articles en local pour des raisons qui m'échappent encore (sentiment de fragilité applicative) + ## Mercredi 9 mars 2022 ### Ce que j'ai aimé/appris diff --git a/README.md b/README.md index 5f0d471fd..1378dc9d8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Stylo +# Stylo [![Coverage Status](https://coveralls.io/repos/github/EcrituresNumeriques/stylo/badge.svg?branch=master)](https://coveralls.io/github/EcrituresNumeriques/stylo?branch=master) [![tests](https://github.com/EcrituresNumeriques/stylo/actions/workflows/node.yml/badge.svg)](https://github.com/EcrituresNumeriques/stylo/actions/workflows/node.yml) Stylo est un éditeur de textes pour articles scientifiques en sciences humaines et sociales. @@ -87,3 +87,8 @@ Pour installer une instance Stylo en tant que service à disposition d'utilisate --- [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FEcrituresNumeriques%2Fstylo.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FEcrituresNumeriques%2Fstylo?ref=badge_shield) + + +## License +[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FEcrituresNumeriques%2Fstylo.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FEcrituresNumeriques%2Fstylo?ref=badge_large) diff --git a/docs/src/en/firststeps.md b/docs/src/en/firststeps.md index 01a599d94..3719b2cda 100644 --- a/docs/src/en/firststeps.md +++ b/docs/src/en/firststeps.md @@ -199,7 +199,7 @@ The bibliography lists the bibliographic references that you have added. The bib You can directly [structure your references in BibTex](/en/bibtexsyntax/), or export your references in BibTex with your bibliography management tool: -- See tutorials : Zotero Mendeley +- See tutorials : Zotero Mendeley To add a reference to the article, you just need to click on the reference, then paste (Ctrl+V) the reference in the desired place of the text. This way, a click is the same as "copying" the reference key to the clipboard. Then, you just need to paste it into the body text. diff --git a/docs/src/fr/bibliographie.md b/docs/src/fr/bibliographie.md index 069d38fd0..57cfdb7d0 100644 --- a/docs/src/fr/bibliographie.md +++ b/docs/src/fr/bibliographie.md @@ -19,7 +19,7 @@ La bibliographie liste les références bibliographiques que vous avez ajoutées Vous pouvez directement [structurer vos références en BibTeX](http://www.andy-roberts.net/writing/latex/bibliographies) ou exporter vos références en BibTeX grâce à votre outil de gestion de bibliographie : -- voir tutoriels : Zotero Mendeley +- voir tutoriels : Zotero Mendeley ## Synchroniser une collection Zotero diff --git a/export/package.json b/export/package.json index c6c8b4f2d..77a14f4ec 100644 --- a/export/package.json +++ b/export/package.json @@ -9,7 +9,7 @@ "npm": ">=8" }, "scripts": { - "test": "jest", + "test": "jest --collectCoverage --coverageReporters html --coverageReporters text-summary --coverageReporters lcovonly --detectOpenHandles", "start": "node src/app.js", "dev": "npx dotenv -e ../stylo.env npm run start", "prod": "NODE_ENV=production node --heapsnapshot-signal=SIGUSR2 src/app.js" diff --git a/export/src/export.test.js b/export/src/export.test.js index 7807749f5..a1edfb1eb 100644 --- a/export/src/export.test.js +++ b/export/src/export.test.js @@ -51,13 +51,13 @@ test('should create a book export context', () => { article: { title: 'Chapter 2: The Pool of Tears', versions: [ - { - bib: 'Bibliography of chapter 2, first version', - md: 'Content of chapter 2, first version', - }, { bib: 'Bibliography of chapter 2, second version', md: 'Content of chapter 2, second version', + }, + { + bib: 'Bibliography of chapter 2, first version', + md: 'Content of chapter 2, first version', } ], workingVersion: { diff --git a/front/.eslintrc.cjs b/front/.eslintrc.cjs index 416a4ca8d..6a492cd96 100644 --- a/front/.eslintrc.cjs +++ b/front/.eslintrc.cjs @@ -3,7 +3,6 @@ module.exports = { env: { browser: true, es2021: true, - 'jest/globals': true, }, extends: [ 'eslint:recommended', @@ -23,7 +22,7 @@ module.exports = { parser: "jsonc-eslint-parser", }, ], - plugins: ['react', 'jest'], + plugins: ['react', 'vitest'], settings: { react: { version: '16.13', diff --git a/front/dockerfile b/front/dockerfile index 91b24779f..ab9cda509 100644 --- a/front/dockerfile +++ b/front/dockerfile @@ -16,12 +16,14 @@ COPY ./ /modules/ RUN set -ex \ && apk update \ && apk add linux-headers openssl-dev pcre-dev zlib-dev openssl abuild \ - musl-dev libxslt libxml2-utils make mercurial gcc unzip git \ + musl-dev libxslt libxml2-utils make gcc unzip git \ xz g++ \ # allow abuild as a root user \ && printf "#!/bin/sh\\n/usr/bin/abuild -F \"\$@\"\\n" > /usr/local/bin/abuild \ && chmod +x /usr/local/bin/abuild \ - && hg clone -r ${NGINX_VERSION}-${PKG_RELEASE} https://hg.nginx.org/pkg-oss/ \ + && curl -f -sSLO https://github.com/nginx/pkg-oss/archive/${NGINX_VERSION}-${PKG_RELEASE}.tar.gz \ + && mkdir pkg-oss \ + && tar xzvf ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz -C pkg-oss --strip-components 1 \ && cd pkg-oss \ && mkdir /tmp/packages \ && for module in "$ENABLED_MODULES"; do \ diff --git a/front/index.html b/front/index.html index 637c2d0f7..02e3fccd8 100644 --- a/front/index.html +++ b/front/index.html @@ -3,7 +3,6 @@ - @@ -19,7 +18,6 @@ - {{#if SNOWPACK_MATOMO}}