Giter VIP home page Giter VIP logo

Comments (30)

michaelbrewer avatar michaelbrewer commented on June 24, 2024 3

Adding GitPod or CodeSpaces support is really handy .

eg: https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md

from aws-lambda-powertools-typescript.

dreamorosi avatar dreamorosi commented on June 24, 2024 3

Did a quick test with devcontainer in VSCode, leaving this here for future reference:

.devcontainer/Dockerfile

ARG VARIANT="16"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

RUN mkdir ~/.npm-global && \
  npm config set prefix '~/.npm-global' && \
  echo "export PATH=~/.npm-global/bin:$PATH" >> ~/.profile

ARG EXTRA_NODE_VERSION=16.5.0
RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

.devcontainer/devcontainer.json

{
  "name": "Node.js",
  "build": {
    "dockerfile": "Dockerfile"
  },
  "extensions": [
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode",
    "visualstudioexptteam.vscodeintellicode",
    "amazonwebservices.aws-toolkit-vscode",
    "github.copilot",
    "firsttris.vscode-jest-runner"
  ],
  "postCreateCommand": "npm install && npm run lerna-bootstrap && npm run lerna-test"
}

from aws-lambda-powertools-typescript.

dreamorosi avatar dreamorosi commented on June 24, 2024 2

Agree that it needs improvement. The AWS Solutions Constructs repo, in my opinion, has a good example of this file.

Also interesting is their DESIGN_GUIDELINES.md file which we could also adopt a form of.

The process they request contributors to follow requires an issue and a design document to be reviewed by a maintainer before someone starts to implement a change. For trivial changes just the issue could suffice but for bigger changes I think it's a good idea. On one hand the maintainer review could become a bottleneck but in the spirit of a good experience as a contributor it'd be far worse to invest time and effort in an implementation that'd be rejected when it becomes a PR.

from aws-lambda-powertools-typescript.

bahrmichael avatar bahrmichael commented on June 24, 2024 2

I like @dreamorosi's suggestion of the AWS Solutions Constructs example, and think we could get a good first document by using and adapting the example for our repository. I'll be happy to start a draft.

I don't have much experience around design guidance, and am quite new to this project. So for now I'll be passive regarding design guidelines.

from aws-lambda-powertools-typescript.

saragerion avatar saragerion commented on June 24, 2024 2

Another important point to document (and possibly also setup in our project configuration) is the versions of:

  • NPM
  • Node.js
    that you need to have installed locally to have the project properly working.
    I am in favour of documentation + local setup scripts/hooks to avoid errors related to wrong versions being used.

from aws-lambda-powertools-typescript.

michaelbrewer avatar michaelbrewer commented on June 24, 2024 2

I would not mind adding a PR for gitpod / CodeSpaces support. To help onboard contributors.

from aws-lambda-powertools-typescript.

bahrmichael avatar bahrmichael commented on June 24, 2024 1

