Skip to content

Commit 83fbf83

Browse files
authored
Merge pull request #16 from root-hbx/release/v2.0
[Chore] Migrate venv management to uv
2 parents 8a3a8dd + fe5645f commit 83fbf83

5 files changed

Lines changed: 76 additions & 47 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
*.h5
33
*.pyc
44
__pycache__/
5+
6+
# UV virtual environment
7+
.venv/
8+
uv.lock

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

README.md

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,38 +21,46 @@ Now, we have made a major upgrade to StarPerf, extending its usability and enric
2121

2222
Compared with StarPerf 1.0, StarPerf 2.0 is fully implemented in Python and no longer depends on any third-party orbit analysis or computation tools. You only need to ensure that **Python 3.10** or above is installed on your system.
2323

24-
You can install all required dependencies at once using the following commands:
24+
# Installation
25+
26+
We recommend using [uv](https://github.com/astral-sh/uv), a fast Python package and project manager, to manage dependencies and virtual environments for this project.
27+
28+
**(1) Install uv:**
29+
30+
MacOS/Linux:
2531

2632
```bash
27-
cd StarPerf_Simulator
28-
pip install -r requirements.txt
33+
# MacOS/Linux
34+
curl -LsSf https://astral.sh/uv/install.sh | sh
35+
# Alternative for MacOS
36+
brew install uv
2937
```
3038

31-
This will automatically install all necessary libraries to ensure the system runs properly. Specifically, we used the following packages to support the simulation:
32-
33-
- h3==4.0.0b2
34-
- h5py==3.10.0
35-
- numpy==1.24.4
36-
- openpyxl==3.1.2
37-
- importlib-metadata==6.8.0
38-
- skyfield==1.46
39-
- sgp4==2.22
40-
- pandas==2.1.0
41-
- poliastro==0.17.0
42-
- astropy==5.3.3
43-
- networkx==3.1
44-
- requests==2.31.0
45-
- jenkspy==0.4.0
46-
- pyecharts==2.0.4
47-
- global_land_mask==1.0.0
48-
- ephem==4.2
49-
50-
# StarPerf overview and processing flow
39+
Windows:
40+
41+
```powershell
42+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
43+
```
44+
45+
For more installation options, please refer to [official uv documentation](https://docs.astral.sh/uv/getting-started/installation/).
46+
47+
**(2) Installing Dependencies:**
48+
49+
Once you have cloned the repository, you can install all required dependencies using the following `uv` command:
50+
51+
```bash
52+
cd StarPerf_Simulator/
53+
uv sync
54+
```
55+
56+
This will automatically create a virtual environment and install all necessary libraries.
57+
58+
# StarPerf Overview and Processing Flow
5159

5260
You can directly run our simulation example using the following command:
5361

5462
```bash
55-
python3 StarPerf.py
63+
uv run python StarPerf.py
5664
```
5765

5866
Of course, you can also write your own simulation scripts. For specific guidelines and important notes, please refer to [interface\_convention](./docs/interface_convention.pdf).
@@ -76,23 +84,23 @@ http-server -p 8081
7684

7785
5. Open the constellation visualization webpage by entering `http://127.0.0.1:8081/<filename>` in your browser. Here, `<filename>` refers to the name of the webpage file generated by our visualization code under `/StarPerf_Simulator/visualization/CesiumApp`.
7886

79-
# Contributors are more than welcome
87+
# Contributors Are More Than Welcome
8088

81-
Wanna to join the construction of "NewSpace" constellations and networks? Awesome! This project follows the [Github contribution work flow.](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/github-flow) Submissions can fork and use a Github pull request to get merged into this code base.
89+
Wanna join the construction of "NewSpace" constellations and networks? Awesome! This project follows the [Github contribution work flow.](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/github-flow) Submissions can fork and use a Github pull request to get merged into this code base.
8290

8391
Ways to help are listed as follows.
8492

85-
### Bug reports
93+
### Bug Reports
8694

8795
If you come across a bug in using StarPerf, you are more than welcome to file a bug report to our mail box.
8896

89-
### Contribute more constellation designs
97+
### Contribute More Constellation Designs
9098

9199
As emerging mega-constellations are still evolving rapidly and constellations such as Starlink and OneWeb are still under heavy development, we welcome all who are interested in this research topic to contribute their innovative designs, documents, insights, comments and suggestions.
92100

93-
### Write test cases
101+
### Write Test Cases
94102

95-
Currently this project has not be ''thoroughly''' tested. You are more than welcome to build any test cases for this project.
103+
Currently this project has not been "thoroughly" tested. You are more than welcome to build any test cases for this project.
96104

97105
# License
98106

pyproject.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[project]
2+
name = "starperf"
3+
version = "2.0.0"
4+
description = "A Network Performance Simulator for Emerging Mega-Constellations"
5+
authors = [
6+
{ name = "StarPerf Team", email = "zeqilai@tsinghua.edu.cn" }
7+
]
8+
readme = "README.md"
9+
license = { text = "BSD-2-Clause" }
10+
requires-python = ">=3.10"
11+
dependencies = [
12+
"h3==4.0.0b2",
13+
"h5py==3.10.0",
14+
"numpy==1.24.4",
15+
"openpyxl==3.1.2",
16+
"importlib-metadata==6.8.0",
17+
"skyfield==1.46",
18+
"sgp4==2.22",
19+
"pandas==2.1.0",
20+
"poliastro==0.17.0",
21+
"astropy==5.3.3",
22+
"networkx==3.1",
23+
"requests==2.31.0",
24+
"jenkspy==0.4.0",
25+
"pyecharts==2.0.4",
26+
"global-land-mask==1.0.0",
27+
"ephem==4.2",
28+
"ruptures==1.1.10",
29+
]
30+
31+
[build-system]
32+
requires = ["hatchling"]
33+
build-backend = "hatchling.build"

requirements.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)