Skip to content

Commit

Permalink
Merge branch 'release-4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Milind220 committed Jul 26, 2022
2 parents aa88efb + 51495fa commit 1cc6073
Show file tree
Hide file tree
Showing 23 changed files with 163 additions and 167 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: 'Create a report to help Ozone improve. Treat this template more as a guide
about: 'Create a report to help Ozon3 improve. Treat this template more as a guide
to filing a good issue, rather than something you have to fill completely every time.'
title: "[BUG]"
labels: bug
Expand All @@ -27,7 +27,7 @@ If applicable, add screenshots to help explain your problem.
**Environment**
- OS: [e.g. MacOS]
- Python version [e.g. 3.9.12]
- Ozone Version [e.g. 1.7.1]
- Ozon3 Version [e.g. 1.7.1]
- Execution Environment [e.g. Jupyter Notebook]

**Additional context**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature request
about: Suggest an idea for a feature/enhancement for Ozone.
about: Suggest an idea for a feature/enhancement for Ozon3.
title: '[FEAT]'
labels: 'enhancement'
assignees: ''
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Hey! Thanks for creating your first issue on Ozone!'
pr-message: 'Awesome work with your first PR for Ozone! We will review your PR soon :)'
issue-message: 'Hey! Thanks for creating your first issue on Ozon3!'
pr-message: 'Awesome work with your first PR for Ozon3! We will review your PR soon :)'
2 changes: 1 addition & 1 deletion .github/workflows/package-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions

name: Workflow to publish Ozone on PyPI and TestPyPI
name: Workflow to publish Ozon3 on PyPI and TestPyPI

# Controls when the workflow will run
on:
Expand Down
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Code Of Conduct

All members of the Ozone community should try to follow this **Code of Conduct**:
All members of the Ozon3 community should try to follow this **Code of Conduct**:


* Encourage constructive discourse and new contributors.

* Encourage the discussion of new ideas about features and enhancements as long as they don't go against the goal of Ozone
* Encourage the discussion of new ideas about features and enhancements as long as they don't go against the goal of Ozon3
to be the most effective package for fetching air quality data.

* Have a fun time.
42 changes: 21 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Contributing to Ozone
# Contributing to Ozon3

:tada::+1: First off, thanks for taking the time to contribute! :tada::+1:

It might not be obvious but we appreciate all forms of contribution.

