You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -7,31 +7,27 @@ Changes are welcome from all members of the Community.
7
7
8
8
1. Create a [GitHub Account](https://github.com/join).
9
9
2. Fork the utPLSQL Repository and setup your local Repository.
10
-
* Each of the steps below are detailed in the [How to Fork](https://help.github.com/articles/fork-a-repo) article!
10
+
* Each of the steps below are detailed in the [how to Fork](https://help.github.com/articles/fork-a-repo) article!
11
11
* Clone your Fork to your local machine.
12
-
* Configure "upstream" remote to the [master utPLSQL repository](https://github.com/utPLSQL/utPLSQL.git).
13
-
* Update the git submodules by issuing command: [git submodule update --remote --merge](http://stackoverflow.com/a/21195182)
14
-
3. For each change you want to make:
15
-
* Create a new branch for your change.
12
+
* Configure "upstream" remote to the [utPLSQL repository](https://github.com/utPLSQL/utPLSQL.git).
13
+
3. For each change you want to make:
14
+
* Make sure your forked repository is up to date with upstream before you start coding. See [syncing your local repository](https://help.github.com/articles/syncing-a-fork) with upstream utPLSQL repository.
15
+
* Create a new branch for your change. We use `feature/feature_name` or `bugfix/fixed_issue_name` to identify branch types.
16
16
* Make your change in your new branch.
17
-
* Although changes can be made in the master branch, it easier long term if a new branch is used.
18
-
* Make sure your change is covered with unit tests and/or is represented in examples
17
+
* Make sure your change is covered with unit tests.
19
18
***Verify code compiles and all existing and new unit tests pass.**
20
-
* The quickest way to have a Pull Request not be accepted, is to submit code that does not compile or pass tests.
19
+
* The quickest way to have a Pull Request not approved, is to submit code that does not compile or pass tests.
21
20
* Commit change to your local repository.
22
-
* Push change to your remote repository
23
-
* Submit a [Pull Request](https://help.github.com/articles/using-pull-requests).
24
-
* Note: local and remote branches can be deleted after pull request has been accepted.
25
-
26
-
**Note:** Getting changes from others requires [Syncing your Local repository](https://help.github.com/articles/syncing-a-fork) with Master utPLSQL repository. This can happen at any time.
27
-
21
+
* Push change to your remote repository.
22
+
* Submit a [Pull Request](https://help.github.com/articles/using-pull-requests) into develop branch.
23
+
* Note: local and remote branches can be deleted after pull request has been merged.
28
24
29
25
## Coding Standards ##
30
26
31
-
*Snake case will be used. This separates keywords in names with underscores. `execute_test`
32
-
* All names will be lower case.
27
+
*We use snake case for all identifiers in PLSQL code. This separates keywords in names with underscores. `execute_test`
28
+
* All code is lower case.
33
29
* Prefixes:
34
-
* Arguments to procedures and functions will start with `a_` an Example would be procedure `is_valid(a_owner_name varchar2);`
30
+
* Arguments to procedures and functions will start with `a_` an Example would be procedure `is_valid(a_owner_name varchar2)`
35
31
* Object types and packages will start with `ut_`
36
32
* Local variables `l_`
37
33
* Global variables `g_`
@@ -41,27 +37,130 @@ Changes are welcome from all members of the Community.
41
37
* varchar2 lengths are set in characters not bytes
42
38
43
39
44
-
## Testing Environment ##
40
+
## Configuring local environment ##
41
+
42
+
Your local environment can be of any flavor (Unix/Linux/Windows/Mac).
43
+
At minimum you need to have Oracle database 11.2 XE accessible for the project and SYS account access to install and develop utPLSQL.
44
+
45
+
We use four different database accounts (users) for development process.
46
+
*`ut3_latest_release` - holds latest released version of utPLSQL. This schema holds the testing framework used for self-testing of utPLSQL development.
47
+
*`ut3` - holds latest (current) development version of utPLSQL. This is the schema you will be working on.
48
+
*`ut3_tester` - holds unit test packages for development of utPLSQL.
49
+
*`ut3$user#` - used for testing accessibility to schema names with special characters.
50
+
51
+
52
+
53
+
Snippet to get you started with development.
54
+
55
+
_If you're using Windows, you can run below scripts using `GIT bash` - Windows-based Unix-like command line._
We are using private docker images to test utPLSQL for our Travis CI builds. The following versions of Oracle Database are being used.
47
146
48
147
* 11g XE R2
49
148
* 12c SE R1
50
149
* 12c SE R2
51
150
52
-
These images are based on the official dockerfiles released by Oracle, but due to licensing restrictions, we can't make the images public. You can build your own and use it locally, or push to a private docker repository.
151
+
These images are based on the slimmed versions [official dockerfiles released by Oracle](https://github.com/utPLSQL/docker-scripts), but due to licensing restrictions, we can't make the images public.
152
+
You can build your own and use it locally, or push to a private docker repository.
53
153
54
154
The build steps are simple if you already have some experience using Docker. You can find detailed information about how to build your own image with a running database in: [example of creating an image with pre-built DB](https://github.com/oracle/docker-images/blob/master/OracleDatabase/samples/prebuiltdb/README.md)
55
155
56
156
> You can find more info about the official Oracle images on the [Oracle Database on Docker](https://github.com/oracle/docker-images/tree/master/OracleDatabase) GitHub page.
57
157
58
158
> If you are new to Docker, you can start by reading the [Getting Started With Docker](https://docs.docker.com/engine/getstarted/) docs.
59
159
60
-
### Build Notes ###
61
-
* You need to comment out the VOLUME line. This step is required, because volumes are not saved when using `docker commit` command.
62
-
63
-
* When the build proccess is complete, you will run the container to install the database. Once everything is set up and you see the message "DATABASE IS READY!", you may change the password and stop the running container. After the container is stopped, you can safely commit the container.
160
+
### Docker Build Notes ###
64
161
162
+
* You need to comment out the VOLUME line. This step is required, because volumes are not saved when using `docker commit` command.
163
+
* When the build process is complete, you will run the container to install the database. Once everything is set up and you see the message "DATABASE IS READY!", you may change the password and stop the running container. After the container is stopped, you can safely commit the container.
65
164
* You can use the --squash experimental docker tag to reduce the image size. Example:
Our build configurarion uses SQLCL to run the scripts, and you need to configure a few additional secure environment variables. After the first build, the downloaded file will be cached.
177
+
Our build configuration uses SQLCL to run the scripts, and you need to configure a few additional secure environment variables. After the first build, the downloaded file will be cached.
0 commit comments