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
- Use the breakpoint toggles to enable different breakpoint modes.
57
+
- Features:
58
+
- Find Library Keywords by typing `LibraryName` + `.` and scroll the keywords.
59
+
- Variables are sorted by the distance in autocompletion.
60
+
- Local scope is closest, then Suite scope, then global scope.
61
+
- Explorer View:
62
+
- Select `Keywords` Dropdown.
63
+
- View Keyword-Documentation.
64
+
- Insert Keywords or Drag & Drop them.
65
+
- Search within Library-Keywords (F3).
66
+
- Debug Logs:
67
+
- RobotCode Log: Logging of RobotCode Details.
68
+
- RobotCode Language Server Log: Logging of Language Server Details.
69
+
- Helps with your own debugging or reporting issues with detailed information.
25
70
- Structuring the project for scalability and maintainability.
71
+
- Simple Projects:
72
+
- Create a `/resources` directory with `*.resource` files for Robot Framework Keywords.
73
+
- This will add `/resources` to the PYTHON_PATH.
74
+
- Create a `/lib` directory with `*.py` files for python keywords.
75
+
- This will add `/lib` to the PYTHON_PATH.
76
+
- This way you can add `.resource` and `.py` keyword files **without** using the absolute file path.
77
+
- When using different folder names/structures for your project, you need to add the folder paths to your PYTHON_PATH for usage without the full directory path.
78
+
- TIP: Use `settings.json` for your personal local changes and do not commit to your Git-Repo!
79
+
- These settings are for your personal preference.
80
+
- Enable/Disable "RobotCode Play Buttons" -> Settings-RobotCode-Test Explorer-Enable/Disable.
26
81
- Using Python project managers for efficient dependency management.
82
+
- Project managers help you with:
83
+
- Managing dependencies.
84
+
- Managing execution and development environments.
85
+
- Creating virtual environments.
86
+
- EXAMPLE: [hatch](https://hatch.pypa.io/latest/)
87
+
- Follows the PEP standard.
88
+
- Gives you the opportunity to create test matrices to e.g. run multiple virtual environments in parallel.
27
89
- Best practices in project setup and organization.
90
+
- Use a python package manager to organize your project and set it up in a standardized way.
91
+
- Integrate [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for versioning your project and automatically create a `Changelog.md`.
28
92
29
-
3. Exploring RobotCode Features:
93
+
3.**Exploring RobotCode Features:**
30
94
- Overview of general features that enhance productivity.
95
+
- RobotFramework Notebook:
96
+
- File -> New File -> RobotFramework Notebook.
97
+
- First Version included in VSCode supporting `*.robot` Files and Markdown.
98
+
- Uses the REPL, so there are no `*** Settings ***` or `*** Variables ***` sections.
99
+
- Helping with Business Analyst Files such as RPA procedures.
100
+
- Robotcode REPL (Read-Evaluate-Print-Loop):
101
+
- Install (if not yet): `pip install robotcode-repl`.
102
+
- In CLI: use `robotcode repl`.
103
+
- Type Keywords and Expressions that are directly evaluated.
31
104
- Introduction to new and advanced features.
32
105
33
-
4. Using `robot.toml` Configuration:
106
+
4.**Using `robot.toml` Configuration:**
34
107
- Understanding general configuration settings.
108
+
-`robot.toml` supports all possible configurations from [toml.io](https://toml.io/en/).
109
+
- Helps with interaction towards Robot Framework through its CLI API.
110
+
-**Every** CLI argument from Robot Framework has a configuration analog in `robot.toml`.
111
+
- There are different ways of defining values in the toml file.
35
112
- Creating configuration profiles for different environments.
113
+
-`robotcode config files` shows you all the `robot.toml` configuration files.
114
+
-`robot.toml` files exist for the user space and project space.
115
+
- Settings in the project space overwrite user space and local space overwrites project space.
116
+
- All configurations for Python = `pyproject.toml`.
117
+
- All configurations for Robot Framework = `robot.toml`.
118
+
- Local Configuration for overwriting `robot.toml` = `.robot.toml`.
119
+
- This file is not meant to be pushed to Git.
120
+
- Hierarchy of the files:
121
+
- Default user space.
122
+
- Project space.
123
+
- Local space.
124
+
-`robotcode config root` gives you the root directory, which is dependent on the position of the `robot.toml` file.
125
+
-`robotcode config info` gives you information on the config files.
126
+
-`robotcode profiles show` shows you the configuration with your selected profiles.
127
+
- Run Robot Framework files with specific profiles: `robotcode -p profile_a -p profile_b robot`.
128
+
-`[variables]` at the root level of the `robot.toml` file are used by all profiles.
129
+
- EXCEPT: using profiles with `[profiles.profile_a.variables]`.
130
+
- All variables in here are specific to the profile and ignore the root-level `[variables]`.
131
+
- When using `[profiles.profile_a.extend-variables]` the root-level variables are extended, meaning:
132
+
- Root-level existing variables are replaced, if specified again.
133
+
- Root-level existing variables are taken into the profile, if not again specified.
134
+
- Profile-specific variables are included as well.
135
+
-`robotcode debug`.
136
+
-`robotcode analyze` is a static code analyzer for your project.
137
+
- Analyzer Errors, Warnings, and Hints can be ignored by commenting `# robotcode: ignore[KeywordNotFound]`.
138
+
- This ignoring is indentation dependent!!
139
+
- Resetting the settings can be done by `robotcode: reset[KeywordNotFound]`.
140
+
- Configure within `robot.toml`:
141
+
142
+
```toml
143
+
[tool.robotcode-analyze.modifiers]
144
+
ignore=[KeywordNotFound]
145
+
```
146
+
36
147
- Splitting configuration into multiple files for modularity.
37
148
38
-
5. Command Line Interface (CLI) Tools:
149
+
5. **Command Line Interface (CLI) Tools:**
39
150
- Retrieving valuable information about your project.
151
+
- `robotcode` will give you all commands with descriptions.
152
+
- `robotcode discover` will give information about Suites, Test Cases.
153
+
- `robotcode discover all .` to look for whole project information.
154
+
- Filter test cases with robot options.
155
+
- e.g `include/exclude` tags etc.
156
+
- `--format` Option for printing results in a wanted format e.g. json for reuse in different projects.
157
+
- Excludes all files that are ignored within [.gitignore](http://_vscodecontentref_/0).
158
+
- Alternative: create `.robotignore` for excluding it from `robotcode discover` and speed up the discovery process or exclude local files for personal usage.
40
159
- Analyzing your project to identify improvements.
160
+
- `robotcode analyze`.
41
161
- Running tests directly from the command line.
42
162
- Implementing git hooks to streamline your development workflow.
43
163
- Best practices for effective CLI usage.
44
164
45
-
6. Integrating CI/CD Processes:
165
+
6. **Integrating CI/CD Processes:**
46
166
- Executing tests within a CI/CD pipeline.
167
+
- Use `robot.toml` profiles to run CI settings on a local machine.
168
+
- Ensure the CI process is low in complexity and mimics the steps done on the local machine as closely as possible.
47
169
- Debugging test runs in CI/CD environments.
48
170
- Best practices for continuous integration and deployment.
171
+
- Keep the CI pipeline simple and maintainable.
172
+
- Use the same `robot.toml` profiles for both local and CI environments to ensure consistency.
173
+
- Automate as much as possible to reduce manual intervention and errors.
49
174
50
-
7. Collaborating with Distributed Teams:
175
+
7. **Collaborating with Distributed Teams:**
51
176
- Structuring and packaging Robot Framework projects for team collaboration.
52
177
- Sharing and utilizing resources and libraries across multiple teams and projects.
53
178
- Best practices for working in distributed development environments.
179
+
- Step-by-step guide on building your resource files from `src/demo` via Hatch to create a `.wheel` file:
180
+
1. Ensure you have Hatch installed:
181
+
182
+
```sh
183
+
pip install hatch
184
+
```
185
+
186
+
2. Navigate to your project directory:
187
+
188
+
```sh
189
+
cd /path/to/your/project
190
+
```
191
+
192
+
3. Create a `pyproject.toml` file in the root of your project with the following content:
193
+
194
+
```toml
195
+
[build-system]
196
+
requires = ["hatchling"]
197
+
build-backend = "hatchling.build"
198
+
199
+
[project]
200
+
name = "your_project_name"
201
+
version = "0.1.0"
202
+
description = "Your project description"
203
+
readme = "README.md"
204
+
requires-python = ">=3.7"
205
+
license = {text = "MIT"}
206
+
207
+
[tool.hatch.build.targets.wheel]
208
+
packages = ["src/demo"]
209
+
```
210
+
211
+
4. Build the `.wheel` file:
212
+
213
+
```sh
214
+
hatch build
215
+
```
216
+
217
+
5. The `.wheel` file will be created in the `dist` directory. This file can then be uploaded to any package registry or distributed to other teams in different ways.
218
+
- Integrate this process into the CI pipeline, e.g., with every new release:
219
+
- Add the following steps to your CI configuration:
220
+
221
+
```yaml
222
+
jobs:
223
+
build:
224
+
runs-on: ubuntu-latest
225
+
steps:
226
+
- uses: actions/checkout@v2
227
+
- name: Set up Python
228
+
uses: actions/setup-python@v2
229
+
with:
230
+
python-version: '3.x'
231
+
- name: Install Hatch
232
+
run: pip install hatch
233
+
- name: Build wheel
234
+
run: hatch build
235
+
- name: Upload wheel to registry
236
+
run: |
237
+
twine upload dist/*.whl
238
+
```
239
+
240
+
- Commands for participants to try the distribution with Hatch themselves:
241
+
242
+
1. Navigate to your project directory:
243
+
244
+
```sh
245
+
cd /path/to/your/project
246
+
```
247
+
248
+
2. Create a `pyproject.toml` file as described above.
249
+
3. Build the `.wheel` file:
250
+
251
+
```sh
252
+
hatch build
253
+
```
254
+
255
+
4. Distribute the `.wheel` file as needed.
54
256
55
257
## Who Should Attend
56
258
@@ -60,7 +262,7 @@ Participants will gain hands-on experience and learn best practices to enhance t
60
262
61
263
## Methodology
62
264
63
-
The workshop combines lectures, live demonstrations, and hands-on exercises.
265
+
The workshop combines lectures, live demonstrations, and hands-on exercises.
0 commit comments