Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pubsweet/pubsweet
  • aanand/pubsweet
  • marwahaha/pubsweet
  • audrey/pubsweet
  • giorgiosironi/pubsweet
  • julientremblaymclellan/pubsweet
  • massifr/pubsweet
  • yojeek/pubsweet
  • lucian.barticel/pubsweet
9 results
Show changes
Commits on Source (839)
Showing with 175 additions and 205 deletions
**/node_modules
**/_build
**/node_modules
**/coverage
**/dist
packages/styleguide/styleguide
......@@ -3,6 +3,8 @@ coverage
*.log
coverage/
uploads/
dist/
docs/styleguide
# Created by https://www.gitignore.io/api/osx,linux
### Linux ###
......@@ -28,35 +30,6 @@ uploads/
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# End of https://www.gitignore.io/api/osx,linux
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
......
variables:
IMAGE_ORG: pubsweet
IMAGE_NAME: pubsweet
BASE_DOMAIN: gateway.ps.elifesciences.yld.io
CONFIGURATION_REPOSITORY: https://gitlab.coko.foundation/pubsweet/deployment-config.git
DOCKER_TLS_CERTDIR: "/certs"
stages:
- build
- audit
- test
- review
- staging
- audit
- production
- demo
build:
image: docker:latest
image: docker:19.03.1
services:
- docker:19.03.1-dind
stage: build
except:
- tags
......@@ -25,10 +24,43 @@ build:
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
- echo "Ignore warning! Cannot perform an interactive login from a non TTY device"
- docker push $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
# - echo "Building XSweet job runner image"
# - docker build -t pubsweet/job-xsweet:$CI_COMMIT_SHA components/server/job-xsweet
# - docker push pubsweet/job-xsweet:$CI_COMMIT_SHA
audit:
pages:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: test
stage: production
script:
- cd ${HOME}
- yarn styleguide:build
- cp -R docs/styleguide/ /builds/pubsweet/pubsweet/public/
artifacts:
paths:
- public/
only:
- master # this job will affect only the 'master' branch
pages:review:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: review
script:
- cd ${HOME}
- yarn styleguide:build
- cp -R docs/styleguide/ /builds/pubsweet/pubsweet/review/
artifacts:
paths:
- review/
except:
- master
environment:
name: review/$CI_COMMIT_REF_NAME
url: http://$CI_PROJECT_NAMESPACE.coko.foundation/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/review/index.html
audit:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: audit
allow_failure: true
except:
- tags
variables:
......@@ -36,7 +68,7 @@ audit:
script:
- cd ${HOME}
- yarn audit
lint:style:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: test
......@@ -69,7 +101,7 @@ lint:json:
script:
- cd ${HOME}
- yarn lint:json
lint:commits:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: test
......@@ -101,103 +133,27 @@ test:
# specify host here else it confuses the linked postgres image
- PGHOST=postgres yarn test
# if tests pass we will push latest, labelled with current commit hash
push:latest:
image: docker:latest
stage: staging
script:
- if [ -z "$DOCKERHUB_USERNAME" ] || [ -z "$DOCKERHUB_PASSWORD" ]; then echo "Not pushing" && exit 0; fi
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
- echo "Ignore warning! Cannot perform an interactive login from a non TTY device"
- docker build -t $IMAGE_ORG/$IMAGE_NAME:latest --label COMMIT_SHA=$CI_COMMIT_SHA .
- docker push $IMAGE_ORG/$IMAGE_NAME:latest
only:
- master
except:
- tags
# -----------------------------------------------
# ui --------------------------------------------
# -----------------------------------------------
review:ui:
image: pubsweet/deployer:latest
stage: review
variables:
PACKAGE_NAME: ui
environment:
name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
# !! kube-lego will fail if domain > 63 chars
url: "http://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
on_stop: stop_review:ui
except:
- master
- tags
script:
- source deploy.sh
- create_deployment
stop_review:ui:
image: pubsweet/deployer:latest
stage: review
variables:
PACKAGE_NAME: ui
GIT_STRATEGY: none
environment:
name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
action: stop
when: manual
except:
- master
- tags
script:
- source deploy.sh
- delete_deployment
staging:ui:
image: pubsweet/deployer:latest
stage: staging
variables:
PACKAGE_NAME: ui
environment:
name: $PACKAGE_NAME/staging
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
only:
- master
except:
- tags
script:
- source deploy.sh
- create_deployment
production:ui:
image: pubsweet/deployer:latest
stage: production
variables:
PACKAGE_NAME: ui
environment:
name: $PACKAGE_NAME/production
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
when: manual
only:
- master
except:
- tags
script:
- source deploy.sh
- create_deployment
demo:ui:
image: pubsweet/deployer:latest
stage: demo
variables:
PACKAGE_NAME: ui
environment:
name: $PACKAGE_NAME/demo
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
when: manual
except:
- tags
script:
- source deploy.sh
- create_deployment
# Reenable this once GitLab docker networking is sorted:
# https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1041
# test:job-xsweet:
# image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
# stage: test
# variables:
# # don't clone repo as image already has it
# GIT_STRATEGY: none
# # setup data for postgres image
# POSTGRES_USER: test
# POSTGRES_PASSWORD: pw
# # connection details for tests
# PGUSER: test
# PGPASSWORD: pw
# NODE_ENV: test
# DATABASE_URL: postgres://test:pw@postgres/test
# services:
# - postgres
# - pubsweet/job-xsweet
# except:
# - tags
# script:
# - cd ${HOME}
# - PGHOST=postgres cd components/server/job-xsweet && yarn jest --testRegex test/standaloneXsweetTest.js
**Describe the bug**
...
**Steps To Reproduce**
**Expected behavior**
...
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Device, Operating System and Browser**
[Template for request for comments (RFC) on feature proposals]
# RFC: Feature proposal: [Title]
## Context
[Give the necessary context for your proposal. For example, what problem will this feature solve for users? What are the use cases, benefits, and goals?]
## Proposal
[A precise statement of the proposed feature.]
## Design
[Include sketch or wireframes of the UI changes necessary for this feature]
## Implementation (if applicable)
[A description of the steps to implement the feature.]
## Alternative approaches (if applicable)
[Include any alternatives to meet this use case.]
## Open issues (if applicable)
[Links to and a discussion of related issues, if applicable.]
#### Background
What does this MR do?
#### Any relevant issue
Please use the phrase 'closes' if it will close an issue.
#### How has this been tested?
**Reviewers** ensure that these test requirements are also reviewed.
Please indicate the need for this change to be tested. If not please justify, if so then at what levels.
- [ ] Unit / Integration tests
- [ ] Browser tests
- [ ] E2E tests
#### Documentation updates
- [ ] New features to document
- [ ] Updating existing documentation if needed
{
linters: {"*.{js,jsx}": ["prettier --write", "eslint --fix", "git add"],
"*.{css,scss}": ["prettier --write", "stylelint", "git add"],
"*.{js, jsx}": ["prettier --write", "stylelint", "git add"],
"*.{json,md}": ["prettier --write", "git add"]
},
ignore: ["**/CHANGELOG.md"]
......
package.json
.config/configstore/update-notifier-npm.json
coverage/
**/_build
**/node_modules
**/coverage
packages/ui/styleguide
docs/
{
"extends": ["stylelint-config-pubsweet", "stylelint-config-prettier"]
"processors": ["stylelint-processor-styled-components"],
"extends": ["stylelint-config-recommended", "stylelint-config-styled-components"]
}
......@@ -17,9 +17,10 @@ For contributions made as discussions and suggestions, you can at any time open
## Branches
We maintain master as the production branch and tag it with release names. If you wish to contribute to PubSweet then you need to make a branch and then issue a pull request following this procedure:
create a user account on Coko GitLab : http://gitlab.coko.foundation
Clone master with git clone git@gitlab.coko.foundation:pubsweet/pubsweet.git
Create a new branch and work off that. Please name the branch which sensibly identifies the feature you are working on. You can push the branch to Coko Gitlab at anytime.
1. Create a user account on Coko GitLab : http://gitlab.coko.foundation
2. Clone master with git clone git@gitlab.coko.foundation:pubsweet/pubsweet.git
3. Create a new branch and work off that. Please name the branch which sensibly identifies the feature you are working on. You can push the branch to Coko Gitlab at anytime.
## Getting your contributions merged
......
FROM pubsweet/pubsweet:base
FROM node:12
COPY package.json yarn.lock ./
COPY lerna.json .eslintignore .eslintrc .prettierrc .prettierignore .stylelintignore .stylelintrc commitlint.config.js ./
COPY packages packages
ENV HOME "/home/pubsweet"
RUN mkdir -p ${HOME}
WORKDIR ${HOME}
RUN [ "yarn", "config", "set", "workspaces-experimental", "true" ]
COPY . .
# We do a development install because react-styleguidist is a dev dependency
RUN [ "yarn", "config", "set", "workspaces-experimental", "true" ]
RUN [ "yarn", "install", "--frozen-lockfile" ]
# Remove cache and offline mirror
RUN [ "yarn", "cache", "clean"]
RUN [ "rm", "-rf", "/npm-packages-offline-cache"]
RUN [ "yarn", "cache", "clean" ]
RUN [ "rm", "-rf", "/npm-packages-offline-cache" ]
RUN [ "yarn", "build" ]
ENV NODE_ENV "production"
WORKDIR ${HOME}/packages/styleguide
RUN [ "npm", "run", "styleguide:build" ]
# Create file for kubernetes health checks
RUN touch ./styleguide/health
EXPOSE 3000
WORKDIR ${HOME}
CMD []
PubSweet consists of many software packages maintained by its community. Contributions are welcome from anyone, and discussed with the community as a whole before being accepted.
Additionally, there is a group of people, that can accept merge requests and do releases of PubSweet - we call them... :drum: :drum:... :rocket: **"THE MAINTAINERS"** :rocket:
Here they are in alphabetical order:
- Andrei Cioromila @andrei.cioromila (Thinslices/Hindawi)
- Audrey Hamelers @audrey (EBI)
- Yannis Barlas @yannis (Coko)
<div width="100%" align="center">
<img src="https://gitlab.coko.foundation/pubsweet/pubsweet/raw/master/assets/rgb-medium.jpg" width="300" />
<h2>The open toolkit for building publishing workflows</h2>
<img src="https://gitlab.coko.foundation/pubsweet/pubsweet/raw/master/assets/logo-pubsweet.png" width="300" />
<h2>PubSweet: The open toolkit for building publishing workflows</h2>
</div>
| [![MIT license](https://img.shields.io/badge/license-MIT-e51879.svg)](https://gitlab.coko.foundation/pubsweet/pubsweet/raw/master/LICENSE) [![mattermost](https://img.shields.io/badge/mattermost_chat-coko%2Fpubsweet-blue.svg)](https://mattermost.coko.foundation/coko/channels/pubsweet) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
# Contents
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:0 orderedList:0 -->
* [Overview](#overview)
* [PubSweet packages](#pubsweet-packages)
* [Wiki](#wiki)
* [Support](#support)
* [Credits](#credits)
<!-- /TOC -->
# Overview
**PubSweet** allows you to build state-of-the-art publishing platforms.
It's a modular and flexible framework consisting of a **server** and **client** that work together, **components** that can modify or extend the functionality of the server and/or client, and a **command-line tool** that helps manage PubSweet apps.
## PubSweet packages (managed with Lerna)
| package | description |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------- |
| [![pubsweet-server](https://img.shields.io/badge/PubSweet-server-51c1bc.svg?style=flat&colorA=84509d) pubsweet-server](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/server) | an extensible RESTful and GraphQL API that runs on the server |
| [![pubsweet-client](https://img.shields.io/badge/PubSweet-client-51c1bc.svg?style=flat&colorA=84509d) pubsweet-client](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/client) | an extensible frontend React app that runs in the browser |
| [![pubsweet-components](https://img.shields.io/badge/PubSweet-components-51c1bc.svg?style=flat&colorA=84509d) pubsweet-components](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/components) | components for server and/or client |
| [![pubsweet-cli](https://img.shields.io/badge/PubSweet-CLI-51c1bc.svg?style=flat&colorA=84509d) pubsweet cli](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/cli) | a suite of command-line tools for building and managing your platform |
| [@pubsweet/logger](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/logger) | logging utility |
| [@pubsweet/db-manager](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/db-manager) | utility for managing PubSweet databases |
# Wiki
The [PubSweet Wiki](https://gitlab.coko.foundation/pubsweet/pubsweet/wikis/home) contains all of the documentation for the PubSweet framework.
The wiki answers most of the common questions around:
* Setting up your local environment
* Documentation of PubSweet components
* Using PubSweet components
* The PubSweet data model
* Technical terms
* Contributing
# Documentation
Additionally, we've collaboratively written (using Editoria, a PubSweet-based app), [a book about PubSweet](https://coko.foundation/books/).
The [PubSweet website](http://pubsweet.coko.foundation) contains all of the documentation for the PubSweet framework. Please submit an issue or MR if you find a piece of information is missing!
# Support
* **If you have a general query about PubSweet**, or want to discuss anything with us, come and [chat to us in our Mattermost channel](https://mattermost.coko.foundation/coko/channels/pubsweet).
- **If you have a general query about PubSweet**, or want to discuss anything with us, come and [chat to us in our Mattermost channel](https://mattermost.coko.foundation/coko/channels/pubsweet).
* **Bug reports and feature requests** belong in the issues of this monorepo.
- **Bug reports and feature requests** belong in the issues of this monorepo.
# Projects using PubSweet
* [Editoria](https://gitlab.coko.foundation/editoria/editoria) - a book production platform built for University of California Press
* [Xpub](https://gitlab.coko.foundation/xpub/xpub) - Collabra, a journal publishing platform
* [elife-xpub](https://github.com/elifesciences/elife-xpub/) - A journal publishing platform in collaboration with eLife
* [Faraday](https://gitlab.coko.foundation/xpub/xpub-faraday) - A journal publishing platform in collaboration with Hindawi
* [Micropubs](https://gitlab.coko.foundation/micropubs/wormbase) - A micropublications platform in collaboration with Wormbase
- [Editoria](https://gitlab.coko.foundation/editoria/editoria) - a book production platform built for University of California Press
- [elife-xpub](https://github.com/elifesciences/elife-xpub/) - A journal publishing platform in collaboration with eLife
- [xpub-review](https://gitlab.com/hindawi/xpub/xpub-review) - A journal publishing platform in collaboration with Hindawi
- [Micropubs](https://gitlab.coko.foundation/micropubs/wormbase) - A micropublications platform in collaboration with Wormbase
- [Xpub](https://gitlab.coko.foundation/xpub/xpub) - Collabra, a journal publishing platform
# Credits
PubSweet is part of the [Collaborative Knowledge Foundation](https://coko.foundation) family.
<a href="https://coko.foundation"><img src="https://gitlab.coko.foundation/pubsweet/pubsweet/raw/master/assets/COKO_logo.jpg" width="300" /></a>
<a href="https://coko.foundation"><img src="https://gitlab.coko.foundation/pubsweet/pubsweet/raw/master/assets/COKO_logo.png" width="300" /></a>
assets/COKO_logo.jpg

95.8 KiB

assets/COKO_logo.png

122 KiB

assets/logo-pubsweet.png

28.1 KiB

assets/rgb-icon-small.jpg

18.8 KiB

assets/rgb-medium.jpg

30.7 KiB