Skip to content

Commit a8d81af

Browse files
🔧 pre-release edits (#13)
1 parent 2798da6 commit a8d81af

10 files changed

Lines changed: 294 additions & 8 deletions

File tree

.github/ISSUE_TEMPLATE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!--
2+
3+
Have you read mindee-api-php's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: [Code of Conduct](CODE_OF_CONDUCT.md)
4+
5+
Do you want to ask a question? Are you looking for enterprise support? Get in touch via [email](contact@mindee.com)
6+
7+
-->
8+
9+
### Prerequisites
10+
11+
Put an X between the brackets on this line if you have done all of the following:
12+
13+
* [ ] Reproduced the problem or exposed a new need
14+
* [ ] Checked the GitHub existing issues
15+
16+
### Description
17+
18+
<!-- Description of the issue -->
19+
20+
### Steps to Reproduce
21+
22+
1. <!-- First Step -->
23+
2. <!-- Second Step -->
24+
3. <!-- and so on… -->
25+
26+
**Expected behavior:**
27+
28+
<!-- What you expect to happen -->
29+
30+
**Actual behavior:**
31+
32+
<!-- What actually happens -->
33+
34+
**Reproduces how often:**
35+
36+
<!-- What percentage of the time does it reproduce? -->
37+
38+
### Versions
39+
40+
<!-- You can get this information with `pip freeze | grep mindee`.
41+
Also, please include the OS and which Php version you're running. -->
42+
43+
### Additional Information
44+
45+
<!-- Any additional information, configuration or data that might be necessary to reproduce the issue. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Description
2+
<!--- Describe your changes in detail -->
3+
<!--- Why is this change required? What problem does it solve? -->
4+
5+
6+
## Related Issue
7+
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
8+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
9+
<!--- Please link to the issue here: -->
10+
11+
12+
## How Has This Been Tested
13+
<!--- Please describe in detail how you tested your changes. -->
14+
<!--- Include details of your testing environment, and the tests you ran to -->
15+
<!--- see how your change affects other areas of the code, etc. -->
16+
17+
18+
## Types of changes
19+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
20+
21+
- [ ] Docs change / refactoring / dependency upgrade
22+
- [ ] Bug fix (non-breaking change which fixes an issue)
23+
- [ ] New feature (non-breaking change which adds functionality)
24+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
25+
- [ ] Requires a change to the official Guide documentation.

.github/workflows/docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Publish Documentation
22

33
on:
4-
push:
54
release:
65
types: [ published ]
76

.github/workflows/regression-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Regression Tests
22

33
on:
4-
- push
4+
push:
5+
# Allows running this workflow manually from the Actions tab
6+
workflow_dispatch:
57

68
jobs:
79
phpunit-ubuntu:
@@ -30,4 +32,4 @@ jobs:
3032
env:
3133
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
3234
run: |
33-
./vendor/bin/phpunit -c tests/phpunitRegressions.xml
35+
./vendor/bin/phpunit -c tests/regressions.xml

.github/workflows/unit-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Unit Tests
22

33
on:
4-
- push
4+
push:
5+
# Allows running this workflow manually from the Actions tab
6+
workflow_dispatch:
57

68
jobs:
79
phpunit-ubuntu:
@@ -12,7 +14,7 @@ jobs:
1214
os:
1315
- "ubuntu-latest"
1416
- "macos-latest"
15-
# - "windows-latest" # No composer actions are compatible with windows at the moment.
17+
# - "windows-latest" # No stable composer actions are compatible with windows at the moment.
1618
php-version:
1719
- 7.4
1820
- 8.0

CODE_OF_CONDUCT.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, religion, or sexual identity
11+
and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the
27+
overall community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or
32+
advances of any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email
36+
address, without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
[opensource@mindee.com](opensource@mindee.com).
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series
87+
of actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or
94+
permanent ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within
114+
the community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.0, available at
120+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
121+
122+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
123+
enforcement ladder](https://github.com/mozilla/diversity).
124+
125+
[homepage]: https://www.contributor-covenant.org
126+
127+
For answers to common questions about this code of conduct, see the FAQ at
128+
https://www.contributor-covenant.org/faq. Translations are available at
129+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Contributing to mindee-api-php
2+
3+
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
4+
5+
The following is a set of guidelines for contributing to mindee-api-php which are hosted on GitHub.
6+
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
7+
8+
## Code of Conduct
9+
10+
This project and everyone participating in it is governed by the following [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [contact@mindee.com](mailto:contact@mindee.com).
11+
12+
## How Can I Contribute
13+
14+
### Reporting Bugs
15+
16+
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/).
17+
18+
To help maintainers and the community to be efficient, follow these guidelines:
19+
20+
* **Use a clear and descriptive title** for the issue to identify the problem.
21+
* **Describe the exact steps which reproduce the problem** in as many details as possible. When listing steps, **don't just say what you did, but explain how you did it**. For example, with canvas related problem, explain if you used the mouse or a keyboard shortcut, what kind of image input it is etc...
22+
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
23+
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
24+
* **Explain which behavior you expected to see instead and why.**
25+
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
26+
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
27+
28+
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
29+
30+
Include details about your configuration and environment:
31+
32+
* **Which version of mindee-api-php are you using?**
33+
* **What's the name and version of the browser you're using, on which OS**?
34+
35+
### Suggesting Enhancements
36+
37+
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/).
38+
39+
Make sure to provide the following information:
40+
41+
* **Use a clear and descriptive title** for the issue to identify the suggestion.
42+
* **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
43+
* **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
44+
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
45+
* **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of the sdk which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
46+
* **Specify which version of mindee-api-php you're using.**
47+
* **Specify the name and version of the browser and OS you're using.**
48+
49+
### Pull Requests
50+
51+
The process described here has several goals:
52+
53+
- Maintain mindee SDK quality
54+
- Fix problems that are important to users
55+
- Engage the community in working toward the best possible SDK
56+
- Enable a sustainable system for mindee's maintainers to review contributions
57+
58+
Please follow these steps to have your contribution considered by the maintainers:
59+
60+
1. Follow all instructions in [the template](.github/PULL_REQUEST_TEMPLATE.md)
61+
2. Follow the [styleguides](#styleguides)
62+
63+
While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.
64+
65+
## Styleguides
66+
67+
### Git Commit Messages
68+
69+
* Use the present tense ("Add feature" not "Added feature")
70+
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
71+
* Limit the first line to 72 characters or fewer
72+
* Reference issues and pull requests liberally after the first line
73+
* Please prefix your commit message with `chg:`, `new:` or `fix:` according to the content
74+
* Consider starting the commit message with an applicable emoji, see [gitmoji](https://gitmoji.carloscuesta.me/) as a reference.
75+
76+
Example:
77+
78+
* chg: :pencil: Add usage section in README
79+
* new: :sparkles: Add CONTRIBUTING file in repository
80+
* fix: :bug: MyComponent - Prevent MouseEvent from firing unexpectedly
81+
82+
### Php Styleguide
83+
84+
We keep our code base consistent, and we expect Php code to adhere to the [PSR-12](https://www.php-fig.org/psr/psr-12/) coding standard, plus some additional documentation norm listed in our own [coding standard file](./phpcs.xml).

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Mindee
3+
Copyright (c) 2023 Mindee
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

docs/code_samples/default_async.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ $VERSION = 'my-version';
1212
$ENDPOINT = 'my-endpoint';
1313

1414
// Maximum amount of retries to fetch a parsed document
15-
$MAX_RETRIES = 10;
15+
$MAX_RETRIES = 30;
1616

1717
// Delay between request
18-
$DELAY = 6;
18+
$DELAY = 2;
1919

2020
// Open a cURL session to enqueue the document
2121
$ch_post = curl_init();

0 commit comments

Comments
 (0)