Skip to content

Commit f71d44a

Browse files
committed
DO NOT MERGE Rebrand updates
1 parent 99ccfdd commit f71d44a

File tree

86 files changed

+880
-689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+880
-689
lines changed

.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ current_version = 1.11.6
33
commit = True
44
message = Update version {current_version} -> {new_version}
55

6-
[bumpversion:file:ibm_whcs_sdk/version.py]
6+
[bumpversion:file:acd_sdk/version.py]
77
search = __version__ = '{current_version}'
88
replace = __version__ = '{new_version}'
99

CODE_OF_CONDUCT.md

+101-48
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,128 @@
22

33
## Our Pledge
44

5-
In the interest of fostering an open and welcoming environment, we as
6-
contributors and maintainers pledge to making participation in our project and
7-
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, sex characteristics, gender identity and expression,
9-
level of experience, education, socio-economic status, nationality, personal
10-
appearance, race, religion, or sexual identity and orientation.
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
1114

1215
## Our Standards
1316

14-
Examples of behavior that contributes to creating a positive environment
15-
include:
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
1619

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
2227

23-
Examples of unacceptable behavior by participants include:
28+
Examples of unacceptable behavior include:
2429

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
2833
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
3136
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
37+
professional setting
3338

34-
## Our Responsibilities
39+
## Enforcement Responsibilities
3540

36-
Project maintainers are responsible for clarifying the standards of acceptable
37-
behavior and are expected to take appropriate and fair corrective action in
38-
response to any instances of unacceptable behavior.
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
3945

40-
Project maintainers have the right and responsibility to remove, edit, or
41-
reject comments, commits, code, wiki edits, issues, and other contributions
42-
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
44-
threatening, offensive, or harmful.
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
4550

4651
## Scope
4752

48-
This Code of Conduct applies both within project spaces and in public spaces
49-
when an individual is representing the project or its community. Examples of
50-
representing a project or community include using an official project e-mail
51-
address, posting via an official social media account, or acting as an appointed
52-
representative at an online or offline event. Representation of a project may be
53-
further defined and clarified by project maintainers.
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
5458

5559
## Enforcement
5660

