Skip to content

Commit 3183de1

Browse files
authored
Merge pull request #108 from plx-pdg/prepare-release-v0.2.0
Prepare release v0.2.0
2 parents 2deb329 + 88ac05f commit 3183de1

File tree

15 files changed

+79
-49
lines changed

15 files changed

+79
-49
lines changed

CHANGELOG.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,40 @@ Take this line and fix version with current ($CV)
1313
### Added
1414
### Changed
1515
16-
## [$CV without v!](https://github.com/plx-pdg/plx/compare/$CV...HEAD) - $DATE
16+
## [$CV without v!](https://github.com/plx-pdg/plx/compare/$CV before...$CV now) - $DATE
1717
-->
1818

19-
## [Unreleased](https://github.com/plx-pdg/plx/compare/v0.1.2...HEAD)
19+
## [Unreleased](https://github.com/plx-pdg/plx/compare/v0.2.0...HEAD)
2020

2121
### Added
2222
### Changed
2323

24-
## [0.1.2](https://github.com/plx-pdg/plx/compare/v0.1.2...HEAD) - 2024-08-26
24+
## [0.2.0](https://github.com/plx-pdg/plx/compare/v0.1.2...v0.2.0) - 2024-09-06
25+
26+
### Added
27+
- Home page with ASCII art, quick help and tagline
28+
- Help page to see all shortcuts and alternatives
29+
- List page to browse skills and exos list
30+
- Exo preview inside List page to show exo instruction without starting to compile it
31+
- Train page to do an exo from start to end
32+
- Automatic reload of checks when saving one of the exo files
33+
- Open `$EDITOR` (only GUI IDE right now) when opening a new exo
34+
- Show checks details with a nice word level diff generated by `similar`.
35+
- Show a Solution page with basic syntax highlighting via `syntect`
36+
- Support an exo structure with course - skills - exo hierarchy, with metadata described in TOML
37+
- Enable parsing TOML files directly into Rust structs using `serde` and `toml` crates.
38+
- Generate a lot of various errors for parsing, process and workers execution. We don't display them yet. When running `plx` in a folder without `course.toml`, the TUI will not start. It only displays skills and exos that were successfully parsed.
39+
- Create examples exos for manual and automated testings under folder `examples`
40+
- Switch to next exo when exo is done
41+
- Start to store exo state (In progress, Done) but this is not fully working, therefore not displayed
42+
- Create a logo ! Inspired from Delibay and PRJS gradient styles
43+
- Write logs to `debug.log` via crate `log` and `simplelog` to see events received by core and not make noise in the UI
44+
45+
### Changed
46+
- Run CI with macos runner, in addition to Ubuntu and Windows
47+
- Rewrite a concise README in English and include it for `crates.io` release
48+
49+
## [0.1.2](https://github.com/plx-pdg/plx/compare/v0.1.1...v0.1.2) - 2024-08-26
2550

2651
### Added
2752
- Trivial change to show CI release

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ homepage = "https://github.com/plx-pdg/plx"
55
repository = "https://github.com/plx-pdg/plx"
66
license-file = "LICENSE"
77
readme = false
8-
version = "0.1.2"
8+
version = "0.2.0"
99
edition = "2021"
10-
exclude = ["*.md"]
10+
exclude = ["examples"]
1111

