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 2024 03 #5328

Merged
merged 25 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2432113
WAITP-1517: Datatrak improvements (#5292)
alexd-bes Dec 18, 2023
7a1b38c
WAITP-1528: Adjust geolocate question display on review screens (#5286)
alexd-bes Dec 20, 2023
90b9864
Merge pull request #5299 from beyondessential/master
rohan-bes Dec 20, 2023
775bc52
WAITP-1530: Fix date of data timezone (#5287)
alexd-bes Dec 21, 2023
54c6590
Update vite.config.js (#5304)
tcaiger Dec 21, 2023
8b91f2d
WAITP-1518: Tupaia Web small Lighthouse fixes (#5295)
alexd-bes Dec 21, 2023
06f0915
WAITP-1513: Add asterisk where questions are required (#5300)
alexd-bes Dec 21, 2023
cf63c6e
WAITP-1502: code guidelines (#5293)
alexd-bes Dec 21, 2023
1f47e43
WAITP-1527: GZIP JS files and json responses on tupaia and datatrak (…
tcaiger Dec 22, 2023
b7d5ad8
WAITP-1511: map overlay error handling (#5306)
alexd-bes Dec 22, 2023
18839f1
WAITP-1533: Fix some projects not showing in Datatrak Web navbar (#5294)
alexd-bes Jan 7, 2024
ed69521
no-issue: Fix persistent DataTrak sidebar (#5314)
jaskfla Jan 8, 2024
ef44a25
WAITP-1524: Make survey project_id field non-nullable (#5312)
alexd-bes Jan 9, 2024
85ddffe
no-issue: Undo fix persistent DataTrak sidebar (#5317)
jaskfla Jan 9, 2024
2bd7ce8
WAITP-1351 Datatrak link to tupaia and log in (#5217)
EMcQ-BES Jan 9, 2024
1365d81
no-issue: Split DataBroker pullMetadata API per type (#5288)
kael89 Jan 10, 2024
ccf2a51
Use provided sorting first (#5254)
alexd-bes Jan 11, 2024
14a156d
RN-1105: Use separate .env vars for api-clients in local/dev/prod (#5…
IgorNadj Jan 11, 2024
b553f0e
RN-1126: Fix image upload field scroll issue (#5322)
alexd-bes Jan 12, 2024
10e62cf
WAITP-1439: mobile prompt (#5178)
alexd-bes Jan 12, 2024
6d81728
WAITP-1479: Enable sending exports as an attachment to an email (#5260)
alexd-bes Jan 12, 2024
b97a54b
no-issue: Set the initial selection of a multi-value autocomplete inp…
rohan-bes Jan 12, 2024
431a968
Bump release version for Meditrak
alexd-bes Jan 14, 2024
ac07ee3
Fix mobile datepicker
alexd-bes Jan 15, 2024
d2dc86b
Handle no data when sorting
alexd-bes Jan 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Tupaia contributions guide

Thank you for taking the time to contribute, and welcome to the Tupaia!
We value your expertise, insights, and commitment to making Tupaia a global good. This
document is a guide on how to contribute to Tupaia effectively, ensuring it remains a
cohesive, maintainable, and globally valuable product.

## Code of conduct

This project and everyone participating in it is governed by the
[BES Open Source Code of Conduct](code-of-conduct.md).
By participating, you are expected to uphold this code. Please report unacceptable behaviour to [opensource@bes.au](opensource@bes.au).

## Copyright Attribution

All open-source contributors to Tupaia will be required to sign a Contributor License Agreement (CLA)
before BES can accept your contribution into the project code. This is done so that we can continue
to maintain the codebase covered by a single license. Signing a CLA can be done through GitHub
before merging in your first pull request.

## Our Philosophy

Our core philosophy is to maintain the long-term sustainability of Tupaia. We, at BES work hard
to maintain a cohesive vision for the project. While we encourage collaboration and contributions,
we also want to avoid fragmentation that could compromise Tupaia's usability, maintainability,
and value. We believe that the best way to contribute is to align your efforts with our existing
product roadmap.

## Contributing

Before considering becoming an open-source contributor for Tupaia, please take note that becoming
an open-source contributor requires a significant amount of time onboarding, and ongoing
coordination and support from BES as the project maintainers. As such we encourage contributions
from individuals and organizations who are prepared to invest significant amounts of time into
their work, ensuring alignment with our roadmap and the highest quality results. While we appreciate
the interest of potential casual contributors, we aim to collaborate with contributors who are
serious about their commitment to Tupaia. If you're ready to deeply engage and uphold Tupaia's
vision and standards, we warmly welcome your involvement.

### Following Our Roadmap

Before making your contribution, make sure that it aligns with our product roadmap for Tupaia.
This ensures that your contribution builds towards a cohesive vision for Tupaia. This generally
means pulling in features from our existing roadmap, and speeding up the delivery process into the
core product. We will gladly co-design features if you identify something missing from the roadmap
that will benefit the users of Tupaia.

#### Meaningful Contributions (under construction)

To assess whether or not your contribution will be meaningful to the development of Tupaia before
making your contribution, put your contribution idea against the following criteria:

**Documentation:**

- If there is no documentation for a specific aspect of Tupaia
- If a specific area in the project's documentation is either: lacking detail, outdated or unclear.

**Features:**

- If the feature aligns with the Tupaia roadmap
- If your feature has been co-designed with a BES developer

### Developer Onboarding and Orientation

Being a complex product, Tupaia is at the stage where supported onboarding is necessary for the
project's contributors. The BES Tupaia team are happy to provide hands-on support for serious and
committed contributors, But we will ask to see evidence of your commitment as well as a CV.

Steps for onboarding and setting up your development environment can be found on our [README](../README.md).
However, it's most likely that support is needed from a BES developer in order for a successful and
stable onboarding.

## Making your code contribution

You can find an outline of the project structure and prerequisites on our [Readme](https://github.com/beyondessential/tupaia/blob/master/README.md)

### Code Quality

When making your contribution, please ensure that your code is of high quality. Follows best
practices, write clean and readable code, add comments where necessary, and thoroughly test your
code. We have a code review process for all contributions, and have a high bar for quality.

### Branch Naming Conventions

For open-source contribution branches, the naming convention is:

<issue-id>-<description>

For example, `1736-pdf-export-crash`

### Branching Strategy

1. When creating a branch for your contribution, branch off the latest `dev`.
2. Make your commits on the branch you made.
3. Once your changes are complete, pull from the latest `dev` and create a pull request on GitHub

### Pull Requests

When your contribution is ready for review, create a pull request. A BES developer will review
your changes and provide feedback. If your pull request has been approved by a reviewer, it
will then go through a round of internal testing. Once your changes have passed testing, they
can be merged into main and be included in an upcoming Tupaia release.

### Note on Forking

While Tupaia is open-source, there is always the possibility for forking the repository, which
we strongly recommend against. We will not provide any support for forked versions of Tupaia.
We have seen projects struggle and even fail because of this type of splintering. Instead, we
encourage you to collaborate with us on the mainline product roadmap.

## Licence

Any contributions you make will be licensed under [our open-source license](https://github.com/beyondessential/tupaia/blob/master/LICENSE)

---

Again, thank you for considering contributing to Tupaia. With your help, we can make Tupaia a
sustainable, useful, and valuable global good.

The Tupaia Team
69 changes: 69 additions & 0 deletions .github/code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# BES Contributor Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behaviour that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behaviour include:

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

## Appreciate and Accommodate Our Similarities and Differences

Our contributors come from many cultures and backgrounds. Cultural differences can encompass everything from official religious observances to personal habits to clothing. Be respectful of people with different cultural practices, attitudes and beliefs. Work to eliminate your own biases, prejudices and discriminatory practices. Think of others’ needs from their point of view. Use preferred titles (including pronouns) and the appropriate tone of voice. Respect people’s right to privacy and confidentiality. Be open to learning from and educating others as well as educating yourself; it is unrealistic to expect our contributors to know the cultural practices of every ethnic and cultural group, but everyone needs to recognize one’s native culture is only part of positive interactions.

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behaviour and will take appropriate and fair corrective action in response to any behaviour that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, docs site edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported to the community leaders responsible for enforcement at opensource@bes.au. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement guidelines

### 1. Warning

Community Impact: Use of inappropriate language or other behaviour deemed unprofessional or unwelcome in the community.

Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behaviour was inappropriate. A public apology may be requested.

### 2. Temporary or Permanent Ban

Community Impact: A serious violation of community standards, including sustained inappropriate behaviour.

A ban from any sort of interaction or public communication with the community, either permanently or for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1,
available at https://www.contributor-covenant.org/version/2/1/code_of_conduct/ with the addition of Appreciate and Accommodate Our Similarities and Differences adapted from the [Mozilla Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/)

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
10 changes: 4 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ jobs:
DB_URL: localhost
DB_USER: tupaia
AGGREGATION_URL_PREFIX: dev-
API_CLIENT_NAME: api-client
API_CLIENT_PASSWORD: api-client
API_CLIENT_SALT: abc132
JWT_SECRET: abc132

# test database
DB_PG_USER: postgres
Expand All @@ -104,12 +108,6 @@ jobs:
DATA_LAKE_DB_URL: localhost
DATA_LAKE_DB_USER: tupaia

# central-server
API_CLIENT_SALT: abc132
CLIENT_SECRET: abc132
CLIENT_USERNAME: meditrak_client_test
JWT_SECRET: abc132

strategy:
fail-fast: false
matrix:
Expand Down
79 changes: 0 additions & 79 deletions code-of-conduct.md

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"ts-node": "^10.7.0",
"typescript": "^5.2.2",
"vite": "^4.4.8",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-ejs": "^1.6.4",
"yargs": "15.4.1"
},
Expand Down
11 changes: 7 additions & 4 deletions packages/admin-panel-server/src/app/createApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ const {
/**
* Set up express server with middleware,
*/
export function createApp() {
export async function createApp() {
const forwardToEntityApi = forwardRequest(ENTITY_API_URL);
const app = new OrchestratorApiBuilder(new TupaiaDatabase(), 'admin-panel')
const builder = new OrchestratorApiBuilder(new TupaiaDatabase(), 'admin-panel')
.attachApiClientToContext(authHandlerProvider)
.useSessionModel(AdminPanelSessionModel)
.verifyLogin(hasTupaiaAdminPanelAccess)
Expand Down Expand Up @@ -143,8 +143,11 @@ export function createApp() {
)
.use('hierarchy', forwardToEntityApi)
.use('hierarchies', forwardToEntityApi)
.use('*', forwardRequest(CENTRAL_API_URL))
.build();
.use('*', forwardRequest(CENTRAL_API_URL));

await builder.initialiseApiClient([{ entityCode: 'DL', permissionGroupName: 'Public' }]);

const app = builder.build();

return app;
}
36 changes: 19 additions & 17 deletions packages/admin-panel-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2017 - 2021 Beyond Essential Systems Pty Ltd
*/

import * as dotenv from 'dotenv';
import http from 'http';
import * as dotenv from 'dotenv';

import winston from 'winston';
import { configureWinston } from '@tupaia/server-boilerplate';
Expand All @@ -13,21 +13,23 @@ import { createApp } from './app';
configureWinston();
dotenv.config(); // Load the environment variables into process.env

/**
* Set up app with routes etc.
*/
const app = createApp();
(async () => {
/**
* Set up app with routes etc.
*/
const app = await createApp();

/**
* Start the server
*/
const port = process.env.PORT || 8070;
http.createServer(app).listen(port);
winston.info(`Running on port ${port}`);
/**
* Start the server
*/
const port = process.env.PORT || 8070;
http.createServer(app).listen(port);
winston.info(`Running on port ${port}`);

/**
* Notify PM2 that we are ready
* */
if (process.send) {
process.send('ready');
}
/**
* Notify PM2 that we are ready
* */
if (process.send) {
process.send('ready');
}
})();
2 changes: 0 additions & 2 deletions packages/admin-panel/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
REACT_APP_API_URL=
REACT_APP_CLIENT_BASIC_AUTH_HEADER=

REACT_APP_VIZ_BUILDER_API_URL=
Loading