Skip to content

Commit

Permalink
CI: Add prettier style check (#1961)
Browse files Browse the repository at this point in the history
- CI: Add prettier style check
- Format everything accordingly
  • Loading branch information
mwestphal authored Jan 31, 2025
1 parent 7c97869 commit 2ac4c07
Show file tree
Hide file tree
Showing 83 changed files with 1,677 additions and 1,544 deletions.
17 changes: 9 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is, a screenshot helps a lot.

**To Reproduce**
Steps to reproduce the behavior:
1. Open the file using `f3d --no-config example.glb`
2. step 2
3. step 3

1. Open the file using `f3d --no-config example.glb`
2. step 2
3. step 3

**Expected behavior**
A clear and concise description of what you expected to happen.

**System Information:**
- OS:
- GPU and GPU driver:

- OS:
- GPU and GPU driver:

**F3D Information**
Paste the content of `f3d --version`:
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand All @@ -21,4 +20,4 @@ Add any other context or screenshots about the feature request here.

**Contribution**
Please tell us if you are able to contribute (Can you develop this new feature?)
Don't worry, you can still post a feature request if you cannot contribute!*
Don't worry, you can still post a feature request if you cannot contribute!
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/help_wanted.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Open to contribution
about: A maintainer specific template
title: ''
labels: help-wanted
assignees: ''

title: ""
labels: help-wanted
assignees: ""
---

**Context**
Expand Down
21 changes: 13 additions & 8 deletions .github/ISSUE_TEMPLATE/new_release.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: New release
about: An issue to create a new release
title: ''
title: ""
labels: release
assignees: ''

assignees: ""
---

When creating this issue
Expand Down Expand Up @@ -35,9 +34,9 @@ Release Candidates :
- [ ] Locally test the python wheels on macOS (Silicon)
- [ ] Locally test the python wheels on Windows
- If it fails,
- [ ] Fix the issues in `release` branch,
- [ ] Edit this issuethis paragraph and increment `N`
- [ ] Merge F3D release into master: https://github.com/f3d-app/f3d/compare/master...release
- [ ] Fix the issues in `release` branch,
- [ ] Edit this issuethis paragraph and increment `N`
- [ ] Merge F3D release into master: https://github.com/f3d-app/f3d/compare/master...release
- [ ] Else proceed to the next part

Release :
Expand All @@ -64,6 +63,7 @@ Release :
- [ ] Update `.github/ISSUE_TEMPLATE/new_release.md` in https://github.com/f3d-app/f3d if needed

Linux testing protocol:

- Install F3D-X.Y.Z-RCN-Linux-x86_64-raytracing system wide
- `f3d testing/data/cow.vtp` -> check render, orientation, press R and check raytracing
- `f3d testing/data/f3d.stp` -> check render, orientation
Expand All @@ -81,6 +81,7 @@ Linux testing protocol:
- `./cpp/render-interact/render-interact ../../../testing/data/cow.vtp`

macOS testing protocol:

- Install F3D-X.Y.Z-RCN-macOS-x86_64-raytracing.dmg
- Double click on cow.vtp, check render and orientation, press R and check raytracing
- Double click on f3d.stp, check render and orientation
Expand All @@ -92,6 +93,7 @@ macOS testing protocol:
- Press "Esc" and check the following commands `reload_current_file_group`, `set_camera top`, `toggle_volume_rendering`, `exit`

Windows testing protocol:

- Install F3D-X.Y.Z-RCN-Windows-x86_64-raytracing.exe, add F3D to path for all users
- Start -> Disk Cleanup -> select thumbnails -> Ok -> Delete Files
- Open testing/data directory in file manager
Expand All @@ -109,16 +111,19 @@ Windows testing protocol:
- `.\cpp\render-interact\Release\render-interact ..\..\..\testing\data\cow.vtp`

Python testing protocol:

- Use a venv or make sure f3d is not installed in your python environment
- pip install f3d==X.Y.Z-RCN
- python

```
import f3d
eng = f3d.Engine.create()
eng.scene.add("/path/to/cow.vtp")
eng.window.render() # No effect on Windows
eng.interactor.start()
```

- Check the following
- The name of the window is `f3d` at all time
- Python provides suggestions whenever the "Tab" key is pressed
- The name of the window is `f3d` at all time
- Python provides suggestions whenever the "Tab" key is pressed
6 changes: 6 additions & 0 deletions .github/workflows/style-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ jobs:
with:
options: "--check --verbose --include '(\\.py|\\.py\\.in)'"
src: "./python"
- name: Prettier Formatting
uses: creyD/[email protected]
with:
dry: True
prettier_options: '-c **/*.{js,json,md,html}'


codespell-check:
name: Codespell Check
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testing/configs/invalid.json
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior 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,
- 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
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
- 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,
- 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
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If not, you may want to look at our [getting started guide](doc/dev/GETTING_STAR
Once you are able to build F3D, you may want to take a look at the open [issues](https://github.com/f3d-app/f3d/issues)!
If you are a beginner, you may want to look at ["good first issues"](https://github.com/f3d-app/f3d/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).
If you already have some experience with programming and contribution, definitely look at ["help wanted"](https://github.com/f3d-app/f3d/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) issues.
If an issue is interesting to you and is not yet assigned, then you should *comment on the issue* and ask for any help or clarification needed.
If an issue is interesting to you and is not yet assigned, then you should _comment on the issue_ and ask for any help or clarification needed.
F3D maintainers will see your comment, assign the issue to you and provide guidance as needed.

To get involved more deeply, please take a look at the [roadmaps](doc/dev/ROADMAPS_AND_RELEASES.md) for the upcoming releases.
Expand All @@ -38,6 +38,7 @@ Another way to get started is to improve the documentation, look for typos, or i
## F3D Development Workflow

F3D uses [GitLab Flow](https://about.gitlab.com/topics/version-control/what-is-gitlab-flow/). In a few words, here is how to contribute:

- [Fork](https://github.com/f3d-app/f3d/fork) the F3D repository on GitHub.
- Create and push a feature branch on your fork containing new commits.
- When it is ready for review or when you want to run the CI, create a pull request against `f3d-app/f3d/master`.
Expand Down Expand Up @@ -69,13 +70,15 @@ that impact developers that build F3D. "For F3D packagers" are changes that impa
## F3D Architecture

F3D is divided into different components:

- The `f3d` executable, in the `application` folder.
- The `libf3d` library, in the `library` folder.
- The extensions to VTK, in the `vtkext` folder.
- The bindings for Python, Java, and WebAssembly, in their respective folders.
- The plugins, providing all the different readers in the plugins directory.

The extensions to VTK are divided into two modules:

- The [private module](vtkext/private) is used exclusively by `libf3d`.
- The [public module](vtkext/public) is used by `libf3d` and also by plugins. Additional documentation can be found in [PLUGINS.md](doc/libf3d/PLUGINS.md).

Expand Down
10 changes: 5 additions & 5 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
BSD 3-Clause License

* Copyright 2019-2021 Kitware SAS
* Copyright 2021-2024 Michael Migliore, Mathieu Westphal
- Copyright 2019-2021 Kitware SAS
- Copyright 2021-2024 Michael Migliore, Mathieu Westphal

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
- Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![CI](https://img.shields.io/github/actions/workflow/status/f3d-app/f3d/ci.yml?label=CI&logo=github)](https://github.com/f3d-app/f3d/actions/workflows/ci.yml) [![Packaging](https://img.shields.io/github/actions/workflow/status/f3d-app/f3d-superbuild/nightly.yml?label=Packaging&logo=github)](https://github.com/f3d-app/f3d-superbuild) [![codecov](https://codecov.io/gh/f3d-app/f3d/branch/master/graph/badge.svg?token=siwG82IXK7)](https://codecov.io/gh/f3d-app/f3d) [![Downloads](https://img.shields.io/github/downloads/f3d-app/f3d/total.svg)](https://github.com/f3d-app/f3d/releases) [![Sponsors](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/f3d-app) [![Discord](https://discordapp.com/api/guilds/1046005690809978911/widget.png?style=shield)](https://discord.f3d.app) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)

# F3D - Fast and minimalist 3D viewer

By Michael Migliore and Mathieu Westphal.

<img src="https://raw.githubusercontent.com/f3d-app/f3d/master/resources/logo.svg" align="left" width="20px"/>
Expand All @@ -13,15 +14,15 @@ F3D also contains the libf3d, a simple library to render meshes, with a C++17 AP

<img src="https://user-images.githubusercontent.com/3129530/194735416-3f386437-456c-4145-9b5e-6bb6451d7e9a.png" width="640">

*A typical render by F3D*
_A typical render by F3D_

<img src="https://user-images.githubusercontent.com/3129530/194735261-dd6f1c1c-fa57-47b0-9d27-f735d18ccd5e.gif" width="640">

*Animation of a glTF file within F3D*
_Animation of a glTF file within F3D_

<img src="https://user-images.githubusercontent.com/3129530/194735272-5bcd3e7c-a333-41f5-8066-9b0bec9885e8.png" width="640">

*A direct scalars render by F3D*
_A direct scalars render by F3D_

See the [gallery](doc/GALLERY.md) for more images, take a look at the [changelog](doc/CHANGELOG.md) or go to the [install guide](doc/user/INSTALLATION.md) to download and install F3D!

Expand All @@ -32,9 +33,10 @@ If you need any help or want to discuss with other F3D users and developers, hea
# Quickstart

Open a file directly in F3D or from the command line by running:

```
f3d /path/to/file.ext
```
```

Optionally, append `--output=/path/to/img.png` to save the rendering into an image file.

Expand Down
11 changes: 9 additions & 2 deletions _includes/head_custom.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
<link rel="shortcut icon" href="https://raw.githubusercontent.com/f3d-app/f3d/master/resources/logo.ico" type="image/x-icon">
<script type="application/javascript" src="{{ site.baseurl }}/assets/main.js"></script>
<link
rel="shortcut icon"
href="https://raw.githubusercontent.com/f3d-app/f3d/master/resources/logo.ico"
type="image/x-icon"
/>
<script
type="application/javascript"
src="{{ site.baseurl }}/assets/main.js"
></script>
5 changes: 3 additions & 2 deletions assets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function enhance_install_page() {
button.classList = "btn btn-primary";
button.innerHTML = "Ok";
button.addEventListener("click", function () {
popup.remove();
popup.remove();
});
popup.append(button);

Expand Down Expand Up @@ -79,7 +79,8 @@ function enhance_install_page() {
link.setAttribute("href", url);
link.setAttribute("class", i++ ? "btn" : "btn btn-primary");
link.innerHTML = `<div>Get <b>F3D</b> for ${bolded_platform}</div><small>${filename}</small>`;
if (current_os === "MacOS") link.addEventListener("click", open_mac_warning_popup);
if (current_os === "MacOS")
link.addEventListener("click", open_mac_warning_popup);
div.append(link);
}
const note = document.createElement("div");
Expand Down
Loading

0 comments on commit 2ac4c07

Please sign in to comment.