The following is a set of guidelines for contributing to [Ozone](https://github.com/Milind220/Ozone). These are mostly guidelines, not rules. Use your best judgment. Feel free to propose changes to this document in a pull request.
The following is a set of guidelines for contributing to [Ozon3](https://github.com/Ozon3Org/Ozon3). These are mostly guidelines, not rules. Use your best judgment. Feel free to propose changes to this document in a pull request.

> **Important note:** Make sure you make PRs to `dev` branch, not `main`. See [below](#making-a-pull-request) for more information.
Expand Down Expand Up @@ -36,7 +36,7 @@ The following is a set of guidelines for contributing to [Ozone](https://github.

### Reporting bugs

1. Before submitting a bug report, make sure to do a cursory search on [issues](https://github.com/Milind220/Ozone/issues) to see if it's already reported. If it's already reported, add a comment under the issue thread instead of opening a new one.
1. Before submitting a bug report, make sure to do a cursory search on [issues](https://github.com/Ozon3Org/Ozon3/issues) to see if it's already reported. If it's already reported, add a comment under the issue thread instead of opening a new one.

2. Use clear and descriptive title.

Expand All @@ -45,28 +45,28 @@ The following is a set of guidelines for contributing to [Ozone](https://github.
- **Expected behavior**: What do you expect should happen?
- **Actual behavior**: What actually happened and why it's a problem?
- **Steps to reproduce the problem**. Be very specific. Give example code block. Other contributors want to run it in their device to make sure they see what you saw. Having detailed steps and examples can make it easier to demonstrate and track down a problem.
- **Version information**: What version of Python you're using? What version of Ozone? Do you install through `pip` or by cloning the Github repository? What is your OS and what version?
- **Version information**: What version of Python you're using? What version of Ozon3? Do you install through `pip` or by cloning the Github repository? What is your OS and what version?

You can include screenshots/GIFs, if relevant.

Additionally, you can also confirm other people's bug report by running their provided code and steps in your local machine and see if the same problem shows up. Every test helps, especially if your device setup is different (i.e. has different OS or Python version) from the original bug report.

### Suggesting enhancements/features

1. Before submitting a feature suggestion, make sure to do a cursory search in [issues](https://github.com/Milind220/Ozone/issues) to see if it's already suggested.
1. Before submitting a feature suggestion, make sure to do a cursory search in [issues](https://github.com/Ozon3Org/Ozon3/issues) to see if it's already suggested.

2. Use clear and descriptive title.

3. Lay out the details of your suggestion in the body issue. Make sure to also:

- Describe the current behavior and explain what would you like to see instead.
- Explain why your suggestion would be useful for Ozone users.
- Explain why your suggestion would be useful for Ozon3 users.

### Making a pull request

You can also make a pull request to fix an existing bug or add a feature.

Unsure where to begin contributing to Ozone? You can start by looking through these `first-contribution`, `beginner`, `help-wanted` issues:
Unsure where to begin contributing to Ozon3? You can start by looking through these `first-contribution`, `beginner`, `help-wanted` issues:

* `first-contribution` issues should only require a few lines of code or are improvements on the documentation.
* `beginner` issues are a step up, and may involve a couple of methods/tests.
Expand Down Expand Up @@ -99,7 +99,7 @@ Hold my beer, I got this
4. Set original repository as `upstream` remote.

```sh
git remote add upstream https://github.com/Milind220/Ozone.git
git remote add upstream https://github.com/Ozon3Org/Ozon3.git
```

5. Pull from original repository to make sure you're synced up.
Expand Down Expand Up @@ -145,13 +145,13 @@ Hold my beer, I got this

> It's normal for pre-commit to take some time.
> When Black reformats a staged file, the pre-commit will fail. It is normal and expected. See [this discussion](https://github.com/Milind220/Ozone/discussions/85). Just stage the file and commit again, it should pass the second time.
> When Black reformats a staged file, the pre-commit will fail. It is normal and expected. See [this discussion](https://github.com/Ozon3Org/Ozon3/discussions/85). Just stage the file and commit again, it should pass the second time.
4. Your local development environment is ready to use. Feel free to code away. Make sure to only commit logical changes that are already tested. Don't commit things you just try out and haven't tested.

5. When you're done coding, again, **test out the changes that you've made to the package.** Proceed if all is good.

> See [next section](#test-suite) for instructions about Ozone's test suite.
> See [next section](#test-suite) for instructions about Ozon3's test suite.
### Pushing changes and opening a pull request

Expand All @@ -163,7 +163,7 @@ Hold my beer, I got this

## Test Suite

Ozone has a test suite that lives in `tests/` directory, which has the following structure within:
Ozon3 has a test suite that lives in `tests/` directory, which has the following structure within:

Directories:

Expand All @@ -172,7 +172,7 @@ Directories:
Files:

1. `conftest.py`: Location of pytest global and configuration fixtures.
2. `utils.py`: Location of global Python helper objects (i.e. constants and `Ozone` instance) to use in tests.
2. `utils.py`: Location of global Python helper objects (i.e. constants and `Ozon3` instance) to use in tests.
3. `test_*.py`: Test files, each file is testing one public method.

### Setting up and running tests
Expand All @@ -199,16 +199,16 @@ If any of your tests fail because of a VCR error such as `vcr.errors.CannotOverW

### Updating tests

Generally, tests should correspond to the necessary specification/expectation of Ozone users. Tests will help us identify if our code is still in line with such expectations.
Generally, tests should correspond to the necessary specification/expectation of Ozon3 users. Tests will help us identify if our code is still in line with such expectations.

Tests should be updated when e.g.:
- There is new expectation on how should Ozone behave. In this case, the tests need to be updated accordingly.
- There is new expectation on how should Ozon3 behave. In this case, the tests need to be updated accordingly.
- There is a new functionality. In this case, add necessary tests accordingly.
- There is a new bug or previously unencountered or undocumented behavior. Add them to the existing tests when fixing it, to make sure the same bug will never slip past again in the future.

### About the cassettes and pytest-recording

This test suite is testing Ozone's functionality, therefore interaction with outside sources are mocked. Ozone uses pytest-recording plugin that uses vcrpy under the hood to record request-response pairs.
This test suite is testing Ozon3's functionality, therefore interaction with outside sources are mocked. Ozon3 uses pytest-recording plugin that uses vcrpy under the hood to record request-response pairs.

These request-response pairs are stored as `.yaml` files in `tests/cassettes` directory. When an outbound request is made, pytest-recording will look for that request's response in the tests' `.yaml` file instead of actually letting the request go through to WAQI.

Expand Down Expand Up @@ -260,7 +260,7 @@ After making changes to the cassettes, don't forget to save the cassettes into v
git commit tests/cassettes -m "test: Re-record cassettes for passing test XXX XXX XXX"
```

Note that doing a live request to WAQI requires a token to be supplied. The test suite loads the token from an environment variable. To set this environment variable, you can make a file named `.env` in Ozone root directory with the following content:
Note that doing a live request to WAQI requires a token to be supplied. The test suite loads the token from an environment variable. To set this environment variable, you can make a file named `.env` in Ozon3 root directory with the following content:

```
WAQI_TOKEN=insert_your_token_here
Expand Down Expand Up @@ -290,7 +290,7 @@ For more information:

## World Air Quality Index's API

Ozone uses the World Air Quality Index's API under the hood to fetch its data. We have included some links to information about the API to help during contribution.
Ozon3 uses the World Air Quality Index's API under the hood to fetch its data. We have included some links to information about the API to help during contribution.

* Find information on the World Air Quality Index website [here](https://waqi.info/)
* Find information on different APIs used by Air Quality Programs [here](https://aqicn.org/api/)
Expand All @@ -312,11 +312,11 @@ Commmits should be made in this format:

* `fix`: To show that a bug fix or patch has been made.
* `feat`: To show that a new feature/enhancement has been added.
* `BREAKING CHANGE`: For changes that introduce backward-incompatible updates. Backward-incompatibility happens when code that uses Ozone's **public** API needs to be modified to account for an update. (As opposed to code using Ozone's **private** or **internal-usage** API, which is not meant for public use)
* `BREAKING CHANGE`: For changes that introduce backward-incompatible updates. Backward-incompatibility happens when code that uses Ozon3's **public** API needs to be modified to account for an update. (As opposed to code using Ozon3's **private** or **internal-usage** API, which is not meant for public use)
* `refactor`: If you've rearranged/refactored existing code by splitting it into separate files/methods/functions/classes, or by using a slightly different implementation detail, reasonably without changing functionality.
* `test`: Any modification of tests.
* `ci/cd`: Any changes related to continuous integration/deployment tasks, such as GitHub actions.
* `chore`: For behind the scenes stuff that doesn't affect the Ozone's API. This could include things like version bumps, change in dependencies, etc.
* `chore`: For behind the scenes stuff that doesn't affect the Ozon3's API. This could include things like version bumps, change in dependencies, etc.
* `docs`: For entirely documentation related changes. README, CONTRIBUTING, CODE_OF_CONDUCT, and even docstrings in methods, all come under this.
* `style`: For a commit that solely has to do with things like spaces instead of tabs, or " instead of ', etc. This can be used if you've formatted code with black/flake8 and wish to make a commit.

Expand All @@ -338,6 +338,6 @@ Here are a few other tips:

## Github Branching Model

Ozone branches are created using a Github branching model. In this branching model, each branch serves a purpose and offers team members a shared undestanding of the branching system.
Ozon3 branches are created using a Github branching model. In this branching model, each branch serves a purpose and offers team members a shared undestanding of the branching system.

See more information on this branching model [here](https://github.com/Milind220/Ozone/discussions/24).
See more information on this branching model [here](https://github.com/Ozon3Org/Ozon3/discussions/24).
26 changes: 13 additions & 13 deletions FILE_STRUCTURE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# File Structure
This document is a reference primer on Ozone's files: what, where, and for what.
This document is a reference primer on Ozon3's files: what, where, and for what.

- [src/](#src)
- [media/](#media)
- [ozone/](#ozone)
- [ozone.py](#ozonepy)
- [ozon3/](#ozon3)
- [ozon3.py](#ozon3py)
- [urls.py](#urlspy)
- [historical/](#historical)
- [relevant_funcs.py](#relevant_funcspy)
Expand All @@ -27,19 +27,19 @@ This document is a reference primer on Ozone's files: what, where, and for what.

## src/

This is the directory where main Ozone source code lives.
This is the directory where main Ozon3 source code lives.

### media/

This subdirectory contains media related to Ozone's documentation (README). Included here are demo GIFs and Ozone logo.
This subdirectory contains media related to Ozon3's documentation (README). Included here are demo GIFs and Ozon3 logo.

### ozone/
### ozon3/

This module is where core Ozone code lives.
This module is where core Ozon3 code lives.

#### ozone.py
#### ozon3.py

Main module that contains Ozone's class definition.
Main module that contains Ozon3's class definition.

#### urls.py

Expand All @@ -55,7 +55,7 @@ This file contains relevant JavaScript functions wrapped as one long triple-quot

##### _reverse_engineered.py

This file contains most of code required to run the JavaScript functions and convert the result back into Python format that can be used by the rest of Ozone.
This file contains most of code required to run the JavaScript functions and convert the result back into Python format that can be used by the rest of Ozon3.

## tests/

Expand All @@ -71,7 +71,7 @@ Pytest global and configuration fixtures are defined here.

### test_*.py

These are test files. One test file is responsible for testing one of Ozone's public method.
These are test files. One test file is responsible for testing one of Ozon3's public method.

### utils.py

Expand All @@ -91,11 +91,11 @@ Dependency requirement file for development. Non-developing users won't need to

## updateVersion.sh

A custom shell script to automatically increment version. This is purely a convenience script so that each time Ozone needs a new release, we won't need to alter the version numbers in multiple places by hand.
A custom shell script to automatically increment version. This is purely a convenience script so that each time Ozon3 needs a new release, we won't need to alter the version numbers in multiple places by hand.

## .github/

This folder is related to GitHub repository and not necessarily part of Ozone package.
This folder is related to GitHub repository and not necessarily part of Ozon3 package.

### ISSUE_TEMPLATE/

Expand Down
Loading

0 comments on commit 1cc6073

Please sign in to comment.