sagemathinc / cocalc-examples

collection of example documents for use within cocalc's library
https://cocalc.com
14 stars 13 forks source link

Submodule public_finance_2018_2019 is broken #12

Open mthused opened 3 years ago

mthused commented 3 years ago

Looks like the public_finance_2018_2019 repository has disappeared from github...

johnperry-math commented 3 years ago

The dask-tutorial repository has also deleted its master branch. I can't get index.py to run correctly. Anyone have any advice on how to make this work?

williamstein commented 3 years ago

The dask-tutorial repository has also deleted its master branch.

Wow, the subtle side effects of political correctness...

Anyone have any advice on how to make this work?

Can you just change our code from master to main...?

johnperry-math commented 3 years ago

The dask-tutorial repository has also deleted its master branch.

Wow, the subtle side effects of political correctness...

Are you serious? I have a master branch and it works. I should add that I'm not 100% sure it lacks a master, but running index.py failed with a complaint about that. There are at least a couple of others like that, too: math157 and the scikit-image-examples or something like that.

Anyone have any advice on how to make this work?

Can you just change our code from master to main...?

I made it work once by disabling a bunch of repositories. Right now it looks as if I will have to clone, but not recursively, on account of public_finance_2018_2019, remove its submodule, etc. I'll try to change the branch, then if I can get everything working I'll submit a pull request.

williamstein commented 3 years ago

Are you serious?

Yes. There is a movement to rename terms that some find offensive in software engineering, including "master", "slave", "white list", "black list", etc. Some real thought [1] has gone into which terms are offensive, and what better terminology is recommended and a huge chunk of the industry has made changes as a result. It's important to be aware of, so you can understand why a repo would seemingly randomly delete their master branch...

[1] https://tools.ietf.org/id/draft-knodel-terminology-00.html

I'll try to change the branch, then if I can get everything working I'll submit a pull request.

Thanks!!

johnperry-math commented 3 years ago

Are you serious?

Yes. There is a movement to rename terms that some find offensive in software engineering, including "master", "slave", "white list", "black list", etc.

Well, I've known about that for something like 20 years, when I think a San Francisco clerk (?) sent a letter to a supplier demanding that they change the names of "master-slave". But "master" in git has a different meaning; there are no slaves involved, and "master" in general descends from the Latin word for "teacher", and still has that meaning in many contexts.

I don't mean to sound quarrelsome, and apologize if I do. I'm just trying to explain my surprise.

I'll try to change the branch, then if I can get everything working I'll submit a pull request.

Thanks!!

I'll also post (hopefully correct) directions in a followup.

johnperry-math commented 3 years ago

Here's what I did to generate Pull Request [insert here, moron!], in case other people need to do this before it gets fixed.

  1. fork it in GitHub
  2. git clone my fork's repository
  3. cd cocalc-examples
  4. edited index.yaml: a. as per usual instructions to add a repository b. commented out public_finance_2018_2019 because it no longer exists on GitHub c. also commented out first-steps because it no longer exists in the cocalc-first-examples repository
  5. git submodule add the submodule I wanted to add
  6. git submodule update --init --recursive
  7. Wait a while. Don't panic when you see the error message on public_finance...
  8. git submodule deinit -f -- public_finance_2018_2019
  9. git rm public_finance_2018_2019
  10. git pull --recurse-submodules this is important
  11. Someone broke the think-complexity-2ed submodule by deleting a bunch of stuff (!?!?!) so you have to fix it: a. cd think-complexity-2ed b. git reset to fix it c. git stash to sort-of get rid of the deletions d. cd ..
  12. Repeat step 11 for think-stats
  13. Repeat step 11 for think-bayes
  14. Repeat step 11 for nbgrader-demo
  15. Now run ./index.py.

Simple, right? ;-)

johnperry-math commented 3 years ago

Eek, let me add something I forgot to mention. When I run git status, I get the following:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
    modified:   deedy-latex-templates (modified content)
    modified:   introduction_to_ml_with_python (modified content)
    modified:   martinthoma-latex-examples (modified content)
    modified:   math157 (modified content)
    modified:   scientific-python-lectures (modified content)
    modified:   stanford-tensorflow-tutorials (modified content)
    modified:   statistical-rethinking-python-PyMC3 (modified content)

no changes added to commit (use "git add" and/or "git commit -a")

If I run git diff, I see:

$ git diff
diff --git a/deedy-latex-templates b/deedy-latex-templates
--- a/deedy-latex-templates
+++ b/deedy-latex-templates
@@ -1 +1 @@
-Subproject commit b616f5d04b24394e29c58bf15251894655c3d02a
+Subproject commit b616f5d04b24394e29c58bf15251894655c3d02a-dirty
diff --git a/introduction_to_ml_with_python b/introduction_to_ml_with_python
--- a/introduction_to_ml_with_python
[lots more like the above]

I'm not versed enough in git to know if this should concern me, but I think it shouldn't. I tried adding them, but no dice. I'm not sure how to interpret that. Let me know if it should concern me.

williamstein commented 3 years ago

You need to do

git commit -av
git push
johnperry-math commented 3 years ago

Doesn't help:

git commit -av

On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
    modified:   deedy-latex-templates (modified content)
    modified:   introduction_to_ml_with_python (modified content)
    modified:   martinthoma-latex-examples (modified content)
    modified:   math157 (modified content)
    modified:   scientific-python-lectures (modified content)
    modified:   stanford-tensorflow-tutorials (modified content)
    modified:   statistical-rethinking-python-PyMC3 (modified content)

no changes added to commit

git push

Everything up-to-date
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
    modified:   deedy-latex-templates (modified content)
    modified:   introduction_to_ml_with_python (modified content)
    modified:   martinthoma-latex-examples (modified content)
    modified:   math157 (modified content)
    modified:   scientific-python-lectures (modified content)
    modified:   stanford-tensorflow-tutorials (modified content)
    modified:   statistical-rethinking-python-PyMC3 (modified content)

no changes added to commit (use "git add" and/or "git commit -a")

I'll dig deeper & report back.

johnperry-math commented 3 years ago

OK, that was quick. Descending into each folder I see that they also had someone/something attempt to delete everything in them, much the same as I had with other subfolders. I'm not sure how this happened, but git stash seems to succeed at restoring their status.

johnperry-math commented 3 years ago

One exception remains, and it's bizarre, possibly related to MacOS' file system. The submodule martinthoma-latex-examples has an issue with two files, publications/hasy/symbols/ae.pdf and publications/hasy/symbols/o.pdf. Whatever I do, whether a git stash or a git restore or rebase or whatever, git status keeps switching me between ae.pdf and AE.pdf and similarly for the o.

johnperry-math commented 3 years ago

I think I've fixed it. New pull request available.

slel commented 3 years ago

[1] https://tools.ietf.org/id/draft-knodel-terminology-00.html

The latest version of that draft is at