Skip to content

Commit aa82059

Browse files
committed
Merge branch 'release/v1.5'
2 parents 7bbc975 + e4c5664 commit aa82059

8 files changed

Lines changed: 228 additions & 166 deletions

File tree

CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contribution Guidelines
2+
Thank you for your interest in contributing to the project! We appreciate your help in making this simple weather checking command-line tool even better. To ensure a smooth collaboration, please follow these guidelines when contributing to the project.
3+
4+
### Getting Started
5+
To contribute to this project, follow these steps:
6+
7+
1. Fork the repository on GitHub.
8+
2. Clone the forked repository to your local machine.
9+
3. Make the necessary changes and improvements to the codebase.
10+
4. Test your changes to ensure they work as expected.
11+
5. Commit your changes with clear and descriptive commit messages.
12+
6. Push the changes to your forked repository.
13+
7. Submit a pull request to the main repository.
14+
15+
### Code Guidelines
16+
Please adhere to the following code guidelines:
17+
18+
- Write clear and concise code that is easy to understand and maintain.
19+
- Follow the existing coding style and conventions used in the project.
20+
- Use meaningful variable and function names that accurately describe their purpose.
21+
- Comment your code when necessary, especially for complex logic or non-obvious functionality.
22+
23+
### Testing
24+
To maintain the project's quality, it is essential to test your changes. Here's how you can test the project:
25+
26+
- Run the existing tests to ensure that the project functions as expected.
27+
- Write additional tests to cover the new features or changes you made.
28+
- Ensure that all tests pass successfully before submitting your changes.
29+
30+
### Documentation
31+
If you make changes that require updates to the documentation, please make sure to update the relevant parts of the project's documentation. This includes the README file, inline code comments, and any other relevant documentation files.
32+
33+
### Issue Tracking
34+
If you find any bugs, have suggestions, or would like to request new features, please create an issue in the GitHub repository. Make sure to provide a clear and detailed description of the problem or enhancement you are proposing.
35+
36+
### Pull Request Process
37+
To contribute your changes back to the main project, please follow these steps:
38+
39+
1. Ensure that your forked repository is up to date with the latest changes from the main repository.
40+
2. Create a new branch for your changes, with a descriptive name.
41+
3. Make your changes and commit them with clear and concise messages.
42+
4. Push your branch to your forked repository.
43+
5. Open a pull request from your branch to the main repository.
44+
6. Provide a detailed description of the changes you made and the motivation behind them.
45+
7. Wait for feedback and address any requested changes if necessary.
46+
8. Once approved, your changes will be merged into the main repository.
47+
48+
### Conclusion
49+
Thank you for considering contributing to this project! Your help is greatly appreciated. Let's work together to make this weather checking command-line tool even more useful and efficient. If you have any questions, feel free to reach out by creating an issue or contacting the project maintainers. Happy coding!

README.md

Lines changed: 51 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Console Weather project is a simple application project to check weather in cons
1717
## Installation
1818

