You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
investigated and will result in a response that is deemed necessary and
63
+
appropriate to the circumstances. The project team is obligated to maintain
64
+
confidentiality with regard to the reporter of an incident. Further details of
65
+
specific enforcement policies may be posted separately.
64
66
65
67
Project maintainers who do not follow or enforce the Code of Conduct in good
66
68
faith may face temporary or permanent repercussions as determined by other
67
69
members of the project's leadership.
68
70
69
71
### Attribution
70
72
71
-
This Code of Conduct is adapted from the [ncc CoC](https://github.com/vercel/ncc/blob/main/CODE_OF_CONDUCT.md) which is itself adapted from the [Contributor Covenant][homepage], version 1.4,
72
-
available at [http://contributor-covenant.org/version/1/4][version]
73
+
This Code of Conduct is adapted from the
74
+
[ncc CoC](https://github.com/vercel/ncc/blob/main/CODE_OF_CONDUCT.md) which is
75
+
itself adapted from the [Contributor Covenant][homepage], version 1.4, available
76
+
at [http://contributor-covenant.org/version/1/4][version]
@@ -15,11 +19,16 @@ Here are some guidelines to help you get started contributing to NanoAPI.
15
19
2. Check for open issues before creating a new one.
16
20
3. We require an open issue for all pull requests.
17
21
4. Help others by reviewing their pull requests.
18
-
5. All donations we receive go directly back to our contributors. We’re here to support you when you successfully submit a PR to us. Your efforts help the community grow, and we want to give back to those who help make that possible!
22
+
5. All donations we receive go directly back to our contributors. We’re here to
23
+
support you when you successfully submit a PR to us. Your efforts help the
24
+
community grow, and we want to give back to those who help make that
25
+
possible!
19
26
20
27
## How to File Issues
21
28
22
-
Make use of the issue templates, and label your issues appropriately. If you’re unsure about which label to use, don’t worry! We will help you choose the right one.
29
+
Make use of the issue templates, and label your issues appropriately. If you’re
30
+
unsure about which label to use, don’t worry! We will help you choose the right
31
+
one.
23
32
24
33
## How to Submit a Pull Request
25
34
@@ -35,98 +44,118 @@ Make use of the issue templates, and label your issues appropriately. If you’r
35
44
9. Follow the template and fill in all the sections.
36
45
10. Wait for feedback.
37
46
11. Make changes if necessary.
38
-
12. Celebrate your success after your PR gets merged. The Codex Astartes supports this action.
47
+
12. Celebrate your success after your PR gets merged. The Codex Astartes
48
+
supports this action.
39
49
40
-
## Development Environment
50
+
## Development Environment
41
51
42
52
You will need the following tools to develop NanoAPI:
43
53
44
54
-[Node.js](https://nodejs.org/en/) version 22 or higher.
45
55
46
56
### Environment Set Up
47
57
48
-
We use the fork-and-pull model for contributions. Here’s how you can set up your development environment:
58
+
We use the fork-and-pull model for contributions. Here’s how you can set up your
> You may encounter issues on a second or third install of dependencies. If this happens, install with `npm i --no-cache --force` to fix these issues.
87
+
> You may encounter issues on a second or third install of dependencies. If this
88
+
> happens, install with `npm i --no-cache --force` to fix these issues.
77
89
78
90
### Running the Project
79
91
80
-
When running locally, the shared libraries and the UI must be built before the CLI can be run.
92
+
When running locally, the shared libraries and the UI must be built before the
93
+
CLI can be run.
81
94
82
95
To build them:
83
96
84
97
```bash
85
98
$ npm run build
86
99
```
87
100
88
-
Next, we want to run the CLI and the UI with hot reload. You will need two terminal windows for this.
101
+
Next, we want to run the CLI and the UI with hot reload. You will need two
102
+
terminal windows for this.
89
103
90
-
1. In the first terminal, run the CLI. This command should be run in the `napi` directory with a `workdir` pointing to the project you want to work on. For example, if you want to work on Apache Airflow, run:
104
+
1. In the first terminal, run the CLI. This command should be run in the `napi`
105
+
directory with a `workdir` pointing to the project you want to work on. For
106
+
example, if you want to work on Apache Airflow, run:
91
107
92
108
```bash
93
109
$ npm run dev:cli -- audit view -- --workdir=/path/to/airflow
94
110
```
95
111
96
-
Running the `audit view` command from the CLI will spin up a web server on your localhost. You can access the UI by navigating to `http://localhost:3000`.
112
+
Running the `audit view` command from the CLI will spin up a web server on your
113
+
localhost. You can access the UI by navigating to `http://localhost:3000`.
97
114
98
115
> [!NOTE]
99
-
> In case of port collisions, the UI will automatically switch to the next available port.
116
+
> In case of port collisions, the UI will automatically switch to the next
117
+
> available port.
100
118
101
-
2. In the second terminal, run the UI. This command should be run in the `napi` directory as well:
119
+
2. In the second terminal, run the UI. This command should be run in the `napi`
120
+
directory as well:
102
121
103
122
```bash
104
123
$ npm run dev:app
105
124
```
106
125
107
-
This controls the hot reload functionality for the UI. You can now make changes to the UI and see them reflected in real-time.
126
+
This controls the hot reload functionality for the UI. You can now make changes
127
+
to the UI and see them reflected in real-time.
108
128
109
129
> [!IMPORTANT]
110
-
> The react UI elements (sidebar, header, etc.) will automatically reload when you make changes. However any Cytoscape elements will not. You will need to refresh the page to see those changes.
130
+
> The react UI elements (sidebar, header, etc.) will automatically reload when
131
+
> you make changes. However any Cytoscape elements will not. You will need to
132
+
> refresh the page to see those changes.
111
133
112
134
### Project Setup
113
135
114
-
You can use any project (in a supported language) to test the CLI. There are some steps that must be taken to set up the project:
136
+
You can use any project (in a supported language) to test the CLI. There are
137
+
some steps that must be taken to set up the project:
138
+
139
+
1. Clone or CD to the repo you want to work on/test with. For this example we'll
140
+
use Apache Airflow.
115
141
116
-
1. Clone or CD to the repo you want to work on/test with. For this example we'll use Apache Airflow.
117
142
```bash
118
143
git clone https://github.com/apache/airflow.git
119
144
cd airflow
120
145
```
121
146
122
-
2. From the `napi` repo initialize the project using the CLI, which will create a `.napirc` file in the project root. This file contains the configuration for the project and is required for the CLI to work.:
147
+
2. From the `napi` repo initialize the project using the CLI, which will create
148
+
a `.napirc` file in the project root. This file contains the configuration
149
+
for the project and is required for the CLI to work.:
150
+
123
151
```bash
124
152
cd /path/to/napi # or just use a different terminal
125
153
npm start -- init -- --workdir=/path/to/airflow
126
154
```
127
155
128
156
> [!NOTE]
129
-
> If you encounter any issues with the config file, you can [check the reference for the file on our documentation](https://docs.nanoapi.io/default-guide/reference/napirc).
157
+
> If you encounter any issues with the config file, you can
158
+
> [check the reference for the file on our documentation](https://docs.nanoapi.io/default-guide/reference/napirc).
130
159
131
160
### Testing
132
161
@@ -142,15 +171,21 @@ $ npm run lint
142
171
143
172
### Release Process
144
173
145
-
We are currently formalizing the release process. For now, the NanoAPI team will handle making regular releases.
174
+
We are currently formalizing the release process. For now, the NanoAPI team will
175
+
handle making regular releases.
146
176
147
-
To ensure releases run smoothly, put the content of your changes in our [CHANGELOG](/packages/cli/CHANGELOG.md) file.
177
+
To ensure releases run smoothly, put the content of your changes in our
178
+
[CHANGELOG](/packages/cli/CHANGELOG.md) file.
148
179
149
180
### Documentation
150
181
151
-
We are also building on the documentation process. For now, include any documentation changes in your PRs and we will add them into the main documentation.
182
+
We are also building on the documentation process. For now, include any
183
+
documentation changes in your PRs and we will add them into the main
184
+
documentation.
185
+
186
+
The critical documentation to maintain is for any changes that impact the
187
+
following:
152
188
153
-
The critical documentation to maintain is for any changes that impact the following:
154
189
- CLI commands
155
190
- Configuration file
156
191
- Local development setup
@@ -160,9 +195,10 @@ The critical documentation to maintain is for any changes that impact the follow
160
195
161
196
### Discussions vs Issues
162
197
163
-
We use GitHub Discussions for general questions, ideas, and feedback. If you have a question, please use the Discussions tab. If you have a bug report or feature request, please use the Issues tab.
198
+
We use GitHub Discussions for general questions, ideas, and feedback. If you
199
+
have a question, please use the Discussions tab. If you have a bug report or
200
+
feature request, please use the Issues tab.
164
201
165
-
------
202
+
---
166
203
167
204
That's it for this guide for now. So long, and thanks for all the fish! 🚀
0 commit comments