Skip to content

Commit 0db7761

Browse files
Merge pull request #25 from RocketPy-Team/doc/improve-readme
DOC: Improve README
2 parents fca09d2 + 40819d7 commit 0db7761

7 files changed

+112
-45
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
3+
4+
name: Publish New Version to PyPI
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: "3.9"
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install build
27+
- name: Build package
28+
run: python -m build
29+
- name: Publish package
30+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
31+
with:
32+
user: __token__
33+
password: ${{ secrets.PYPI_API_TOKEN }}

README.md

Lines changed: 77 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
1+
<picture>
2+
<source media="(prefers-color-scheme: dark)" srcset="./static/LogoWhiteonTransparentBG-ByRocketeersForRocketeers.png">
3+
<source media="(prefers-color-scheme: light)" srcset="./static/LogoBlackonTransparentBG-ByRocketeersForRocketeers.png">
4+
<img alt="RocketPy Logo" src="https://raw.githubusercontent.com/RocketPy-Team/RocketPy/master/docs/static/RocketPy_Logo_black.png">
5+
</picture>
6+
7+
<br>
8+
9+
[![Documentation Status](https://readthedocs.org/projects/rocketpyalpha/badge/?version=latest)](https://docs.rocketpy.org/en/latest/?badge=latest)
10+
[![Chat on Discord](https://img.shields.io/discord/765037887016140840?logo=discord)](https://discord.gg/b6xYnNh)
11+
[![Sponsor RocketPy](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/RocketPy-Team)
12+
[![Instagram](https://img.shields.io/badge/Instagram-E4405F?style=flat&logo=instagram&logoColor=white)](https://www.instagram.com/rocketpyteam)
13+
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=flat&logo=linkedin&logoColor=white)](https://www.linkedin.com/company/rocketpy)
14+
15+
<br>
16+
117
# Rocket Serializer
218

3-
Rocket Serializer is a Python library that provides serialization capabilities
4-
for OpenRocket files. It allows you to read OpenRocket files using a simple and
5-
intuitive command line interface.
19+
`rocketserializer` is a Python library that provides serialization capabilities
20+
for OpenRocket files. It allows you to read OpenRocket files (.ork) using a
21+
simple and intuitive command line interface. After serializing the file, you
22+
can use the data to create your RocketPy simulation.
23+
24+
## Example
25+
26+
<img src="./static/demo_2.gif" width="100%" />
627

728
## Installation
829

9-
You can install Rocket Serializer using pip:
30+
You can install `rocketserializer` using pip:
1031

1132
```shell
12-
pip install rocket-serializer
33+
pip install rocketserializer
1334
```
1435

1536
## Requirements
1637

1738
### Java
1839

19-
You need Java to be installed on your system to use Rocket Serializer.
40+
You need Java to be installed on your system to use `rocketserializer`.
2041
We recommend downloading Java 17, which is required to run OpenRocket-23.09.
2142

2243
https://www.oracle.com/java/technologies/downloads/
@@ -33,77 +54,89 @@ correct java version to run the jar file.
3354

3455
### Python Packages
3556

36-
Once you download the package `rocket-serializer`, the following dependencies
57+
Once you download the `rocketserializer` package, the following dependencies
3758
will be automatically installed:
3859

3960
- bs4
40-
- click
61+
- click>=8.0.0
4162
- lxml
4263
- numpy
43-
- orhelper
64+
- orhelper==0.1.3
4465
- pyyaml
45-
- rocketpy
46-
- nbformat
66+
- rocketpy>=1.1.0
67+
- nbformat>=5.2.0
4768

4869
## Usage - command line interface
4970

50-
To use Rocket Serializer, you just need to use the cli option of the library.
51-
Here's an example:
71+
The `rocketserializer` package will automatically install 2 command-line-interface (cli)
72+
options, here's an example:
73+
74+
### Serialization
75+
76+
To create a `parameters.json` file from an OpenRocket file, use the following command:
77+
78+
```bash
79+
ork2json --filepath your_rocket.ork
80+
```
81+
82+
Or, for a more verbose output, you can use the following command:
5283

5384
```bash
54-
rocket-serializer ork2json --filepath path/to/input.ork --output path/to/output
85+
ork2json --filepath your_rocket.ork --verbose True
5586
```
5687

5788
The options are the following:
5889

5990
- `--filepath`: The .ork file to be serialized.
60-
- `--output` : Path to the output folder. If not set, the output will be saved in the same folder os the filepath.
61-
- `--eng` : Path to the engine file. If not set, the library will get the thrust curve from the OpenRocket file.
91+
- `--output` : Path to the output folder. If not set, the output will be saved in the same folder as the `filepath`.
6292
- `--ork_jar` : Specify the path to the OpenRocket jar file. If not set, the library will try to find the jar file in the current directory.
93+
- `--encoding` : The encoding of the .ork file. By default, it is set to `utf-8`.
6394
- `--verbose` : If you want to see the progress of the serialization, set this option to True. By default, it is set to False.
6495

96+
Only the `--filepath` option is mandatory.
97+
98+
### Creating a simulation notebook
99+
100+
```bash
101+
ork2notebook --filepath your_rocket.ork
102+
```
103+
104+
The options are pretty much the same as the serialization command!
105+
65106
### Limitations
66107

67108
This code won't work for your rocket if it has any of the following features:
68109

69-
- Your file wasn't saved in English
70-
- Your file doesn't contain simulation data
71-
- Your rocket has more than one stage
72-
- Your rocket has more than one engine
73-
- Your rocket has more than one nosecone
110+
- Your .ork file must be saved in English
111+
- Your .ork file must be saved with at least 1 simulation data
112+
- Only one single stage is supported
113+
- Only a single motor is supported
114+
- Only a single nose cone is supported
74115

75-
### Deserialization
116+
## Roadmap
76117

77-
Still to be done.
118+
- 2024 June : First public release, start receiving feedback from the community.
78119

79-
## License
80-
81-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
120+
Before the first public release, we will listen to the community's feedback before defining the roadmap for the next releases.
82121

83122
## Contact
84123

85-
For any inquiries or feedback, please email us at [rocketpyteam@gmail.com](mailto:rocketpyteam@gmail.com).
86124
If you find any bug or if you want to request new features, please open an issue
87125
on GitHub.
88-
89-
## Contributors
90-
91-
This project is maintained by the RocketPy Team, a group of students and
92-
software developers from all over the world.. The main contributors to this
93-
project are:
94-
95-
- Patrick Sampaio Brandão
96-
- Franz Masatoshi Yuri
97-
- Guilherme Fernandes Alves
126+
In case you don't have a GitHub account, you can reach out to us on RocketPy's
127+
Discord server.
98128

99129
## How to Contribute
100130

101131
The 3 main ways of contributing to this project are:
102132

103-
1. Reporting bugs and suggesting new features by opening issues on GitHub.
104-
2. Submitting .ork files that can be used to test the library.
105-
3. Developing new features and fixing bugs by opening pull requests on GitHub.
106-
107-
## More Information
108-
109-
For more information, please visit the [RocketPy Team GitHub repository](https://github.com/RocketPy-Team/OpenRocketSerializer).
133+
1. **Reporting bugs and suggesting new features.**
134+
- Use GitHub, preferably, to report bugs and suggest new features.
135+
- In case you don't have a GitHub account, you can reach out to us on RocketPy's Discord server
136+
2. **Sharing .ork files that can be used to test the library.**
137+
- If you have a .ork file that is not working with the library, please share it with us.
138+
- If you have a .ork file that is working with the library, please share it with us.
139+
- If you allow us to use and share your .ork file, we can add it to the test suite.
140+
3. **Developing new features and fixing bugs thorough pull requests on GitHub.**
141+
- If you want to develop new features, you are more than welcome to do so.
142+
- Please reach out to the maintainers to discuss the new feature before starting the development.

rocketserializer/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ def ork2notebook(filepath, output, ork_jar=None, encoding="utf-8", verbose=False
211211
the .ipynb file.
212212
"""
213213
if not output:
214-
output = os.path.dirname(filepath)
214+
filepath = Path(filepath)
215+
output = filepath.parent
215216
logger.warning(
216217
"[ork2notebook] Output folder not specified. Using '%s' instead.",
217218
Path(output).as_posix(),
Loading
Loading

static/demo.gif

1.86 MB
Loading

static/demo_2.gif

7.05 MB
Loading

0 commit comments

Comments
 (0)