1212
[dependencies]
1313
console = "0.15.8"

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
[Git repository of PLX](https://github.com/plx-pdg/plx) -
1212
[Git repository of this website](https://github.com/plx-pdg/plx-pdg.github.io)
1313

14-
1514
### Introduction
1615

1716
PLX is a project developed to enhance the learning of programming languages, with a focus on a smooth and optimized learning experience. The goal of this project is to reduce the usual friction involved in completing coding exercises (such as manual compilation, running, testing, and result verification) by automating these steps.
@@ -55,7 +54,7 @@ On Linux and MacOS, you can easily change `EDITOR` just for PLX, here is an exam
5554
EDITOR=code plx
5655
```
5756

58-
The useful shortcuts are defined under shortcut `?`, you can mostly type `l`, `j` or `k` to move up and down, until you you reach the exo, then the editor should open and then you can do the exo (or just fill the solution next to it see `.sol.c` file), save and see changes...
57+
The useful shortcuts are defined under shortcut `?`, `j` or `k` to move up and down, you can mostly type `l`, until you reach the exo, then the editor should open and then you can do the exo (or just fill the solution next to it see `.sol.c` file), save and see changes...
5958

6059
### Building from source
6160

@@ -71,7 +70,29 @@ git clone [email protected]:plx-pdg/plx.git
7170
cargo build --release
7271
```
7372

74-
This will install all necessary dependencies and build the program
73+
This will install all necessary dependencies and build the program in release mode.
74+
75+
To run it
76+
```bash
77+
cargo run
78+
```
79+
80+
**Install from source**
81+
```bash
82+
cargo install --path .
83+
```
84+
85+
### Running tests
86+
87+
```sh
88+
cargo test
89+
```
90+
91+
### Showing Rust code documentation
92+
You can easily see all our code comments in a nice web page.
93+
```sh
94+
cargo doc --open
95+
```
7596

7697
### Contributing
7798

src/app/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl App {
164164
/// Stops the UI
165165
/// Useful if we want to restart the UI
166166
///
167-
fn stop_ui(&mut self) {
167+
fn _stop_ui(&mut self) {
168168
if let Ok(mut work_handler) = self.work_handler.lock() {
169169
work_handler.stop_workers(WorkType::Ui);
170170
}

src/app/errors.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ impl fmt::Display for CompilationStartError {
2323
/// Represents a start exo error
2424
/// See `App::start_exo`
2525
pub(super) enum StartExoFail {
26-
CouldNotLaunchEditor,
2726
CouldNotStartCompilation(CompilationStartError),
2827
}
2928
impl fmt::Display for StartExoFail {
3029
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3130
match self {
32-
StartExoFail::CouldNotLaunchEditor => write!(f, "Error launching editor"),
3331
StartExoFail::CouldNotStartCompilation(err) => write!(f, "{}", err),
3432
}
3533
}

src/app/exo_status_report.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl ExoStatusReport {
3434
}
3535
}
3636

37-
/// Helper function to get a Vec<CheckState> from check results
37+
/// Helper function to get a `Vec<CheckState>` from check results
3838
/// Useful to send the check states to the Ui
3939
/// Check `UiState::CheckResults` for more information
4040
pub(super) fn to_vec_check_state(&self) -> Vec<CheckState> {

src/app/key_press.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl App {
1717
Key::L | Key::Enter => self.on_l(), // Currently L and Enter do the same thing
1818
Key::N => self.on_n(),
1919
Key::P => self.on_p(),
20-
Key::E => {}
20+
// Key::E => {}
2121
Key::Esc => self.on_esc(),
2222
Key::Interrogation => self.on_interrogation(),
2323
}

src/core/work/work_handler.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ use std::{
88
thread::{self, JoinHandle},
99
};
1010

11-
use log::info;
12-
1311
use crate::models::event::Event;
1412

1513
use super::{work::Work, work_type::WorkType, worker::Worker};
@@ -20,7 +18,6 @@ pub(crate) enum WorkEvent {
2018

2119
/// Represents all information we have about a specific worker
2220
struct WorkInfo {
23-
id: usize,
2421
work: WorkType,
2522
should_stop: Arc<AtomicBool>,
2623
join_handle: JoinHandle<()>,
@@ -34,14 +31,8 @@ pub struct WorkHandler {
3431
curr_work_id: usize,
3532
}
3633
impl WorkInfo {
37-
fn new(
38-
id: usize,
39-
work: WorkType,
40-
should_stop: Arc<AtomicBool>,
41-
join_handle: JoinHandle<()>,
42-
) -> Self {
34+
fn new(work: WorkType, should_stop: Arc<AtomicBool>, join_handle: JoinHandle<()>) -> Self {
4335
WorkInfo {
44-
id,
4536
work,
4637
should_stop,
4738
join_handle,
@@ -91,7 +82,7 @@ impl WorkHandler {
9182
);
9283
let join_handle = worker.run_on_separate_thread();
9384
self.workers
94-
.insert(id, WorkInfo::new(id, work_type, stop, join_handle));
85+
.insert(id, WorkInfo::new(work_type, stop, join_handle));
9586
id
9687
}
9788

src/models/key.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub enum Key {
1010
L,
1111
N,
1212
P,
13-
E,
13+
// E,
1414
Enter,
1515
Esc,
1616
Interrogation,
@@ -28,7 +28,7 @@ impl Key {
2828
Key::L => "Move right",
2929
Key::N => "Next block",
3030
Key::P => "Previous block",
31-
Key::E => "Edit exercise",
31+
// Key::E => "Edit exo",
3232
Key::Enter => "Enter to continue",
3333
Key::Esc => "Go back",
3434
Key::Interrogation => "View help",

0 commit comments

Comments
 (0)