Skip to content

Commit

Permalink
Merge pull request #12 from AMPATH/chore/misc-fixes
Browse files Browse the repository at this point in the history
(chore) Miscellaneous fixes
  • Loading branch information
Rugute authored Feb 28, 2024
2 parents f10a29c + bf039b4 commit e3590fd
Show file tree
Hide file tree
Showing 7 changed files with 5,841 additions and 6,703 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Requirements
# Requirements

- [ ] This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a [conventional commit](https://o3-docs.openmrs.org/docs/frontend-modules/contributing.en-US#contributing-guidelines) label. See existing PR titles for inspiration.
- [ ] My work conforms to the [OpenMRS 3.0 Styleguide](https://om.rs/styleguide) and [design documentation](https://om.rs/o3ui).
Expand Down
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.1.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.1.cjs
yarnPath: .yarn/releases/yarn-4.1.0.cjs
64 changes: 13 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,28 @@
# AMPATH 3.X
# AMPATH O3

This repository contains frontend modules for the AMPATH SPA. These modules relate to pre-appointments and reporting. The modules within this repository include:
This monorepo houses custom frontend modules used in the AMPATH O3 frontend. These include:

- [Active visits app](packages/esm-preappointment-app)
- [Appointments app](packages/esm-reporting-app/)
- [Pre-appointments](packages/esm-preappointment-app)

## Setup

Check out the developer documentation [here](http://o3-dev.docs.openmrs.org).
Check out the developer documentation [here](http://o3.docs.openmrs.org).

This monorepo uses [yarn](https://yarnpkg.com).
Install dependencies by running:

To install the dependancies, run:
```bash
yarn install
```sh
yarn
```

To set up environment variables for the project, follow these steps:

1. Create a copy of the .env.example file by running the following command:

```bash
cp example.env .env
```

2. Open the newly created .env file in the root of the project.
## Development

3. Add the environment variables you need.
To run a local dev server for a specific frontend module, run:

Note: These variables are currently only used for end-to-end tests.

To start a dev server for a specific module, run:

```bash
```sh
yarn start --sources 'packages/esm-<insert-package-name>-app'
```

This command uses the [openmrs](https://www.npmjs.com/package/openmrs) tooling to fire up a dev server running `esm-patient-management` as well as the specified module.
Where the argument to `--sources` is the name of the frontend module you want to run. It will run a dev server proxied to a hosted instance of the AMPATH backend by default.

You could provide `yarn start` with as many `sources` arguments as you require. For example, to run the patient registration and patient search modules only, use:

Expand All @@ -59,7 +45,6 @@ git checkout package.json
yarn
```


## Contributing

Please read our [contributing](http://o3-dev.docs.openmrs.org/#/getting_started/contributing) guide.
Expand Down Expand Up @@ -111,6 +96,7 @@ yarn turbo test --force
```

### Unit tests

To run unit tests, use:

```sh
Expand Down Expand Up @@ -147,28 +133,4 @@ The `main` branch of this repo is deployed in a [demo environment](https://openm

## Configuration

This module is designed to be driven by configuration files.

## Version and release

To increment the version, run the following command:

```sh
yarn release
```

You will need to pick the next version number. We use minor changes (e.g. `3.2.0``3.3.0`)
to indicate big new features and breaking changes, and patch changes (e.g. `3.2.0``3.2.1`)
otherwise.

Note that this command will not create a new tag, nor publish the packages.
After running it, make a PR or merge to `main` with the resulting changeset.

Once the version bump is merged, go to GitHub and
[draft a new release](https://github.com/openmrs/openmrs-esm-patient-management/releases/new).
The tag should be prefixed with `v` (e.g., `v3.2.1`), while the release title
should just be the version number (e.g., `3.2.1`). The creation of the GitHub release
will cause GitHub Actions to publish the packages, completing the release process.

> Don't run `npm publish` or `yarn publish`. Use the above process.
This module is designed to be driven by configuration files. Each module has a `config-schema.ts` file at its root. This file contains the schema for the configuration file that the module expects. The distro-level configuration file is located [here](https://github.com/AMPATH/openmrs-config-amrs/blob/main/configuration/config.json). To learn more about configuration, read the [Distro config](https://o3-docs.openmrs.org/docs/configure-o3/overview) and the [Configuration](https://o3-docs.openmrs.org/docs/configuration-system) guides in the official docs.
16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@ampth/esm-3.x-app",
"name": "@ampath/esm-3.x-app",
"version": "6.0.0",
"private": true,
"description": "Patient management microfrontend for the OpenMRS 3.x frontend",
"description": "Monorepo with custom packages for the AMPATH O3 frontend",
"workspaces": [
"packages/*"
],
"scripts": {
"start": "openmrs develop --backend http://amrs.ampath.or.ke:8080 --sources packages/esm-patient-registration-app --api-url /amrs --spa-path /amrs/spa/ --port 8021",
"ci:publish": "yarn workspaces foreach --all --topological --exclude @ampth/esm-3.x-app npm publish --access public --tag latest",
"ci:prepublish": "yarn workspaces foreach --all --topological --exclude @ampth/esm-3.x-app npm publish --access public --tag next",
"start": "openmrs develop --backend http://amrs.ampath.or.ke:8080 --api-url /amrs --spa-path /amrs/spa/",
"ci:publish": "yarn workspaces foreach --all --topological --exclude @ampath/esm-3.x-app npm publish --access public --tag latest",
"ci:prepublish": "yarn workspaces foreach --all --topological --exclude @ampath/esm-3.x-app npm publish --access public --tag next",
"release": "yarn workspaces foreach --all --topological version",
"verify": "turbo lint typescript test --color --concurrency=2",
"prettier": "prettier --config prettier.config.js --write \"packages/**/*.{ts,tsx,css,scss}\" \"e2e/**/*.ts\"",
Expand All @@ -26,7 +26,6 @@
"zod": "^3.22.2"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@carbon/react": "~1.37.0",
"@openmrs/esm-framework": "next",
"@openmrs/esm-patient-common-lib": "next",
Expand All @@ -47,8 +46,6 @@
"@types/yup": "^0.29.11",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"babel-preset-minify": "^0.5.1",
"concurrently": "^5.3.0",
"cross-env": "^7.0.3",
"css-loader": "^6.8.1",
"dayjs": "^1.8.36",
Expand All @@ -75,13 +72,12 @@
"sass-loader": "^10.1.0",
"swc-loader": "^0.2.3",
"turbo": "^1.6.3",
"typedoc": "^0.22.15",
"typescript": "^4.0.3",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "eslint --cache --fix"
},
"packageManager": "yarn@4.0.1"
"packageManager": "yarn@4.1.0"
}
Loading

0 comments on commit e3590fd

Please sign in to comment.