5761
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at [email protected]. All
59-
complaints will be reviewed and investigated and will result in a response that
60-
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an incident.
62-
Further details of specific enforcement policies may be posted separately.
62+
reported to the community leaders responsible for enforcement via an [issue](https://github.com/merative/acd-python-sdk/issues).
63+
All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series
85+
of actions.
6386

64-
Project maintainers who do not follow or enforce the Code of Conduct in good
65-
faith may face temporary or permanent repercussions as determined by other
66-
members of the project's leadership.
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or
92+
permanent ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within
112+
the community.
67113

68114
## Attribution
69115

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.0, available at
118+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
72119

73-
[homepage]: https://www.contributor-covenant.org
120+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
74121

75-
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
122+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ].
123+
Translations are available at [https://www.contributor-covenant.org/translations][translations].
124+
125+
[homepage]: https://www.contributor-covenant.org
126+
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
127+
[Mozilla CoC]: https://github.com/mozilla/diversity
128+
[FAQ]: https://www.contributor-covenant.org/faq
129+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

+154-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,159 @@ refer here:
88

99
# Issues
1010

11-
If you encounter an issue with the Python Core SDK, you are welcome to submit a
11+
If you encounter an issue with the project, you are welcome to submit a
1212
[bug report](https://github.com/merative/whcs-python-sdk/issues).
1313

14-
# General Information
15-
i
16-
For general guidance on contributing to this project, please see
17-
[this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/CONTRIBUTING_python.md)
14+
# Contributing in General
15+
16+
Our project welcomes external contributions.
17+
18+
To contribute code or documentation, please submit a [pull request](https://github.com/merative/acd-python-sdk/pulls).
19+
20+
A good way to familiarize yourself with the codebase and contribution process is
21+
to look for and tackle low-hanging fruit in the [issue tracker](https://github.com/merative/acd-python-sdk/issues).
22+
Before embarking on a more ambitious contribution, please reach out to [email protected].
23+
24+
**Note: We appreciate your effort, and want to avoid a situation where a contribution
25+
requires extensive rework (by you or by us), sits in backlog for a long time, or
26+
cannot be accepted at all!**
27+
28+
## Proposing new features
29+
30+
If you would like to implement a new feature, please [raise an issue](https://github.com/merative/acd-python-sdk/issues)
31+
before sending a pull request so the feature can be discussed. This is to avoid
32+
you wasting your valuable time working on a feature that the project developers
33+
are not interested in accepting into the code base.
34+
35+
## Fixing bugs
36+
37+
If you would like to fix a bug, please [raise an issue](https://github.com/merative/acd-python-sdk/issues) before sending a
38+
pull request so it can be tracked.
39+
40+
## Coding style
41+
42+
This SDK follows a coding style based on the [PEP8 Style Guide for Python](https://www.python.org/dev/peps/pep-0008/),
43+
with the following modifications:
44+
- four spaces instead of tabs for indentation
45+
46+
All non-trivial methods should have docstrings.
47+
Docstrings should follow the [PEP257 guidelines](https://www.python.org/dev/peps/pep-0257/).
48+
For more examples, see the [Google style guide](https://google.github.io/styleguide/pyguide.html#381-docstrings)
49+
regarding docstrings.
50+
51+
Use [PyLint](https://www.pylint.org/) to adhere to these guidelines.
52+
53+
## Commit messages
54+
55+
Commit messages should follow the [Angular Commit Message Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines).
56+
This is because our release tool - [semantic-release](https://github.com/semantic-release/semantic-release) -
57+
uses this format for determining release versions and generating changelogs.
58+
Tools such as [commitizen](https://github.com/commitizen/cz-cli) or [commitlint](https://github.com/conventional-changelog/commitlint)
59+
can be used to help contributors and enforce commit messages.
60+
61+
Here are some examples of acceptable commit messages, along with the release type that would be done based on the commit message:
62+
63+
| Commit message | Release type |
64+
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|
65+
| `fix(<optional scope>): <fix message details>` | Patch Release |
66+
| `feat(<optional scope>): <feature message details>` | ~~Minor~~ Feature Release |
67+
68+
## Pull requests
69+
70+
If you want to contribute to the repository, here's a quick guide:
71+
1. Fork the repository and clone your fork to your local environment
72+
2. (recommended) Install and activate a [virtual environment](https://docs.python.org/3/tutorial/venv.html):
73+
* `python -m venv <venv-dir>`, where `<venv-dir>` indicates where to install the virtual environment
74+
* `. <venv-dir>/bin/activate`
75+
3. Install the project as an editable package using the current source:
76+
* `python -m pip install -e .`
77+
4. Install dependencies:
78+
* `python -m pip install -r requirements.txt`
79+
* `python -m pip install -r requirements-dev.txt`
80+
5. Develop and test your code changes:
81+
* Please add one or more tests to validate your changes.
82+
* To run all the tests: `python -m pytest`
83+
* You can find more details about running the tests below.
84+
6. Check and fix code style: `./pylint.sh`
85+
7. Make sure everything builds/tests cleanly
86+
8. Commit your changes
87+
* Make sure your commit messages follow the Angular Commit Message Guidelines (see below).
88+
9. Push to your fork and submit a pull request to the **main** branch
89+
90+
## Running the Tests
91+
92+
To run all of the tests (both unit and integration tests):
93+
* `python -m pytest`
94+
95+
Note that integration tests require credentials - see below.
96+
97+
You can run a specific test like this:
98+
* `python -m pytest <path-to-test>/mytest.py`
99+
100+
### Unit tests
101+
102+
Unit tests use a mock service endpoint, so they do not need any credentials.
103+
To run the unit tests:
104+
* `python -m pytest test/unit`
105+
106+
### Integration tests
107+
Integration tests use an actual service endpoint, so you need to provide credentials to the integration test framework.
108+
109+
To run only the integration tests:
110+
* `python -m pytest test/integration`
111+
112+
To provide credentials for the integration tests, add credentials to your ACD Python SDK installation's <your_install_path>/acd-sdk/annotator_for_clinical_data/tests/config.ini file. Configure your credentials based on your Anotator for Clinical Data service authentication method.
113+
114+
If using IAM authentication:
115+
116+
```
117+
[settings]
118+
base_url = <your ACD endpoint URL>
119+
key = <your ACD endpoint API key>
120+
iam_url = <optional>
121+
version = <ACD API version YYYY-MM-DD>
122+
bearer_token =
123+
disable_ssl = <True or False (False is recommended)>
124+
flow = <optional name of ACD flow persisted to your ACD endpoint>
125+
profile = <optional name of ACD profile persisted to your ACD endpoint>
126+
```
127+
128+
If using Bearer Token authentication:
129+
130+
```
131+
[settings]
132+
base_url = <your ACD endpoint URL>
133+
key =
134+
iam_url =
135+
bearer_token = <your ACD endpoint bearer token>
136+
version = <ACD API version YYYY-MM-DD>
137+
disable_ssl = <True or False (False is recommended)>
138+
flow = <optional name of ACD flow persisted to your ACD endpoint>
139+
profile = <optional name of ACD profile persisted to your ACD endpoint>
140+
```
141+
142+
## Developer's Certificate of Origin 1.1
143+
144+
By making a contribution to this project, I certify that:
145+
146+
(a) The contribution was created in whole or in part by me and I
147+
have the right to submit it under the open source license
148+
indicated in the file; or
149+
150+
(b) The contribution is based upon previous work that, to the best
151+
of my knowledge, is covered under an appropriate open source
152+
license and I have the right under that license to submit that
153+
work with modifications, whether created in whole or in part
154+
by me, under the same open source license (unless I am
155+
permitted to submit under a different license), as indicated
156+
in the file; or
157+
158+
(c) The contribution was provided directly to me by some other
159+
person who certified (a), (b) or (c) and I have not modified
160+
it.
161+
162+
(d) I understand and agree that this project and the contribution
163+
are public and that a record of the contribution (including all
164+
personal information I submit with it, including my sign-off) is
165+
maintained indefinitely and may be redistributed consistent with
166+
this project or the open source license(s) involved.

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ install_project:
2323
test: test-unit test-int
2424

2525
test-unit:
26-
python -m pytest ibm-whcs-sdk/annotator-for-clinical-data/tests/unit
26+
python -m pytest acd_sdk/annotator_for_clinical_data/tests/unit
2727

2828
test-int:
29-
python -m pytest ibm-whcs-sdk/annotator-for-clinical-data/tests/integration
29+
python -m pytest acd_sdk/annotator_for_clinical_data/tests/integration
3030

3131
lint:
3232
./pylint.sh

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This Python SDK allows developers to programmatically interact with the followin
77

88
| Service Name | Imported Class Name |
99
|--------------|-------------|
10-
| [Annotator for Clinical data](https://merative.github.io/acd-containers/) | AnnotatorForClinicalDataV1 |
10+
| [Annotator for Clinical Data](https://merative.github.io/acd-containers/) | AnnotatorForClinicalDataV1 |
1111

1212
## Prerequisites
1313

File renamed without changes.

ibm_whcs_sdk/annotator_for_clinical_data/__init__.py acd_sdk/annotator_for_clinical_data/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
from .annotator_for_clinical_data_v1 import NluEntities
3939
from .annotator_for_clinical_data_v1 import Node
4040
from .annotator_for_clinical_data_v1 import Procedure
41+
from .annotator_for_clinical_data_v1 import Reference
4142
from .annotator_for_clinical_data_v1 import Relations
4243
from .annotator_for_clinical_data_v1 import RequestContainer
4344
from .annotator_for_clinical_data_v1 import Section

ibm_whcs_sdk/annotator_for_clinical_data/annotator_for_clinical_data_v1.py acd_sdk/annotator_for_clinical_data/annotator_for_clinical_data_v1.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from ibm_cloud_sdk_core.authenticators.authenticator import Authenticator
2424
from ibm_cloud_sdk_core.get_authenticator import get_authenticator_from_environment
2525
from ibm_cloud_sdk_core.utils import convert_model
26-
from ibm_whcs_sdk.common import get_sdk_headers
26+
from acd_sdk.common import get_sdk_headers
2727

2828
##############################################################################
2929
# Exception Handling
@@ -55,7 +55,7 @@ def __str__(self):
5555
class AnnotatorForClinicalDataV1(BaseService):
5656
"""The Annotator for Clinical Data (ACD) V1 service."""
5757

58-
DEFAULT_SERVICE_URL = 'https://annotator-for-clinical-data-acd.cloud.ibm.com/services/clinical_data_annotator/api'
58+
DEFAULT_SERVICE_URL = 'https://your-acd-hostname.com/services/clinical_data_annotator/api'
5959
DEFAULT_SERVICE_NAME = 'annotator_for_clinical_data_acd'
6060

6161
@classmethod

0 commit comments

Comments
 (0)