From 6e2bed1e61cd791a4f1f04f85b4a89f9716563bf Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Wed, 20 Sep 2023 08:53:41 -0500 Subject: [PATCH] replace all references to `master` except in specific lines of code --- .github/workflows/build_test_publish.yml | 2 +- .github/workflows/changelog_test.yml | 2 +- CONTRIBUTING.rst | 38 ++++++++++++------------ README.rst | 8 ++--- cli/cyclus.cc | 6 ++-- cyclus/lib.pyx | 4 +-- cyclus/main.py | 14 ++++----- cyclus/simstate.py | 4 +-- doc/release_notes/v0.3.rst | 6 ++-- 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build_test_publish.yml b/.github/workflows/build_test_publish.yml index d6702282ba..5311b3fcd3 100644 --- a/.github/workflows/build_test_publish.yml +++ b/.github/workflows/build_test_publish.yml @@ -29,7 +29,7 @@ jobs: echo "tag-latest-on-default=false" >> "$GITHUB_ENV" - name: condition on trigger parameters - if: ${{ github.repository_owner == 'cyclus' && github.ref == 'refs/heads/master' }} + if: ${{ github.repository_owner == 'cyclus' && github.ref == 'refs/heads/main' }} run: | echo "tag-latest-on-default=true" >> "$GITHUB_ENV" diff --git a/.github/workflows/changelog_test.yml b/.github/workflows/changelog_test.yml index cb327a45c6..b8cdd106d3 100644 --- a/.github/workflows/changelog_test.yml +++ b/.github/workflows/changelog_test.yml @@ -29,7 +29,7 @@ jobs: cd $GITHUB_WORKSPACE git remote add cyclus https://github.com/cyclus/cyclus.git git fetch cyclus - change=`git diff cyclus/master -- CHANGELOG.rst | wc -l` + change=`git diff cyclus/main -- CHANGELOG.rst | wc -l` git remote remove cyclus if [ $change -eq 0 ]; then echo "CHANGELOG.rst has not been updated" diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 0bcf6210f6..7be4d0df16 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -12,9 +12,9 @@ General Notes * Use a branching workflow similar to the one described at http://progit.org/book/ch3-4.html. -* Keep your own "master" branch in sync with the mainline - repository's "master" branch. Specifically, do not push your - own commits directly to your "master" branch. +* Keep your own "main" branch in sync with the mainline + repository's "main" branch. Specifically, do not push your + own commits directly to your "main" branch. * Any commit should *pass all tests* (see `Running Tests`_). @@ -30,11 +30,11 @@ Issuing a Pull Request ====================== * When you are ready to move changes from one of your topic branches into the - "master" branch, it must be reviewed and accepted by another developer. + "main" branch, it must be reviewed and accepted by another developer. * You may want to review this `tutorial `_ before you make a - pull request to the master branch. + pull request to the main branch. Reviewing a Pull Request ======================== @@ -51,7 +51,7 @@ Reviewing a Pull Request * Click the green "Merge Pull Request" button * Note: if the button is not available, the requester needs to merge or rebase - from the current HEAD of the mainline "master" branch + from the current HEAD of the mainline "main" branch Running Tests ============= @@ -75,7 +75,7 @@ Cautions * **DO NOT** rebase any commits that have been pulled/pushed anywhere else other than your own fork (especially if those commits have been integrated into the blessed repository). You should NEVER rebase commits that are a part of the - 'master' branch. *If you do, we will never, ever accept your pull request*. + 'main' branch. *If you do, we will never, ever accept your pull request*. An Example ========== @@ -96,7 +96,7 @@ Acquiring Cyclus and Workflow ----------------------------- We begin with a fork of the mainline Cyclus repository. After initially forking -the repo, we will have the master branch in your fork. +the repo, we will have the main branch in your fork. Acquiring a Fork of the Cyclus Repository ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -111,9 +111,9 @@ First, let's make our "work" branch: .../cyclus_dir/$ git branch work .../cyclus_dir/$ git push origin work -We now have the following situation: there exists the mainline copy of the master -branch, there exists your fork's copy of the master and working branches, -*AND* there exists your *local* copy of the master and working branches. It is +We now have the following situation: there exists the mainline copy of the main +branch, there exists your fork's copy of the main and working branches, +*AND* there exists your *local* copy of the main and working branches. It is important now to note that you may wish to work from home or the office. If you keep your fork's branches up to date (i.e., "push" your changes before you leave), only your *local* copies of your branches may be different when you next sit down at the other location. @@ -128,22 +128,22 @@ work, finished, and successfully pushed your changes to your *Origin* repository. You are now at home and want to continue working a bit. To begin, let's update our *home's local branches*:: - .../cyclus_dir/$ git checkout master - .../cyclus_dir/$ git pull upstream master - .../cyclus_dir/$ git push origin master + .../cyclus_dir/$ git checkout main + .../cyclus_dir/$ git pull upstream main + .../cyclus_dir/$ git push origin main .../cyclus_dir/$ git checkout work .../cyclus_dir/$ git pull origin work - .../cyclus_dir/$ git rebase master + .../cyclus_dir/$ git rebase main .../cyclus_dir/$ git push origin work Perhaps a little explanation is required. We first want to make sure that this new local copy of -the master branch is up-to-date with respect to the remote origin's branch and remote upstream's +the main branch is up-to-date with respect to the remote origin's branch and remote upstream's branch. If there was a change from the remote upstream's branch, we want to push that to origin. We then follow the same process to update the work branch, except: #. we don't need to worry about the *upstream* repo because it doesn't have a work branch, and -#. we want to incorporate any changes which may have been introduced in the master branch update. +#. we want to incorporate any changes which may have been introduced in the main branch update. Workflow: The End ^^^^^^^^^^^^^^^^^ @@ -152,7 +152,7 @@ As time passes, you make some changes to files, and you commit those changes (to branch*). Eventually (hopefully) you come to a stopping point where you have finished your project on your work branch *AND* it compiles *AND* it runs input files correctly *AND* it passes all tests! Perhaps you have found Nirvana. In any case, you've performed the final commit to your work branch, -so it's time to make a pull request online and wait for our masterr friends to +so it's time to make a pull request online and wait for our main friends to review and accept it. Sometimes, your pull request will be held by the reviewer until further changes @@ -176,5 +176,5 @@ Releases If you are going through a release of Cyclus and Cycamore, check out the release procedure notes `here -`_ and +`_ and on the `website `_. diff --git a/README.rst b/README.rst index e33233ae7d..64b02e3572 100644 --- a/README.rst +++ b/README.rst @@ -12,13 +12,13 @@ Cyclus Projects Status ----------------------------------------------------------------------------------- **Branch** **Cyclus** **Cycamore** **Cymetric** ================ ================= =================== =================== -master |cyclus_master| |cycamore_master| |cymetric_master| +main |cyclus_main| |cycamore_main| |cymetric_main| ================ ================= =================== =================== -.. |cyclus_master| image:: https://circleci.com/gh/cyclus/cyclus/tree/master.png?&circle-token= 35d82ba8661d4f32e0f084b9d8a2388fa62c0262 -.. |cycamore_master| image:: https://circleci.com/gh/cyclus/cycamore/tree/master.png?&circle-token= 333211090d5d5a15110eed1adbe079a6f3a4a704 -.. |cymetric_master| image:: https://circleci.com/gh/cyclus/cymetric/tree/master.png?&circle-token= 72639b59387f077973af98e7ce72996eac18b96c +.. |cyclus_main| image:: https://circleci.com/gh/cyclus/cyclus/tree/main.png?&circle-token= 35d82ba8661d4f32e0f084b9d8a2388fa62c0262 +.. |cycamore_main| image:: https://circleci.com/gh/cyclus/cycamore/tree/main.png?&circle-token= 333211090d5d5a15110eed1adbe079a6f3a4a704 +.. |cymetric_main| image:: https://circleci.com/gh/cyclus/cymetric/tree/main.png?&circle-token= 72639b59387f077973af98e7ce72996eac18b96c diff --git a/cli/cyclus.cc b/cli/cyclus.cc index ba0c62f001..9e198240f1 100644 --- a/cli/cyclus.cc +++ b/cli/cyclus.cc @@ -240,14 +240,14 @@ int ParseCliArgs(ArgInfo* ai, int argc, char* argv[]) { ("restart", po::value(), "restart from the specified simulation snapshot [db-file]:[sim-id]:[timestep]") ("schema", - "dump the cyclus master schema including all installed module schemas") + "dump the cyclus main schema including all installed module schemas") ("agent-schema", po::value(), "dump the schema for the named agent") ("agent-version", po::value(), "print the version of the specified agent") ("schema-path", po::value(), - "manually specify the path to the cyclus master schema") - ("flat-schema", "use the flat master simulation schema") + "manually specify the path to the cyclus main schema") + ("flat-schema", "use the flat main simulation schema") ("agent-annotations", po::value(), "dump the annotations for the named agent") ("agent-listing,l", po::value(), diff --git a/cyclus/lib.pyx b/cyclus/lib.pyx index 258533e2f0..1512f280e5 100644 --- a/cyclus/lib.pyx +++ b/cyclus/lib.pyx @@ -854,7 +854,7 @@ class XMLFileLoader(_XMLFileLoader): Create a new loader reading from the xml simulation input file and writing to and initializing the backends in the recorder. The recorder must - already have the backend registered. schema_file identifies the master + already have the backend registered. schema_file identifies the main xml rng schema used to validate the input file. The format specifies the input file format from one of: "none", "xml", "json", or "py". """ @@ -887,7 +887,7 @@ class XMLFlatLoader(_XMLFlatLoader): Create a new loader reading from the xml simulation input file and writing to and initializing the backends in the recorder. The recorder must - already have the backend registered. schema_file identifies the master + already have the backend registered. schema_file identifies the main xml rng schema used to validate the input file. The format specifies the input file format from one of: "none", "xml", "json", or "py". diff --git a/cyclus/main.py b/cyclus/main.py index 19af6e6091..21c17125c0 100644 --- a/cyclus/main.py +++ b/cyclus/main.py @@ -314,7 +314,7 @@ def make_parser(): help='restart from the specified simulation snapshot, ' 'not supported.') p.add_argument('--schema', action=Schema, - help='dump the cyclus master schema including all ' + help='dump the cyclus main schema including all ' 'installed module schemas') p.add_argument('--agent-schema', action=AgentSchema, dest='agent_schema', @@ -323,10 +323,10 @@ def make_parser(): dest='agent_version', help='dump the version for the named agent') p.add_argument('--schema-path', dest='schema_path', default=None, - help='manually specify the path to the cyclus master schema') + help='manually specify the path to the cyclus main schema') p.add_argument('--flat-schema', action='store_true', default=False, dest='flat_schema', - help='use the flat master simulation schema') + help='use the flat main simulation schema') p.add_argument('--agent-annotations', action=AgentAnnotations, dest='agent_annotations', help='dump the annotations for the named agent') @@ -364,7 +364,7 @@ def make_parser(): p.add_argument('--rng-schema', action=RngSchema, help='print the path to cyclus.rng.in') p.add_argument('--rng-print', action=RngPrint, - help='print the master schema for the input simulation') + help='print the main schema for the input simulation') p.add_argument('--nuc-data', action=NucData, help='print the path to cyclus_nuc_data.h5') p.add_argument('--json-to-xml', action=JsonToXml, @@ -407,8 +407,8 @@ def run_simulation(ns): state.si.context.sim_id) print(msg) -def print_master_schema(ns): - """Prints the master schema for the simulation""" +def print_main_schema(ns): + """Prints the main schema for the simulation""" state = SimState(input_file=ns.input_file, input_format=ns.format, output_path=ns.output_path, schema_path=ns.schema_path, flat_schema=ns.flat_schema, print_ms=True) @@ -422,7 +422,7 @@ def main(args=None): p = make_parser() ns = p.parse_args(args=args) if(ns.rng_print): - print_master_schema(ns) + print_main_schema(ns) elif ns.input_file is not None: run_simulation(ns) diff --git a/cyclus/simstate.py b/cyclus/simstate.py index 4ba3e9da5a..32923c0e81 100644 --- a/cyclus/simstate.py +++ b/cyclus/simstate.py @@ -58,9 +58,9 @@ class SimState(object): The initial registry to start the in-memory backend with. Defaults is True, which stores all of the tables. schema_path : str or None, optional: - The path to the cyclus master schema. + The path to the cyclus main schema. flat_schema : bool, optional - Whether or not to use the flat master simulation schema. + Whether or not to use the flat main simulation schema. frequency : int or float, optional The amount of time [sec] to sleep for in tight loops, default 1 ms. repeating_actions : list or None, optional diff --git a/doc/release_notes/v0.3.rst b/doc/release_notes/v0.3.rst index 8cc2454312..2f4c8f7c4a 100644 --- a/doc/release_notes/v0.3.rst +++ b/doc/release_notes/v0.3.rst @@ -85,7 +85,7 @@ New features - updated namespace name to reflect directory name - made mock fac/inst/region/market classes to be used with testing. added the stub facility in a new stub namespace and related tests. - added initial stub directory and adjusted cmake files to include their tests. -- moved all dynamic loading into xml_file_loader. Added a method for listing installed/discoverable dynamic modules to env class. added rng schema methods to test agents and removed rng files from them. removed rng installation from cmake module macro. added master and module schema dumping to cyclus binary. added schema agent test (that schema parses). moved heavy stuff out of xml-file-loader constructor. renamed LoadAll to LoadSim. +- moved all dynamic loading into xml_file_loader. Added a method for listing installed/discoverable dynamic modules to env class. added rng schema methods to test agents and removed rng files from them. removed rng installation from cmake module macro. added main and module schema dumping to cyclus binary. added schema agent test (that schema parses). moved heavy stuff out of xml-file-loader constructor. renamed LoadAll to LoadSim. - i think moving loglevel and the macros into the same namespace encapsulation is more promising... still unable to confirm. - finishes remaining doxygen warnings - I believe that this will fix the warning stemming from logger.h, but I do not see the warning on my machine, so I can't be sure @@ -201,7 +201,7 @@ New features - literal 0 -> 0.0 for fp compares - abs() -> fabs(), types they are a-changing. - fixes doc errors, should clear up @gonuke's cron job errors -- fixes master schema building +- fixes main schema building - updated test files so cycamore can build - ran all files in Core dir through astyle for style guide formatting - updated enrichment function names @@ -271,7 +271,7 @@ New features - first cyclus ns changes. - made buildSchema private. Used Agent class module type list instead of custom one. - removed cyclus.rng.in generation - now done dynamically in cyclus core -- modified XML loading to dynamically build the master schema by searching for installed modules +- modified XML loading to dynamically build the main schema by searching for installed modules - created csv backend. - fixed name erro - updated setup with localdir as default for some params