Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially document code #21

Merged
merged 6 commits into from
Mar 2, 2023
Merged

Partially document code #21

merged 6 commits into from
Mar 2, 2023

Conversation

c71n93
Copy link
Member

@c71n93 c71n93 commented Feb 27, 2023

Closes #19. Documented only classes, which are involved in the generation of the Prolog file. Classes, that interact with xmir files, such as PrologInteractor and FileTransformer should be rewritten.

@c71n93
Copy link
Member Author

c71n93 commented Feb 27, 2023

@yegor256 take a look, please

@yegor256
Copy link
Member

@mximp please, check this one

@yegor256 yegor256 requested a review from mximp February 28, 2023 11:57
@mximp
Copy link

mximp commented Feb 28, 2023

@c71n93 Please check this blog post. I believe the whole OO design of the classes here should be redesigned. It's better to have "real world" entities (with names as meaningful nouns) which have clear interfaces. As an example of first step, PlGenerator seems to be PrologScrirpt which encapsulates destination for a script:

class PrologScript {
    private Path destination;

    fun get() {
        // logic to generate the script content
    }
}

It's probably the subject of next PR

@c71n93
Copy link
Member Author

c71n93 commented Feb 28, 2023

@c71n93 Please check this blog post. I believe the whole OO design of the classes here should be redesigned. It's better to have "real world" entities (with names as meaningful nouns) which have clear interfaces. As an example of first step, PlGenerator seems to be PrologScrirpt which encapsulates destination for a script:

class PrologScript {
    private Path destination;

    fun get() {
        // logic to generate the script content
    }
}

It's probably the subject of next PR

@mximp I agree, that all code need redesign. But I think it should be done gradually, in the process of closing other issues.

In this PR, I decided not to refactor the code, because it don't have enough tests. Without unit tests, something may break during refactoring.

@c71n93 c71n93 mentioned this pull request Feb 28, 2023
@c71n93
Copy link
Member Author

c71n93 commented Mar 1, 2023

@mximp I have fixed all issues. Take a look, please.

@c71n93
Copy link
Member Author

c71n93 commented Mar 2, 2023

@mximp take a look please

@c71n93
Copy link
Member Author

c71n93 commented Mar 2, 2023

@yegor256 could you merge please?

@yegor256
Copy link
Member

yegor256 commented Mar 2, 2023

@rultor merge

@rultor
Copy link
Contributor

rultor commented Mar 2, 2023

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit f561921 into objectionary:master Mar 2, 2023
@rultor
Copy link
Contributor

rultor commented Mar 2, 2023

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 2min)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document the code
4 participants