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

Make EOS packable by Python/PyPI #115

Merged
merged 5 commits into from
Oct 7, 2024
Merged

Conversation

b0661
Copy link
Collaborator

@b0661 b0661 commented Oct 6, 2024

I'm interested in using EOS as a library and application to be provided by PyPI

The current directory structure does not support that easily. This pull request changes the directory layouts following best practise suggested in the Python packaging tutorial.

As EOS as a package name is already in use in PyPI the package project name akkudoktor-eos is used. Packages shall not have a dash in Python, therefor the lengthy akkudoktoreos is used.

The pull request moves and adapts source and test files. The directory structure is adapted to:

├── LICENSE
├── pyproject.toml
├── README.md
├── src/
│ └── akkudoktoreos/ ------------------ the library (mostly from current modules directory)
│ ├── init.py
│ ├── class_akku.py
│ └── ....py
│ └── akkudoktoreosserver/ -------- the flask server
│ ├── init.py
│ └── flask_server.py
└── tests/
└── ... as now, besides modules/

The pull request passed the tests and and the flask server also runs.

Docker will not work as the Dockerfile is not adapted.

This pull request closes #114.

Discussed in #106

Originally posted by b0661 October 6, 2024

Cheers
Bobby

@drbacke
Copy link
Collaborator

drbacke commented Oct 6, 2024

We should directly create an issue due to Docker.
Also some problems to fix (@Checks).

Copy link
Collaborator

@drbacke drbacke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct the failing checks

@b0661
Copy link
Collaborator Author

b0661 commented Oct 6, 2024

Please correct the failing checks

Corrected. Sorry did not remember to install pre-commit to my local repo.

pyproject.toml Outdated Show resolved Hide resolved
Add packaging information and make it usable by Makefile.

Signed-off-by: Bobby Noelte <[email protected]>
@b0661
Copy link
Collaborator Author

b0661 commented Oct 6, 2024

We should directly create an issue due to Docker. Also some problems to fix (@Checks).

Adapted the Dockerfile. This is untested.

@dsiebel, @michaelosthege, could you have a look on the Dockerfile. I think it has to be changed anyway as mariadb is now gone.

@b0661 b0661 requested a review from drbacke October 6, 2024 20:27
@drbacke drbacke merged commit efd32b9 into Akkudoktor-EOS:main Oct 7, 2024
2 checks passed
@b0661 b0661 deleted the pr_packaging branch October 8, 2024 14:20
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.

Make EOS packable by Python/PyPI
3 participants