We should also include build steps they can run themselves to ensure proper linting (and maybe add a step in the PR build to verify if it's alright).

Agree on enforcing it.
Using camel casing is something we could also document here #115 because I can see how someone new to the project could do a similar thing.

#102 (comment)

I think we're reaching a point where we need to recollect all the ideas, and trim them down into individual tasks.

from aws-lambda-powertools-typescript.

saragerion avatar saragerion commented on June 24, 2024 1

Another item we could document: testing style.
#102 (comment)

from aws-lambda-powertools-typescript.

alan-churley avatar alan-churley commented on June 24, 2024 1

I think the approach here seems sensible, and yes more documentation on how things should work the better!

from aws-lambda-powertools-typescript.

saragerion avatar saragerion commented on June 24, 2024 1

Additional contributing section: more elaborated PR-related guidance and best practices, including but not limited to:

  • meaningful PR titles
  • PR titles following our conventional commit semantics
  • Do not open PRs if you haven't created an issue first and that issue has been discussed with and approved by at least one of the maintainers

from aws-lambda-powertools-typescript.

michaelbrewer avatar michaelbrewer commented on June 24, 2024 1

I do like how python powertools has a simple Makefile

ie:

  • make dev - sets up and installs all of the dev dependencies and pre-commit hooks
  • make pr - does all of the tasks recommended before submitting a PR and includes
    • make test - all unit tests including performance tests
    • make lint - does all of the linting and security checks
    • make format - does all of the code formatting
  • make docs-local - for the docs and does not need any docker stuff :P

from aws-lambda-powertools-typescript.

saragerion avatar saragerion commented on June 24, 2024 1

Another aspect that we should add in our contributing section: avoiding creating PR's that include code changes that are not related to the specific issue they are trying to address.
Housekeeping shows good intentions, but it does not help us maintainers keeping track of the changes that are released and it's better to create a separated issue/PR for changes unrelated to the original scope.

Also we should clarify what's the best way to define a conversation resolved in a PR review :)

from aws-lambda-powertools-typescript.

flochaz avatar flochaz commented on June 24, 2024 1

Should we put contributing section in the doc? It's easier to locate and search. But the drawback is that the content has to be in the docs folder.

I personally would prefer to be just a link to CONTRIBUTING.md from doc. Dev will first look at this file at root folder of repo.

from aws-lambda-powertools-typescript.

dreamorosi avatar dreamorosi commented on June 24, 2024

I think a good starting point for the design principles could be the tenets described in the Python's version of the project. Other than that I think good principles could be feature parity and consistency with other runtimes.

from aws-lambda-powertools-typescript.

saragerion avatar saragerion commented on June 24, 2024

@bahrmichael @dreamorosi thanks for your input, I completely agree.

I would also add: in our contributing guidelines we should also clarify how to find Issues, PR's (through the Github projects). Additionally we could define what "ownership" (= assignees) of an issue is and what that means in practice.

Here's my proposal:

  1. When someone creates a new Issue, there is no owner assigned because the issue needs to be triaged still (we might or might not implement it for example). To get feedback of the maintainers, we can tag them in the issue's comments to get their input (and/or ping them on slack of course). So the issue has no owner (assignee) yet.
  2. Once the issue is triaged and ready to be picked up, 1 or more owners can be assigned in the Assignees section. An owner of an issue has the responsibility of carry it to completion and bring it to the done column.

I myself am guilty of assigning issues to get people's attention so not following what suggested above, by the way. But I realised that this was causing me confusion.

I think documenting this etiquette will bring more clarity about who is working on what in the future. But first we need of course to agree whether this is the best way of working/approach or there are better ways.
What do you think?
cc: @alan-churley

from aws-lambda-powertools-typescript.

dreamorosi avatar dreamorosi commented on June 24, 2024

100% agree with this, and it's great to document it so that we all know what's the proper etiquette. To double down on this I think we could codify also how PRs should work. For those I think the current behaviour is that the assignee is the person who opened the PR and is responsible of resolve any comment/request from the reviewers. Reviewers are those who are expected to review the PR and provide feedback/approve/reject the changes.

What do you think?

from aws-lambda-powertools-typescript.

saragerion avatar saragerion commented on June 24, 2024

As suggested by @alan-churley this issue can include the setup of pre-commit hooks that would validate/flag errors

from aws-lambda-powertools-typescript.

bahrmichael avatar bahrmichael commented on June 24, 2024

There's been a lot of great feedback, so I'll try to summarize it into some areas that we can work through bit by bit.

from aws-lambda-powertools-typescript.

github-actions avatar github-actions commented on June 24, 2024

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

from aws-lambda-powertools-typescript.

saragerion avatar saragerion commented on June 24, 2024

New item: code readability.
See: https://github.com/awslabs/aws-lambda-powertools-typescript/pull/102/files/984da5311a4a396d1b56538e2b57204dd9ffb0dc#r679917689

from aws-lambda-powertools-typescript.

dreamorosi avatar dreamorosi commented on June 24, 2024

Other example of nice/exhaustive contributing section in this repo, also this uses GitHub Wiki instead of a CONTRIBUTING.md file.

from aws-lambda-powertools-typescript.

saragerion avatar saragerion commented on June 24, 2024

Additional section - etiquette related to issues assigned to a member of the community.

Inspired by this thread: https://twitter.com/aritdeveloper/status/1478098181351223302?t=Qw8BKdxsvIpGGn1VnF3eOQ&s=19

from aws-lambda-powertools-typescript.

ijemmy avatar ijemmy commented on June 24, 2024

Should we put contributing section in the doc?
It's easier to locate and search. But the drawback is that the content has to be in the docs folder.

from aws-lambda-powertools-typescript.

michaelbrewer avatar michaelbrewer commented on June 24, 2024

normally it is in the root dir

from aws-lambda-powertools-typescript.

michaelbrewer avatar michaelbrewer commented on June 24, 2024

I did one for the python project too, makes it super easy to contribute

CodeSpaces config:

GitPod config:

from aws-lambda-powertools-typescript.

saragerion avatar saragerion commented on June 24, 2024

Just FYI, I created a separate ticket for the scope of "local development" (new contributors onboarding)

#426

from aws-lambda-powertools-typescript.

michaelbrewer avatar michaelbrewer commented on June 24, 2024

There is still typos, python references and aws cdk project references.

from aws-lambda-powertools-typescript.

michaelbrewer avatar michaelbrewer commented on June 24, 2024

Example of referencing tests/e2e which does not exist in the repo (maybe this references within the packages/logger/tests/unit ?)

Screen Shot 2022-01-25 at 10 23 54 AM

Python references, for which there still needs to be a Typescript version of this.

Screen Shot 2022-01-25 at 10 32 53 AM

from aws-lambda-powertools-typescript.

ijemmy avatar ijemmy commented on June 24, 2024

Most of the items are addressed (Python references are also removed). With @AWSDB PR, we're confident for Production Release with this doc.

Any other future improvement on CONTRIBUTING.md will be created as a seperated issue.

from aws-lambda-powertools-typescript.

github-actions avatar github-actions commented on June 24, 2024

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

from aws-lambda-powertools-typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.