1919
If you installed [.NET 7.0 or newer](https://dotnet.microsoft.com/en-us/download), just simply paste this command into console:
20-
```bash
21-
dotnet tool install --global console-weather --version 1.4.0
20+
```console
21+
$ dotnet tool install --global console-weather --version 1.5.0
2222
```
2323

2424
If you want to update, just type:
25-
```bash
26-
dotnet tool update --global console-weather
25+
```console
26+
$ dotnet tool update --global console-weather
2727
```
2828

2929
If you running app first time, it will ask you for the [Weather API](https://www.weatherapi.com/):
@@ -38,88 +38,62 @@ Enter your personal API key and enjoy using it!
3838

3939
The key is kept in `C:\Users\USERNAME\Documents\weather_data`
4040
## Usage
41-
To use application, just simply type:
42-
```bash
43-
weather
44-
```
45-
To get weather info from a specified city, type:
4641
```bash
47-
weather -c "City Name"
48-
```
42+
# To use aplication, type:
43+
$ weather
4944

50-
To get weather information without alerts, type:
51-
```bash
52-
weather --no-alerts
53-
```
45+
# To get weather info from a specified city, type:
46+
$ weather -c "Warsaw"
5447

55-
To get forecast for the next day, type:
56-
```bash
57-
weather -f
58-
```
48+
# To get weather information without alerts, type:
49+
$ weather --no-alerts
5950

60-
To use specific units, type:
61-
```bash
62-
weather -u
63-
```
51+
# To get forecast for the next day, type:
52+
$ weather -f
6453

65-
To get air quality data, type:
66-
```bash
67-
weather -a
68-
```
54+
# To use specific units, type:
55+
$ weather -u Si
6956

70-
Full command list:
71-
```bash
72-
-c, --city <city> Get city name [optional]
73-
--no-alerts Hide weather alerts [default: False]
74-
-f, --forecast Show weather forecast [default: False]
75-
-u, --units <Eu|Si|Uk|Us> Set weather units [default: Eu]
76-
-a, --air-quality Show air quality [default: False]
77-
--version Show version information
78-
-?, -h, --help Show help and usage information
57+
# To get air quality data, type:
58+
$ weather -a
7959
```
8060

8161
## Demo
82-
83-
### Weather:
84-
Example input:
85-
```
86-
weather -c "Kansas City" -f -u Si
87-
```
88-
89-
Example output:
90-
```
91-
Current weather for Kansas City in United States of America is Mist
92-
The temperature is 17,2°C, but feels like 17,2°C
93-
94-
Current Wind Speed is 3,1 m/s ESE
95-
Current Air Pressure is 1009,0 mbar
96-
Current Humidity is 93%
97-
Current Cloud Cover is 100%
98-
Last Update: 2023-05-06 06:45
99-
100-
Tomorrow it will be Partly cloudy
101-
The temperature range will be around 14,8°C to 32,7°C, with average of 23,1°C
102-
The maximum wind speed will be around 8,1 m/s
103-
The chance of rain/snow: 0% / 0%
104-
```
105-
106-
### Air Quality:
107-
Example input:
108-
```
109-
weather -c "Kansas City" -a
110-
```
111-
112-
Example output:
113-
```
114-
Current Air Quality for Kansas City in United States of America:
115-
116-
Carbon Monoxide: 240,30 ug/m3
117-
Nitrogen Dioxide: 6,40 ug/m3
118-
Ozone: 34,0 ug/m3
119-
Sulphur Dioxide: 0,30 ug/m3
120-
Fine Particles Matter: 5,80 ug/m3
121-
Coarse Particles Matter: 6,90 ug/m3
122-
US Epa Index: 1 (Good)
62+
```bash
63+
# Show weather for London with forecast and air quality data
64+
$ weather -c "London" -f -a
65+
66+
# CURRENT WEATHER:
67+
# Current weather for London in United Kingdom is Partly cloudy
68+
# The temperature is 19,0°C, but feels like 19,0°C
69+
#
70+
# Current Wind Speed: 22,0 kph (NE)
71+
# Current Air Pressure: 1024,0 mbar
72+
# Current Visibility: 10,0 kilometers
73+
# Current Precipitation: 0,0 mm
74+
# Current Humidity: 46%
75+
# Current Cloud Cover: 50%
76+
# Current UV Index: 5,0 (Moderate)
77+
78+
# FORECAST:
79+
# Tomorrow it will be Cloudy
80+
# Temperature Range: 7,9°C - 17,7°C (average: 13,2)°C
81+
# Maximum Wind Speed: 19,8 kph
82+
# Average Visibility: 10,0 kilometers
83+
# Maximum Precipitation: 0,0 mm
84+
# UV Index: 3,0 (Moderate)
85+
# Chance of rain/snow: 0% / 0%
86+
#
87+
# AIR QUALITY:
88+
# Carbon Monoxide: 205,30 ug/m3
89+
# Nitrogen Dioxide: 4,40 ug/m3
90+
# Ozone: 113,0 ug/m3
91+
# Sulphur Dioxide: 3,30 ug/m3
92+
# Fine Particles Matter: 4,40 ug/m3
93+
# Coarse Particles Matter: 7,5 ug/m3
94+
# US Epa Index: 1 (Good)
95+
#
96+
# Last Update: 2023-05-20 14:45
12397
```
12498

12599
## Acknowledgements

console-weather/Program.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ public static async Task<int> Main(string[] args) {
5555
}
5656

5757
private static void OnHandle(string cityName, bool showAlerts, bool showForecast, Units.UnitType units, bool airQuality) {
58-
cityName ??= "auto:ip";
59-
60-
CityName = cityName;
58+
CityName = cityName ?? "auto:ip";
6159
DontShowAlerts = showAlerts;
6260
ShowForecast = showForecast;
6361
Settings.Units = units;

0 commit comments

Comments
 (0)